52 measured_(measured), nM_(scale * direction), bias_(bias) {
62 boost::optional<Matrix&>
HR = boost::none) {
76 boost::optional<Matrix&>
H = boost::none)
const override {
79 return (hx - measured_);
101 measured_(measured), nM_(scale * direction), bias_(bias) {
114 boost::optional<Matrix&>
H = boost::none)
const override {
117 return (hx - measured_);
137 measured_(measured), bRn_(nRb.
inverse()) {
152 boost::optional<Matrix&> H1 = boost::none, boost::optional<Matrix&> H2 =
153 boost::none)
const override {
158 return (hx - measured_);
178 measured_(measured), bRn_(nRb.
inverse()) {
193 const Point3&
bias, boost::optional<Matrix&> H1 = boost::none,
194 boost::optional<Matrix&> H2 = boost::none, boost::optional<Matrix&> H3 =
195 boost::none)
const override {
197 Unit3 rotated = bRn_.
rotate(direction, boost::none, H2);
205 *H2 = scale * H * (*H2);
209 return (hx - measured_);
const Point3 nM_
Local magnetic field (mag output units)
noiseModel::Diagonal::shared_ptr model
MagFactor2(Key key1, Key key2, const Point3 &measured, const Rot3 &nRb, const SharedNoiseModel &model)
const Point3 measured_
The measured magnetometer values.
Rot2 R(Rot2::fromAngle(0.1))
Point3 unrotate(const Point3 &p, OptionalJacobian< 3, 3 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
rotate point from world to rotated frame
Vector evaluateError(const Rot3 &nRb, boost::optional< Matrix & > H=boost::none) const override
vector of errors
Vector evaluateError(const Rot2 &nRb, boost::optional< Matrix & > H=boost::none) const override
vector of errors
const Point3 measured_
The measured magnetometer values.
Vector evaluateError(const Point3 &nM, const Point3 &bias, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none) const override
vector of errors
const Point3 measured_
The measured magnetometer values.
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
const Rot3 bRn_
The assumed known rotation from nav to body.
Point3 rotate(const Point3 &p, OptionalJacobian< 3, 3 > H1=boost::none, OptionalJacobian< 3, 3 > H2=boost::none) const
const Rot3 bRn_
The assumed known rotation from nav to body.
Point3 nM(22653.29982,-1956.83010, 44202.47862)
const Symbol key1('v', 1)
Represents a 3D point on a unit sphere.
static Rot3 Yaw(double t)
Positive yaw is to right (as in aircraft heading). See ypr.
Vector evaluateError(const double &scale, const Unit3 &direction, const Point3 &bias, boost::optional< Matrix & > H1=boost::none, boost::optional< Matrix & > H2=boost::none, boost::optional< Matrix & > H3=boost::none) const override
vector of errors
boost::shared_ptr< This > shared_ptr
EIGEN_DEVICE_FUNC const Scalar & q
GTSAM_EXPORT Point3 point3(OptionalJacobian< 3, 2 > H=boost::none) const
Return unit-norm Point3.
const Point3 nM_
Local magnetic field (mag output units)
MagFactor1(Key key, const Point3 &measured, double scale, const Unit3 &direction, const Point3 &bias, const SharedNoiseModel &model)
NonlinearFactor::shared_ptr clone() const override
const Point3 measured_
The measured magnetometer values.
NonlinearFactor::shared_ptr clone() const override
Non-linear factor base classes.
const Symbol key3('v', 3)
NonlinearFactor::shared_ptr clone() const override
const Symbol key2('v', 2)
static Point3 unrotate(const Rot2 &R, const Point3 &p, boost::optional< Matrix & > HR=boost::none)
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 scale
EIGEN_DEVICE_FUNC const InverseReturnType inverse() const
std::uint64_t Key
Integer nonlinear key type.
NonlinearFactor::shared_ptr clone() const override
MagFactor3(Key key1, Key key2, Key key3, const Point3 &measured, const Rot3 &nRb, const SharedNoiseModel &model)
noiseModel::Base::shared_ptr SharedNoiseModel
3D rotation represented as a rotation matrix or quaternion
MagFactor(Key key, const Point3 &measured, double scale, const Unit3 &direction, const Point3 &bias, const SharedNoiseModel &model)