61 :
Base(model, key, baroKey), nT_(heightOut(baroIn)) {}
64 gtsam::NonlinearFactor::shared_ptr
clone()
const override {
65 return boost::static_pointer_cast<gtsam::NonlinearFactor>(
66 gtsam::NonlinearFactor::shared_ptr(
new This(*
this)));
71 const std::string& s =
"",
72 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const override;
76 double tol = 1e-9)
const override;
80 const Pose3& p,
const double& b,
81 boost::optional<Matrix&> H = boost::none,
82 boost::optional<Matrix&> H2 = boost::none)
const override;
84 inline const double& measurementIn()
const {
return nT_; }
86 inline double heightOut(
double n)
const {
88 return (std::pow(n / 101.29, 1. / 5.256) * 288.08 - 273.1 - 15.04) /
92 inline double baroOut(
const double& meters) {
93 double temp = 15.04 - 0.00649 * meters;
94 return 101.29 * std::pow(((temp + 273.1) / 288.08), 5.256);
99 friend class boost::serialization::access;
100 template <
class ARCHIVE>
101 void serialize(ARCHIVE& ar,
const unsigned int ) {
103 ar& boost::serialization::make_nvp(
105 boost::serialization::base_object<Base>(*
this));
106 ar& BOOST_SERIALIZATION_NVP(nT_);
Navigation state composing of attitude, position, and velocity.
Non-linear factor base classes.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:113
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:156
noiseModel::Base::shared_ptr SharedNoiseModel
Aliases.
Definition: NoiseModel.h:724
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:100
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
Template to create a binary predicate.
Definition: Testable.h:111
A 3D pose (R,t) : (Rot3,Point3)
Definition: Pose3.h:37
Prior on height in a cartesian frame.
Definition: BarometricFactor.h:34
BarometricFactor This
Typedef to this class.
Definition: BarometricFactor.h:45
BarometricFactor(Key key, Key baroKey, const double &baroIn, const SharedNoiseModel &model)
Constructor from a measurement of pressure in KPa.
Definition: BarometricFactor.h:59
boost::shared_ptr< BarometricFactor > shared_ptr
shorthand for a smart pointer to a factor
Definition: BarometricFactor.h:42
gtsam::NonlinearFactor::shared_ptr clone() const override
Definition: BarometricFactor.h:64
BarometricFactor()
default constructor - only use for serialization
Definition: BarometricFactor.h:48
Nonlinear factor base class.
Definition: NonlinearFactor.h:42
A convenient base class for creating your own NoiseModelFactor with n variables.
Definition: NonlinearFactor.h:400