BarometricFactor.cpp
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
19 #include "BarometricFactor.h"
20 
21 using namespace std;
22 
23 namespace gtsam {
24 
25 //***************************************************************************
26 void BarometricFactor::print(const string& s,
27  const KeyFormatter& keyFormatter) const {
28  cout << (s.empty() ? "" : s + " ") << "Barometric Factor on "
29  << keyFormatter(key<1>()) << "Barometric Bias on "
30  << keyFormatter(key<2>()) << "\n";
31 
32  cout << " Baro measurement: " << nT_ << "\n";
33  noiseModel_->print(" noise model: ");
34 }
35 
36 //***************************************************************************
37 bool BarometricFactor::equals(const NonlinearFactor& expected,
38  double tol) const {
39  const This* e = dynamic_cast<const This*>(&expected);
40  return e != nullptr && Base::equals(*e, tol) &&
41  traits<double>::Equals(nT_, e->nT_, tol);
42 }
43 
44 //***************************************************************************
45 Vector BarometricFactor::evaluateError(const Pose3& p, const double& bias,
47  OptionalMatrixType H2) const {
48  Matrix tH;
49  Vector ret = (Vector(1) << (p.translation(tH).z() + bias - nT_)).finished();
50  if (H) (*H) = tH.block<1, 6>(2, 0);
51  if (H2) (*H2) = (Matrix(1, 1) << 1.0).finished();
52  return ret;
53 }
54 
55 } // namespace gtsam
H
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
Definition: gnuplot_common_settings.hh:74
Eigen::internal::print
EIGEN_STRONG_INLINE Packet4f print(const Packet4f &a)
Definition: NEON/PacketMath.h:3115
s
RealScalar s
Definition: level1_cplx_impl.h:126
e
Array< double, 1, 3 > e(1./3., 0.5, 2.)
BarometricFactor.h
Header file for Barometric factor.
ret
DenseIndex ret
Definition: level1_cplx_impl.h:44
gtsam::Matrix
Eigen::MatrixXd Matrix
Definition: base/Matrix.h:39
gtsam::Factor
Definition: Factor.h:69
gtsam::Vector
Eigen::VectorXd Vector
Definition: Vector.h:38
ceres::Matrix
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > Matrix
Definition: gtsam/3rdparty/ceres/eigen.h:42
gtsam::KeyFormatter
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
gtsam::Pose3
Definition: Pose3.h:37
cholesky::expected
Matrix expected
Definition: testMatrix.cpp:971
gtsam
traits
Definition: chartTesting.h:28
gtsam::traits
Definition: Group.h:36
std
Definition: BFloat16.h:88
gtsam::NonlinearFactor
Definition: NonlinearFactor.h:68
p
float * p
Definition: Tutorial_Map_using.cpp:9
gtsam::tol
const G double tol
Definition: Group.h:79
gtsam::OptionalMatrixType
Matrix * OptionalMatrixType
Definition: NonlinearFactor.h:55
ceres::Vector
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Definition: gtsam/3rdparty/ceres/eigen.h:38


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:00:30