From db41a20170bb7f77959b9901a31582ad2ba93db7 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Tue, 3 Apr 2018 23:30:47 -0600 Subject: Madgwick code integrated --- include/libsurvive/survive_imu.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libsurvive/survive_imu.h b/include/libsurvive/survive_imu.h index a37a4df..e7a3d90 100644 --- a/include/libsurvive/survive_imu.h +++ b/include/libsurvive/survive_imu.h @@ -9,14 +9,23 @@ extern "C" { #endif +struct SurviveIMUTracker_p; + typedef struct { FLT updir[3]; - LinmathVec3d current_velocity; // Velocity in world frame + FLT accel_scale_bias; + + LinmathVec3d current_velocity; // Velocity in world frame + LinmathVec3d current_velocity_lp; // Velocity in world frame PoserDataIMU last_data; SurvivePose pose; + LinmathPoint3d pos_lp; SurvivePose lastGT; uint32_t lastGTTime; + + float integralFBx, integralFBy, integralFBz; // integral error terms scaled by Ki + } SurviveIMUTracker; void survive_imu_tracker_set_pose(SurviveIMUTracker *tracker, uint32_t timecode, SurvivePose *pose); -- cgit v1.2.3