mirror of
https://github.com/lbgos/rift-s-linux.git
synced 2026-10-23 20:00:24 +02:00
d/psvr: Fix 3DOF tracking
This commit is contained in:
1 parent
ca786df18c
commit
ec9ecf6332
2 files changed
+6
-3
No files matched your search
@@ -0,0 +1,2 @@
|
||||
psvr: We were sending in the wrong type of time to the 3DOF fusion code,
|
||||
switch to nanoseconds instead of fractions of seconds.
|
||||
@@ -320,12 +320,13 @@ update_fusion(struct psvr_device *psvr,
|
||||
|
||||
xrt_tracked_psvr_push_imu(psvr->tracker, timestamp_ns, &sample);
|
||||
} else {
|
||||
float delta_secs = tick_delta / PSVR_TICKS_PER_SECOND;
|
||||
|
||||
#if 1
|
||||
m_imu_3dof_update(&psvr->fusion, delta_secs, &psvr->read.accel,
|
||||
timepoint_ns now = os_monotonic_get_ns();
|
||||
m_imu_3dof_update(&psvr->fusion, now, &psvr->read.accel,
|
||||
&psvr->read.gyro);
|
||||
#else
|
||||
float delta_secs = tick_delta / PSVR_TICKS_PER_SECOND;
|
||||
|
||||
math_quat_integrate_velocity(&psvr->fusion.rot,
|
||||
&psvr->read.gyro, delta_secs,
|
||||
&psvr->fusion.rot);
|
||||
|
||||
Reference in new issue
Block a user