20#include <boost/make_shared.hpp>
37 accelerometerCovariance(I_3x3),
38 integrationCovariance(I_3x3),
39 use2ndOrderCoriolis(false),
40 n_gravity(0, 0, -1) {}
46 accelerometerCovariance(I_3x3),
47 integrationCovariance(I_3x3),
48 use2ndOrderCoriolis(false),
49 n_gravity(n_gravity) {}
52 static boost::shared_ptr<PreintegrationParams> MakeSharedD(
double g = 9.81) {
57 static boost::shared_ptr<PreintegrationParams> MakeSharedU(
double g = 9.81) {
58 return boost::shared_ptr<PreintegrationParams>(
new PreintegrationParams(Vector3(0, 0, -g)));
61 void print(
const std::string& s=
"")
const override;
62 bool equals(
const PreintegratedRotationParams& other,
double tol)
const override;
64 void setAccelerometerCovariance(
const Matrix3& cov) { accelerometerCovariance = cov; }
65 void setIntegrationCovariance(
const Matrix3& cov) { integrationCovariance = cov; }
66 void setUse2ndOrderCoriolis(
bool flag) { use2ndOrderCoriolis = flag; }
68 const Matrix3& getAccelerometerCovariance()
const {
return accelerometerCovariance; }
69 const Matrix3& getIntegrationCovariance()
const {
return integrationCovariance; }
70 const Vector3& getGravity()
const {
return n_gravity; }
71 bool getUse2ndOrderCoriolis()
const {
return use2ndOrderCoriolis; }
76 friend class boost::serialization::access;
77 template<
class ARCHIVE>
78 void serialize(ARCHIVE & ar,
const unsigned int ) {
79 namespace bs = ::boost::serialization;
81 ar & BOOST_SERIALIZATION_NVP(accelerometerCovariance);
82 ar & BOOST_SERIALIZATION_NVP(integrationCovariance);
83 ar & BOOST_SERIALIZATION_NVP(use2ndOrderCoriolis);
84 ar & BOOST_SERIALIZATION_NVP(n_gravity);
87#ifdef GTSAM_USE_QUATERNIONS
#define GTSAM_MAKE_ALIGNED_OPERATOR_NEW
This marks a GTSAM object to require alignment.
Definition: types.h:277
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:112
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:155
Parameters for pre-integration: Usage: Create just a single Params and pass a shared pointer to the c...
Definition: PreintegratedRotation.h:31
Parameters for pre-integration: Usage: Create just a single Params and pass a shared pointer to the c...
Definition: PreintegrationParams.h:26
Matrix3 accelerometerCovariance
Continuous-time "Covariance" of accelerometer The units for stddev are σ = m/s²/√Hz.
Definition: PreintegrationParams.h:29
bool use2ndOrderCoriolis
Whether to use second order Coriolis integration.
Definition: PreintegrationParams.h:31
PreintegrationParams()
Default constructor for serialization only.
Definition: PreintegrationParams.h:35
Vector3 n_gravity
Gravity vector in nav frame.
Definition: PreintegrationParams.h:32
PreintegrationParams(const Vector3 &n_gravity)
The Params constructor insists on getting the navigation frame gravity vector For convenience,...
Definition: PreintegrationParams.h:44
Matrix3 integrationCovariance
continuous-time "Covariance" describing integration uncertainty
Definition: PreintegrationParams.h:30