`#include <imu_filter_madgwick/imu_filter.h>`
`#include <cmath>`
`#include "test_helpers.h"`

Go to the source code of this file.

Macros

#define FILTER_ITERATIONS   10000

#define TEST_STATIONARY_ENU(in_am, exp_result)

#define TEST_STATIONARY_NED(in_am, exp_result)

#define TEST_STATIONARY_NWU(in_am, exp_result)

Functions

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

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

int main (int argc, char **argv)

Macro Definition Documentation

 #define FILTER_ITERATIONS   10000

Definition at line 5 of file madgwick_test.cpp.

 #define TEST_STATIONARY_ENU ( in_am, exp_result )
Value:
double q0 = .5, q1 = .5, q2 = .5, q3 = .5; \
filterStationary<WorldFrame::ENU>(in_am, q0, q1, q2, q3); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL(q0, q1, q2, q3, exp_result); } \
double q0 = .5, q1 = .5, q2 = .5, q3 = .5; \
filterStationary<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
#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 55 of file madgwick_test.cpp.

 #define TEST_STATIONARY_NED ( in_am, exp_result )
Value:
double q0 = .5, q1 = .5, q2 = .5, q3 = .5; \
filterStationary<WorldFrame::NED>(in_am, q0, q1, q2, q3); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL(q0, q1, q2, q3, exp_result); } \
double q0 = .5, q1 = .5, q2 = .5, q3 = .5; \
filterStationary<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
#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 67 of file madgwick_test.cpp.

 #define TEST_STATIONARY_NWU ( in_am, exp_result )
Value:
double q0 = .5, q1 = .5, q2 = .5, q3 = .5; \
filterStationary<WorldFrame::NWU>(in_am, q0, q1, q2, q3); \
ASSERT_IS_NORMALIZED(q0, q1, q2, q3); \
ASSERT_QUAT_EQUAL(q0, q1, q2, q3, exp_result); } \
double q0 = .5, q1 = .5, q2 = .5, q3 = .5; \
filterStationary<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
#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 79 of file madgwick_test.cpp.

Function Documentation

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

Definition at line 9 of file madgwick_test.cpp.

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

Definition at line 33 of file madgwick_test.cpp.

 int main ( int argc, char ** argv )

Definition at line 118 of file madgwick_test.cpp.

 TEST ( MadgwickTest , TestQuatEqNoZ )

Definition at line 109 of file madgwick_test.cpp.