20 #include <boost/make_shared.hpp> 35 : accelerometerCovariance(I_3x3),
36 integrationCovariance(I_3x3),
37 use2ndOrderCoriolis(false),
38 n_gravity(n_gravity) {}
41 static boost::shared_ptr<PreintegrationParams> MakeSharedD(
double g = 9.81) {
46 static boost::shared_ptr<PreintegrationParams> MakeSharedU(
double g = 9.81) {
47 return boost::shared_ptr<PreintegrationParams>(
new PreintegrationParams(Vector3(0, 0, -g)));
50 void print(
const std::string& s)
const;
51 bool equals(
const PreintegratedRotation::Params& other,
double tol)
const;
53 void setAccelerometerCovariance(
const Matrix3& cov) { accelerometerCovariance = cov; }
54 void setIntegrationCovariance(
const Matrix3& cov) { integrationCovariance = cov; }
55 void setUse2ndOrderCoriolis(
bool flag) { use2ndOrderCoriolis = flag; }
57 const Matrix3& getAccelerometerCovariance()
const {
return accelerometerCovariance; }
58 const Matrix3& getIntegrationCovariance()
const {
return integrationCovariance; }
59 const Vector3& getGravity()
const {
return n_gravity; }
60 bool getUse2ndOrderCoriolis()
const {
return use2ndOrderCoriolis; }
67 friend class boost::serialization::access;
68 template<
class ARCHIVE>
69 void serialize(ARCHIVE & ar,
const unsigned int ) {
70 namespace bs = ::boost::serialization;
71 ar & boost::serialization::make_nvp(
"PreintegratedRotation_Params",
72 boost::serialization::base_object<PreintegratedRotationParams>(*
this));
73 ar & bs::make_nvp(
"accelerometerCovariance", bs::make_array(accelerometerCovariance.data(), accelerometerCovariance.size()));
74 ar & bs::make_nvp(
"integrationCovariance", bs::make_array(integrationCovariance.data(), integrationCovariance.size()));
75 ar & BOOST_SERIALIZATION_NVP(use2ndOrderCoriolis);
76 ar & BOOST_SERIALIZATION_NVP(n_gravity);
79 #ifdef GTSAM_USE_QUATERNIONS 82 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
Vector3 n_gravity
Gravity vector in nav frame.
Definition: PreintegrationParams.h:30
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
bool use2ndOrderCoriolis
Whether to use second order Coriolis integration.
Definition: PreintegrationParams.h:29
Parameters for pre-integration: Usage: Create just a single Params and pass a shared pointer to the c...
Definition: PreintegratedRotation.h:31
Matrix3 integrationCovariance
continuous-time "Covariance" describing integration uncertainty
Definition: PreintegrationParams.h:28
PreintegrationParams(const Vector3 &n_gravity)
The Params constructor insists on getting the navigation frame gravity vector For convenience,...
Definition: PreintegrationParams.h:34
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
PreintegrationParams()
Default constructor for serialization only: uninitialized!
Definition: PreintegrationParams.h:64
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
Definition: PreintegrationParams.h:27