Functions | Variables
testNavState.cpp File Reference

Unit tests for NavState. More...

#include <gtsam/navigation/NavState.h>
#include <gtsam/base/TestableAssertions.h>
#include <gtsam/base/numericalDerivative.h>
#include <CppUnitLite/TestHarness.h>
Include dependency graph for testNavState.cpp:

Go to the source code of this file.

Functions

static const Vector3 kGravity (0, 0, 9.81)
 
static const Vector3 kOmegaCoriolis (0.02, 0.03, 0.04)
 
static const Point3 kPosition (1.0, 2.0, 3.0)
 
static const Velocity3 kVelocity (0.4, 0.5, 0.6)
 
int main ()
 
 TEST (NavState, Constructor)
 
 TEST (NavState, Constructor2)
 
 TEST (NavState, Attitude)
 
 TEST (NavState, Position)
 
 TEST (NavState, Velocity)
 
 TEST (NavState, BodyVelocity)
 
 TEST (NavState, Manifold)
 
 TEST (NavState, Coriolis)
 
 TEST (NavState, Coriolis2)
 
 TEST (NavState, Coriolis3)
 
 TEST (NavState, CorrectPIM)
 
 TEST (NavState, Stream)
 

Variables

boost::function< Vector9(const NavState &, const bool &)> coriolis
 
static const double dt = 2.0
 
static const Rot3 kAttitude = Rot3::RzRyRx(0.1, 0.2, 0.3)
 
static const NavState kIdentity
 
static const Pose3 kPose (kAttitude, kPosition)
 
static const NavState kState1 (kAttitude, kPosition, kVelocity)
 
static const Vector9 kZeroXi = Vector9::Zero()
 

Detailed Description

Unit tests for NavState.

Author
Frank Dellaert
Date
July 2015

Definition in file testNavState.cpp.

Function Documentation

static const Vector3 kGravity ( ,
,
9.  81 
)
static
static const Vector3 kOmegaCoriolis ( 0.  02,
0.  03,
0.  04 
)
static
static const Point3 kPosition ( 1.  0,
2.  0,
3.  0 
)
static
static const Velocity3 kVelocity ( 0.  4,
0.  5,
0.  6 
)
static
int main ( void  )

Definition at line 268 of file testNavState.cpp.

TEST ( NavState  ,
Constructor   
)

Definition at line 38 of file testNavState.cpp.

TEST ( NavState  ,
Constructor2   
)

Definition at line 58 of file testNavState.cpp.

TEST ( NavState  ,
Attitude   
)

Definition at line 71 of file testNavState.cpp.

TEST ( NavState  ,
Position   
)

Definition at line 81 of file testNavState.cpp.

TEST ( NavState  ,
Velocity   
)

Definition at line 91 of file testNavState.cpp.

TEST ( NavState  ,
BodyVelocity   
)

Definition at line 101 of file testNavState.cpp.

TEST ( NavState  ,
Manifold   
)

Definition at line 111 of file testNavState.cpp.

TEST ( NavState  ,
Coriolis   
)

Definition at line 171 of file testNavState.cpp.

TEST ( NavState  ,
Coriolis2   
)

Definition at line 182 of file testNavState.cpp.

TEST ( NavState  ,
Coriolis3   
)

Consider a massless planet with an attached nav frame at n_omega = [0 0 1]', and a body at position n_t = [1 0 0]', travelling with velocity n_v = [0 1 0]'. Orient the body so that it is not instantaneously aligned with the nav frame (i.e., nRb != I_3x3). Test that first and second order Coriolis corrections are as expected.

Definition at line 195 of file testNavState.cpp.

TEST ( NavState  ,
CorrectPIM   
)

Definition at line 239 of file testNavState.cpp.

TEST ( NavState  ,
Stream   
)

Definition at line 253 of file testNavState.cpp.

Variable Documentation

boost::function<Vector9(const NavState&, const bool&)> coriolis
Initial value:
= boost::bind(
&NavState::coriolis, _1, dt, kOmegaCoriolis, _2, boost::none)
static const double dt
boost::function< Vector9(const NavState &, const bool &)> coriolis
static const Vector3 kOmegaCoriolis(0.02, 0.03, 0.04)

Definition at line 168 of file testNavState.cpp.

const double dt = 2.0
static

Definition at line 167 of file testNavState.cpp.

const Rot3 kAttitude = Rot3::RzRyRx(0.1, 0.2, 0.3)
static

Definition at line 27 of file testNavState.cpp.

const NavState kIdentity
static

Definition at line 31 of file testNavState.cpp.

const Pose3 kPose(kAttitude, kPosition)
static
const NavState kState1(kAttitude, kPosition, kVelocity)
static
const Vector9 kZeroXi = Vector9::Zero()
static

Definition at line 35 of file testNavState.cpp.



gtsam
Author(s):
autogenerated on Sat May 8 2021 02:51:41