aboutsummaryrefslogtreecommitdiff
path: root/src/survive_vive.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/survive_vive.c')
-rwxr-xr-xsrc/survive_vive.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c
index 030db8a..88b9fee 100755
--- a/src/survive_vive.c
+++ b/src/survive_vive.c
@@ -1127,6 +1127,17 @@ void survive_data_cb( SurviveUSBInterface * si )
acceldata[3], acceldata[4], acceldata[5],
0,0,0 };
+ //1G for accelerometer, from MPU6500 datasheet
+ //this can change if the firmware changes the sensitivity.
+ agm[0]/=8192.0f;
+ agm[1]/=8192.0f;
+ agm[2]/=8192.0f;
+
+ //1000 deg/s for gyroscope, from MPU6500 datasheet
+ agm[3]/=65.5f;
+ agm[4]/=65.5f;
+ agm[5]/=65.5f;
+
ctx->imuproc( obj, 3, agm, timecode, code );
}
}