27 cout << (s.empty() ?
"" : s +
" ") <<
"GPSFactor on " << keyFormatter(
key())
29 cout <<
" GPS measurement: " << nT_ <<
"\n";
30 noiseModel_->print(
" noise model: ");
46 pair<Pose3, Vector3> GPSFactor::EstimateState(
double t1,
const Point3& NED1,
47 double t2,
const Point3& NED2,
double timestamp) {
50 Point3 nV = (NED2 - NED1) / dt;
53 Point3 nT = NED1 + nV * (timestamp - t1);
56 double yaw =
atan2(nV.y(), nV.x());
57 Rot3 nRy = Rot3::Yaw(yaw);
58 Point3 yV = nRy.inverse() * nV;
59 double pitch = -
atan2(yV.z(), yV.x()), roll = 0;
60 Rot3 nRb = Rot3::Ypr(yaw, pitch, roll);
65 return make_pair(nTb, nV);
69 cout << s <<
"GPSFactor2 on " << keyFormatter(
key()) <<
"\n";
70 cout <<
" GPS measurement: " << nT_.transpose() << endl;
71 noiseModel_->print(
" noise model: ");
77 return e !=
nullptr && Base::equals(*e, tol) &&
const gtsam::Symbol key('X', 0)
const Point3 & translation(OptionalJacobian< 3, 6 > Hself={}) const
get translation
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy y set format x g set format y g set format x2 g set format y2 g set format z g set angles radians set nogrid set key title set key left top Right noreverse box linetype linewidth samplen spacing width set nolabel set noarrow set nologscale set logscale x set set pointsize set encoding default set nopolar set noparametric set set set set surface set nocontour set clabel set mapping cartesian set nohidden3d set cntrparam order set cntrparam linear set cntrparam levels auto set cntrparam points set size set set xzeroaxis lt lw set x2zeroaxis lt lw set yzeroaxis lt lw set y2zeroaxis lt lw set tics in set ticslevel set tics set mxtics default set mytics default set mx2tics default set my2tics default set xtics border mirror norotate autofreq set ytics border mirror norotate autofreq set ztics border nomirror norotate autofreq set nox2tics set noy2tics set timestamp bottom norotate set rrange [*:*] noreverse nowriteback set trange [*:*] noreverse nowriteback set urange [*:*] noreverse nowriteback set vrange [*:*] noreverse nowriteback set xlabel matrix size set x2label set timefmt d m y n H
Rot3 is a 3D rotation represented as a rotation matrix if the preprocessor symbol GTSAM_USE_QUATERNIO...
Header file for GPS factor.
Matrix * OptionalMatrixType
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
const Point3 & position(OptionalJacobian< 3, 9 > H={}) const