Macros | Functions
stateless_orientation_test.cpp File Reference
#include <imu_filter_madgwick/stateless_orientation.h>
#include "test_helpers.h"
Include dependency graph for stateless_orientation_test.cpp:

Go to the source code of this file.

Macros

#define TEST_STATELESS_ENU(in_am, exp_result)
 
#define TEST_STATELESS_NED(in_am, exp_result)
 
#define TEST_STATELESS_NWU(in_am, exp_result)
 

Functions

template<WorldFrame::WorldFrame FRAME>
bool computeOrientation (float Ax, float Ay, float Az, float Mx, float My, float Mz, double &q0, double &q1, double &q2, double &q3)
 
template<WorldFrame::WorldFrame FRAME>
bool computeOrientation (float Ax, float Ay, float Az, double &q0, double &q1, double &q2, double &q3)
 
 TEST (StatelessOrientationTest, Check_NoAccel)
 
 TEST (StatelessOrientationTest, Check_NoMag)
 

Macro Definition Documentation

#define TEST_STATELESS_ENU (   in_am,
  exp_result 
)
Value:
TEST(StatelessOrientationTest, Stationary_ENU_ ## in_am){ \
double q0, q1, q2, q3; \
ASSERT_TRUE(computeOrientation<WorldFrame::ENU>(in_am, q0, q1, q2, q3)); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL(q0, q1, q2, q3, exp_result); } \
TEST(StatelessOrientationTest, Stationary_ENU_NM_ ## in_am){ \
double q0, q1, q2, q3; \
ASSERT_TRUE(computeOrientation<WorldFrame::ENU>(ACCEL_ONLY(in_am), q0, q1, q2, q3)); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL_EX_Z(q0, q1, q2, q3, exp_result); }
#define ASSERT_QUAT_EQUAL_EX_Z(...)
Definition: test_helpers.h:70
#define ASSERT_IS_NORMALIZED(...)
Definition: test_helpers.h:64
TEST(StatelessOrientationTest, Check_NoAccel)
#define ASSERT_QUAT_EQUAL(...)
Definition: test_helpers.h:67
#define ACCEL_ONLY(ax, ay, az, mx, my, mz)
Definition: test_helpers.h:86

Definition at line 46 of file stateless_orientation_test.cpp.

#define TEST_STATELESS_NED (   in_am,
  exp_result 
)
Value:
TEST(StatelessOrientationTest, Stationary_NED_ ## in_am){ \
double q0, q1, q2, q3; \
ASSERT_TRUE(computeOrientation<WorldFrame::NED>(in_am, q0, q1, q2, q3)); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL(q0, q1, q2, q3, exp_result); } \
TEST(StatelessOrientationTest, Stationary_NED_NM_ ## in_am){ \
double q0, q1, q2, q3; \
ASSERT_TRUE(computeOrientation<WorldFrame::NED>(ACCEL_ONLY(in_am), q0, q1, q2, q3)); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL_EX_Z(q0, q1, q2, q3, exp_result); }
#define ASSERT_QUAT_EQUAL_EX_Z(...)
Definition: test_helpers.h:70
#define ASSERT_IS_NORMALIZED(...)
Definition: test_helpers.h:64
TEST(StatelessOrientationTest, Check_NoAccel)
#define ASSERT_QUAT_EQUAL(...)
Definition: test_helpers.h:67
#define ACCEL_ONLY(ax, ay, az, mx, my, mz)
Definition: test_helpers.h:86

Definition at line 58 of file stateless_orientation_test.cpp.

#define TEST_STATELESS_NWU (   in_am,
  exp_result 
)
Value:
TEST(StatelessOrientationTest, Stationary_NWU_ ## in_am){ \
double q0, q1, q2, q3; \
ASSERT_TRUE(computeOrientation<WorldFrame::NWU>(in_am, q0, q1, q2, q3)); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL(q0, q1, q2, q3, exp_result); } \
TEST(StatelessOrientationTest, Stationary_NWU_NM_ ## in_am){ \
double q0, q1, q2, q3; \
ASSERT_TRUE(computeOrientation<WorldFrame::NWU>(ACCEL_ONLY(in_am), q0, q1, q2, q3)); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL_EX_Z(q0, q1, q2, q3, exp_result); }
#define ASSERT_QUAT_EQUAL_EX_Z(...)
Definition: test_helpers.h:70
#define ASSERT_IS_NORMALIZED(...)
Definition: test_helpers.h:64
TEST(StatelessOrientationTest, Check_NoAccel)
#define ASSERT_QUAT_EQUAL(...)
Definition: test_helpers.h:67
#define ACCEL_ONLY(ax, ay, az, mx, my, mz)
Definition: test_helpers.h:86

Definition at line 70 of file stateless_orientation_test.cpp.

Function Documentation

template<WorldFrame::WorldFrame FRAME>
bool computeOrientation ( float  Ax,
float  Ay,
float  Az,
float  Mx,
float  My,
float  Mz,
double &  q0,
double &  q1,
double &  q2,
double &  q3 
)

Definition at line 6 of file stateless_orientation_test.cpp.

template<WorldFrame::WorldFrame FRAME>
bool computeOrientation ( float  Ax,
float  Ay,
float  Az,
double &  q0,
double &  q1,
double &  q2,
double &  q3 
)

Definition at line 27 of file stateless_orientation_test.cpp.

TEST ( StatelessOrientationTest  ,
Check_NoAccel   
)

Definition at line 101 of file stateless_orientation_test.cpp.

TEST ( StatelessOrientationTest  ,
Check_NoMag   
)

Definition at line 109 of file stateless_orientation_test.cpp.



imu_filter_madgwick
Author(s): Ivan Dryanovski
autogenerated on Thu Jun 18 2020 03:40:00