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

std::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

◆ kGravity()

static const Vector3 kGravity ( ,
,
9.  81 
)
static

◆ kOmegaCoriolis()

static const Vector3 kOmegaCoriolis ( 0.  02,
0.  03,
0.  04 
)
static

◆ kPosition()

static const Point3 kPosition ( 1.  0,
2.  0,
3.  0 
)
static

◆ kVelocity()

static const Velocity3 kVelocity ( 0.  4,
0.  5,
0.  6 
)
static

◆ main()

int main ( void  )

Definition at line 276 of file testNavState.cpp.

◆ TEST() [1/12]

TEST ( NavState  ,
Constructor   
)

Definition at line 40 of file testNavState.cpp.

◆ TEST() [2/12]

TEST ( NavState  ,
Constructor2   
)

Definition at line 60 of file testNavState.cpp.

◆ TEST() [3/12]

TEST ( NavState  ,
Attitude   
)

Definition at line 73 of file testNavState.cpp.

◆ TEST() [4/12]

TEST ( NavState  ,
Position   
)

Definition at line 83 of file testNavState.cpp.

◆ TEST() [5/12]

TEST ( NavState  ,
Velocity   
)

Definition at line 94 of file testNavState.cpp.

◆ TEST() [6/12]

TEST ( NavState  ,
BodyVelocity   
)

Definition at line 105 of file testNavState.cpp.

◆ TEST() [7/12]

TEST ( NavState  ,
Manifold   
)

Definition at line 116 of file testNavState.cpp.

◆ TEST() [8/12]

TEST ( NavState  ,
Coriolis   
)

Definition at line 178 of file testNavState.cpp.

◆ TEST() [9/12]

TEST ( NavState  ,
Coriolis2   
)

Definition at line 189 of file testNavState.cpp.

◆ TEST() [10/12]

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 202 of file testNavState.cpp.

◆ TEST() [11/12]

TEST ( NavState  ,
CorrectPIM   
)

Definition at line 246 of file testNavState.cpp.

◆ TEST() [12/12]

TEST ( NavState  ,
Stream   
)

Definition at line 261 of file testNavState.cpp.

Variable Documentation

◆ coriolis

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

Definition at line 174 of file testNavState.cpp.

◆ dt

const double dt = 2.0
static

Definition at line 173 of file testNavState.cpp.

◆ kAttitude

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

Definition at line 29 of file testNavState.cpp.

◆ kIdentity

const NavState kIdentity
static

Definition at line 33 of file testNavState.cpp.

◆ kPose

const Pose3 kPose(kAttitude, kPosition)
static

◆ kState1

const NavState kState1(kAttitude, kPosition, kVelocity)
static

◆ kZeroXi

const Vector9 kZeroXi = Vector9::Zero()
static

Definition at line 37 of file testNavState.cpp.



gtsam
Author(s):
autogenerated on Tue Jul 4 2023 02:40:56