From 4d7c4e6033f3a7399e4f6352f9c471ee1d762ae9 Mon Sep 17 00:00:00 2001 From: Justin Berger Date: Fri, 29 Jun 2018 21:12:02 +0000 Subject: Added imu pose to surviveobject --- include/libsurvive/survive.h | 1 + src/survive_default_devices.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/include/libsurvive/survive.h b/include/libsurvive/survive.h index ed439cb..8f4e33e 100644 --- a/include/libsurvive/survive.h +++ b/include/libsurvive/survive.h @@ -102,6 +102,7 @@ struct SurviveObject { survive_timecode last_lighttime; // May be a 24- or 32- bit number depending on what device. FLT imu_freq; + SurvivePose relative_imu_pose; FLT *acc_bias; // size is FLT*3. contains x,y,z FLT *acc_scale; // size is FLT*3. contains x,y,z FLT *gyro_bias; // size is FLT*3. contains x,y,z diff --git a/src/survive_default_devices.c b/src/survive_default_devices.c index 8ecff0b..76e8f36 100644 --- a/src/survive_default_devices.c +++ b/src/survive_default_devices.c @@ -23,6 +23,8 @@ survive_create_device(SurviveContext *ctx, const char *driver_name, device->imu_freq = VIVE_DEFAULT_IMU_HZ; device->haptic = fn; + device->relative_imu_pose.Rot[0] = 1.; + return device; } -- cgit v1.3.1