Skip to content

Commit ceb2ff3

Browse files
committed
Fix accel & make rest detection more lenient
1 parent d702cb2 commit ceb2ff3

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

server/core/src/main/java/dev/slimevr/reset/accel/RecordingWrapper.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ data class RecordingWrapper(val tracker: Tracker, var moving: Boolean = false) {
5050
// Conditions to start or remain moving
5151
// TODO: Add rotation as a rest metric
5252
moving = if (moving) {
53-
stats.mean >= 0.1f || stats.standardDeviation >= 0.2f
53+
stats.mean >= 0.2f || stats.standardDeviation >= 0.25f
5454
} else {
5555
stats.mean >= 0.3f || new.accel.len() - stats.mean >= 0.6f
5656
}

server/core/src/main/java/dev/slimevr/tracking/trackers/TrackerResetsHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ class TrackerResetsHandler(val tracker: Tracker) {
194194
// make acceleration worse, so I'm just leaving this until we work that out. The
195195
// output of this will be world space, but with an unknown offset to heading (yaw).
196196
// - Butterscotch
197-
fun getReferenceAdjustedAccel(rawRot: Quaternion, accel: Vector3): Vector3 = rawRot.sandwich(accel)
197+
fun getReferenceAdjustedAccel(rawRot: Quaternion, accel: Vector3): Vector3 = (gyroFix * mountRotFix.inv() * yawFix * rawRot).sandwich(accel)
198198

199199
/**
200200
* Converts raw or filtered rotation into reference- and

0 commit comments

Comments
 (0)