29 Matrix23 D_nRotated_R;
30 Matrix22 D_e_nRotated;
31 Unit3 nRotated =
nRb.rotate(bMeasured_, D_nRotated_R);
32 Vector e = nRef_.error(nRotated, D_e_nRotated);
34 (*H) = D_e_nRotated * D_nRotated_R;
38 return nRef_.error(nRotated);
45 cout << (
s.empty() ?
"" :
s +
" ") <<
"Rot3AttitudeFactor on "
46 << keyFormatter(this->
key()) <<
"\n";
47 nRef_.print(
" reference direction in nav frame: ");
48 bMeasured_.print(
" measured direction in body frame: ");
49 this->noiseModel_->print(
" noise model: ");
56 return e !=
nullptr && Base::equals(*
e,
tol) && this->nRef_.equals(
e->nRef_,
tol)
57 && this->bMeasured_.equals(
e->bMeasured_,
tol);
63 cout <<
s <<
"Pose3AttitudeFactor on " << keyFormatter(this->
key()) <<
"\n";
64 nRef_.print(
" reference direction in nav frame: ");
65 bMeasured_.print(
" measured direction in body frame: ");
66 this->noiseModel_->print(
" noise model: ");
73 return e !=
nullptr && Base::equals(*
e,
tol) && this->nRef_.equals(
e->nRef_,
tol)
74 && this->bMeasured_.equals(
e->bMeasured_,
tol);