PreintegrationParams.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 
22 #include "PreintegrationParams.h"
23 
24 using namespace std;
25 
26 namespace gtsam {
27 
28 //------------------------------------------------------------------------------
29 void PreintegrationParams::print(const string& s) const {
31  cout << "accelerometerCovariance:\n[\n" << accelerometerCovariance << "\n]"
32  << endl;
33  cout << "integrationCovariance:\n[\n" << integrationCovariance << "\n]"
34  << endl;
35  if (omegaCoriolis && use2ndOrderCoriolis)
36  cout << "Using 2nd-order Coriolis" << endl;
37  if (body_P_sensor) body_P_sensor->print(" ");
38  cout << "n_gravity = (" << n_gravity.transpose() << ")" << endl;
39 }
40 
41 //------------------------------------------------------------------------------
42 bool PreintegrationParams::equals(const PreintegratedRotationParams& other,
43  double tol) const {
44  auto e = dynamic_cast<const PreintegrationParams*>(&other);
45  return e != nullptr && PreintegratedRotationParams::equals(other, tol) &&
46  use2ndOrderCoriolis == e->use2ndOrderCoriolis &&
47  equal_with_abs_tol(accelerometerCovariance, e->accelerometerCovariance,
48  tol) &&
49  equal_with_abs_tol(integrationCovariance, e->integrationCovariance,
50  tol) &&
51  equal_with_abs_tol(n_gravity, e->n_gravity, tol);
52 }
53 
54 } // namespace gtsam
void print(const Matrix &A, const string &s, ostream &stream)
Definition: Matrix.cpp:155
Definition: Half.h:150
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RealScalar s
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
Definition: base/Matrix.h:84
traits
Definition: chartTesting.h:28
const G double tol
Definition: Group.h:83


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:43:29