29 using namespace gtsam;
32 #if GEOGRAPHICLIB_VERSION_MINOR<37 33 static const auto&
kWGS84 = Geocentric::WGS84;
35 static const auto&
kWGS84 = Geocentric::WGS84();
41 const double lat0 = 33.86998,
lon0 = -84.30626,
h0 = 274;
47 const double lat = 33.87071,
lon = -84.30482,
h = 274;
67 Pose3 T(Rot3::RzRyRx(0.15, -0.30, 0.45),
Point3(E, N, U));
71 Matrix expectedH = numericalDerivative11<Vector,Pose3>(
72 boost::bind(&GPSFactor::evaluateError, &factor, _1, boost::none),
T);
96 NavState T(Rot3::RzRyRx(0.15, -0.30, 0.45),
Point3(E, N, U), Vector3::Zero());
100 Matrix expectedH = numericalDerivative11<Vector,NavState>(
101 boost::bind(&GPSFactor2::evaluateError, &factor, _1, boost::none),
T);
122 enu.
Forward(35.4394633333333, -119.063146666667, 276.52, E, N, U);
128 boost::tie(T, nV) = GPSFactor::EstimateState(t1, NED1, t2, NED2, 84831.0796);
TEST(GPSFactor, Constructor)
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
Concept check for values that can be used in unit tests.
static int runAllTests(TestResult &result)
Header for GeographicLib::LocalCartesian class.
noiseModel::Diagonal::shared_ptr model
static const auto & kWGS84
Some functions to compute numerical derivatives.
const Point3 & translation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get translation
LocalCartesian origin_ENU(lat0, lon0, h0, kWGS84)
#define EXPECT_DOUBLES_EQUAL(expected, actual, threshold)
Point2 expectedT(-0.0446635, 0.29552)
Header file for GPS factor.
Vector evaluateError(const NavState &p, boost::optional< Matrix & > H=boost::none) const override
vector of errors
#define EXPECT(condition)
Eigen::Triplet< double > T
Namespace for GeographicLib.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
Local cartesian coordinates.
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
void Forward(real lat, real lon, real h, real &x, real &y, real &z) const
Vector evaluateError(const Pose3 &p, boost::optional< Matrix & > H=boost::none) const override
vector of errors
std::uint64_t Key
Integer nonlinear key type.
noiseModel::Base::shared_ptr SharedNoiseModel
const Rot3 & rotation(OptionalJacobian< 3, 6 > Hself=boost::none) const
get rotation