aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-04-03 23:30:47 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-04-03 23:30:47 -0600
commitdb41a20170bb7f77959b9901a31582ad2ba93db7 (patch)
treea01f0d6b95b5446bf3760ec2d8e1812151b48ad6 /include
parent75460f240c9d003e4ca2e6dda9b2146a74df7ffa (diff)
downloadlibsurvive-db41a20170bb7f77959b9901a31582ad2ba93db7.tar.gz
libsurvive-db41a20170bb7f77959b9901a31582ad2ba93db7.tar.bz2
Madgwick code integrated
Diffstat (limited to 'include')
-rw-r--r--include/libsurvive/survive_imu.h11
1 files changed, 10 insertions, 1 deletions
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);