Add Madgwick type aliases.
This commit is contained in:
parent
ce21bbd38a
commit
85833c354d
|
@ -0,0 +1,8 @@
|
|||
#ifndef __WRMATH_FILTER_H
|
||||
#define __WRMATH_FILTER_H
|
||||
|
||||
|
||||
#include <wrmath/filter/madgwick.h>
|
||||
|
||||
|
||||
#endif __WRMATH_FILTER_H
|
|
@ -98,6 +98,13 @@ private:
|
|||
};
|
||||
|
||||
|
||||
/// Madgwickd is a shorthand alias for a Madgwick<double>.
|
||||
typedef Madgwick<double> Madgwickd;
|
||||
|
||||
/// Madgwickf is a shorthand alias for a Madgwick<float>.
|
||||
typedef Madgwick<float> Madgwickf;
|
||||
|
||||
|
||||
} // namespace filter
|
||||
} // namespace wr
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ using namespace wr;
|
|||
|
||||
TEST(MadgwickFilter, SimpleAngularOrientation)
|
||||
{
|
||||
filter::Madgwick<double> mf;
|
||||
filter::Madgwickd mf;
|
||||
geom::Vector3d gyro {0.17453292519943295, 0.0, 0.0}; // 10° X rotation.
|
||||
geom::Quaterniond frame20Deg {0.984808, 0.173648, 0, 0}; // 20° final orientation.
|
||||
double delta = 0.00917; // assume 109 updates per second, as per the paper.
|
||||
|
|
Loading…
Reference in New Issue