From 8a857affbcc2405eac9b75c0ecb7ce50f61222c6 Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Tue, 6 Jan 2026 22:30:15 -0500 Subject: [PATCH 1/6] Remove drift compensation --- .../src/main/java/dev/slimevr/VRServer.kt | 18 -- .../slimevr/config/DriftCompensationConfig.kt | 26 --- .../main/java/dev/slimevr/config/VRConfig.kt | 3 - .../protocol/datafeed/DataFeedBuilder.java | 12 +- .../dev/slimevr/protocol/rpc/RPCHandler.kt | 22 --- .../rpc/settings/RPCSettingsBuilder.java | 20 +- .../rpc/settings/RPCSettingsHandler.kt | 11 -- .../dev/slimevr/tracking/trackers/Tracker.kt | 20 +- .../tracking/trackers/TrackerResetsHandler.kt | 185 +----------------- 9 files changed, 11 insertions(+), 306 deletions(-) delete mode 100644 server/core/src/main/java/dev/slimevr/config/DriftCompensationConfig.kt diff --git a/server/core/src/main/java/dev/slimevr/VRServer.kt b/server/core/src/main/java/dev/slimevr/VRServer.kt index 4db758d06d..6929434841 100644 --- a/server/core/src/main/java/dev/slimevr/VRServer.kt +++ b/server/core/src/main/java/dev/slimevr/VRServer.kt @@ -223,7 +223,6 @@ class VRServer @JvmOverloads constructor( queueTask { humanPoseManager.trackerUpdated(tracker) updateSkeletonModel() - refreshTrackersDriftCompensationEnabled() configManager.vrConfig.writeTrackerConfig(tracker) configManager.saveConfig() } @@ -281,7 +280,6 @@ class VRServer @JvmOverloads constructor( if (tracker.isComputed) { vMCHandler.addComputedTracker(tracker) } - refreshTrackersDriftCompensationEnabled() } @ThreadSecure @@ -441,22 +439,6 @@ class VRServer @JvmOverloads constructor( return null } - fun clearTrackersDriftCompensation() { - for (t in allTrackers) { - if (t.isImu()) { - t.resetsHandler.clearDriftCompensation() - } - } - } - - fun refreshTrackersDriftCompensationEnabled() { - for (t in allTrackers) { - if (t.isImu()) { - t.resetsHandler.refreshDriftCompensationEnabled() - } - } - } - fun trackerStatusChanged(tracker: Tracker, oldStatus: TrackerStatus, newStatus: TrackerStatus) { trackerStatusListeners.forEach { it.onTrackerStatusChanged(tracker, oldStatus, newStatus) } } diff --git a/server/core/src/main/java/dev/slimevr/config/DriftCompensationConfig.kt b/server/core/src/main/java/dev/slimevr/config/DriftCompensationConfig.kt deleted file mode 100644 index adced65a46..0000000000 --- a/server/core/src/main/java/dev/slimevr/config/DriftCompensationConfig.kt +++ /dev/null @@ -1,26 +0,0 @@ -package dev.slimevr.config - -import dev.slimevr.VRServer - -class DriftCompensationConfig { - - // Is drift compensation enabled - var enabled = false - - // Is drift prediction enabled - var prediction = false - - // Amount of drift compensation applied - var amount = 0.8f - - // Max resets for the calculated average drift - var maxResets = 6 - - fun updateTrackersDriftCompensation() { - for (t in VRServer.instance.allTrackers) { - if (t.isImu()) { - t.resetsHandler.readDriftCompensationConfig(this) - } - } - } -} diff --git a/server/core/src/main/java/dev/slimevr/config/VRConfig.kt b/server/core/src/main/java/dev/slimevr/config/VRConfig.kt index 9ef33f5e00..a960725ddc 100644 --- a/server/core/src/main/java/dev/slimevr/config/VRConfig.kt +++ b/server/core/src/main/java/dev/slimevr/config/VRConfig.kt @@ -19,8 +19,6 @@ class VRConfig { val filters: FiltersConfig = FiltersConfig() - val driftCompensation: DriftCompensationConfig = DriftCompensationConfig() - val oscRouter: OSCConfig = OSCConfig() val vrcOSC: VRCOSCConfig = VRCOSCConfig() @@ -108,7 +106,6 @@ class VRConfig { if (tracker.userEditable) { val config = getTracker(tracker) tracker.readConfig(config) - if (tracker.isImu()) tracker.resetsHandler.readDriftCompensationConfig(driftCompensation) tracker.resetsHandler.readResetConfig(resetsConfig) if (tracker.allowReset) { tracker.saveMountingResetOrientation(config) diff --git a/server/core/src/main/java/dev/slimevr/protocol/datafeed/DataFeedBuilder.java b/server/core/src/main/java/dev/slimevr/protocol/datafeed/DataFeedBuilder.java index c6545dd68e..8bed48fcfa 100644 --- a/server/core/src/main/java/dev/slimevr/protocol/datafeed/DataFeedBuilder.java +++ b/server/core/src/main/java/dev/slimevr/protocol/datafeed/DataFeedBuilder.java @@ -136,17 +136,7 @@ public static int createTrackerInfos( // TODO need support: TrackerInfo.addPollRate(fbb, tracker.); - if (tracker.isImu()) { - TrackerInfo.addIsImu(fbb, true); - TrackerInfo - .addAllowDriftCompensation( - fbb, - tracker.getResetsHandler().getAllowDriftCompensation() - ); - } else { - TrackerInfo.addIsImu(fbb, false); - TrackerInfo.addAllowDriftCompensation(fbb, false); - } + TrackerInfo.addIsImu(fbb, tracker.isImu()); if (tracker.getAllowMounting()) { Quaternion quaternion = tracker.getResetsHandler().getMountingOrientation(); diff --git a/server/core/src/main/java/dev/slimevr/protocol/rpc/RPCHandler.kt b/server/core/src/main/java/dev/slimevr/protocol/rpc/RPCHandler.kt index cb246da09b..4a3175638e 100644 --- a/server/core/src/main/java/dev/slimevr/protocol/rpc/RPCHandler.kt +++ b/server/core/src/main/java/dev/slimevr/protocol/rpc/RPCHandler.kt @@ -58,11 +58,6 @@ class RPCHandler(private val api: ProtocolAPI) : ProtocolHandler(0) - private var driftTimes = CircularArrayList(0) - private var totalDriftTime: Long = 0 - private var driftSince: Long = 0 - private var timeAtLastReset: Long = 0 - private var compensateDrift = false - private var driftPrediction = false - private var driftCompensationEnabled = false private var armsResetMode = ArmsResetModes.BACK private var yawResetSmoothTime = 0.0f var saveMountingReset = false var resetHmdPitch = false - var allowDriftCompensation = false var lastResetQuaternion: Quaternion? = null // Manual mounting orientation @@ -108,47 +91,6 @@ class TrackerResetsHandler(val tracker: Tracker) { */ private var tposeDownFix = Quaternion.IDENTITY - /** - * Reads/loads drift compensation settings from given config - */ - fun readDriftCompensationConfig(config: DriftCompensationConfig) { - compensateDrift = false - driftPrediction = config.prediction - driftAmount = config.amount - val maxResets = config.maxResets - - if (compensateDrift && maxResets != driftQuats.capacity()) { - driftQuats = CircularArrayList(maxResets) - driftTimes = CircularArrayList(maxResets) - } - - refreshDriftCompensationEnabled() - } - - /** - * Clears drift compensation data - */ - fun clearDriftCompensation() { - driftSince = 0L - timeAtLastReset = 0L - totalDriftTime = 0L - driftQuats.clear() - driftTimes.clear() - } - - /** - * Checks for compensateDrift, allowDriftCompensation, and if - * a computed head tracker exists. - */ - fun refreshDriftCompensationEnabled() { - driftCompensationEnabled = compensateDrift && - allowDriftCompensation && - TrackerUtils.getNonInternalNonImuTrackerForBodyPosition( - VRServer.instance.allTrackers, - TrackerPosition.HEAD, - ) != null - } - /** * Reads/loads reset settings from the given config */ @@ -166,16 +108,16 @@ class TrackerResetsHandler(val tracker: Tracker) { } /** - * Takes a rotation and adjusts it to resets, mounting, - * and drift compensation, with the HMD as the reference. + * Takes a rotation and adjusts it to resets and mounting with the HMD as the + * reference. */ - fun getReferenceAdjustedDriftRotationFrom(rotation: Quaternion): Quaternion = adjustToDrift(adjustToReference(rotation)) + fun getReferenceAdjustedRotationFrom(rotation: Quaternion): Quaternion = adjustToReference(rotation) /** * Takes a rotation and adjusts it to resets and mounting, * with the identity Quaternion as the reference. */ - fun getIdentityAdjustedDriftRotationFrom(rotation: Quaternion): Quaternion = adjustToDrift(adjustToIdentity(rotation)) + fun getIdentityAdjustedRotationFrom(rotation: Quaternion): Quaternion = adjustToIdentity(rotation) /** * Get the reference adjusted accel. @@ -220,21 +162,6 @@ class TrackerResetsHandler(val tracker: Tracker) { return rot } - /** - * Adjust the given rotation for drift compensation if enabled, - * and returns it - */ - private fun adjustToDrift(rotation: Quaternion): Quaternion { - if (driftCompensationEnabled && totalDriftTime > 0) { - var driftTimeRatio = ((System.currentTimeMillis() - driftSince).toFloat() / totalDriftTime) - if (!driftPrediction) { - driftTimeRatio = min(1.0f, driftTimeRatio) - } - return averagedDriftQuat.pow(driftAmount * driftTimeRatio) * rotation - } - return rotation - } - /** * Reset the tracker so that its current rotation is counted as (0, HMD Yaw, * 0). This allows the tracker to be strapped to body at any pitch and roll. @@ -312,15 +239,13 @@ class TrackerResetsHandler(val tracker: Tracker) { attachmentFix *= HalfHorizontal } - makeIdentityAdjustmentQuatsFull() - // Don't adjust yaw if head and computed if (tracker.trackerPosition != TrackerPosition.HEAD || !tracker.isComputed) { yawFix = gyroFix * reference.project(Vector3.POS_Y).unit() tracker.yawResetSmoothing.reset() } - calculateDrift(oldRot) + makeIdentityAdjustmentQuatsFull() // Reset Stay Aligned (before resetting filtering, which depends on the // tracker's rotation) @@ -365,8 +290,6 @@ class TrackerResetsHandler(val tracker: Tracker) { makeIdentityAdjustmentQuatsYaw() - calculateDrift(oldRot) - // Start at yaw before reset if smoothing enabled if (yawResetSmoothTime > 0.0f) { tracker.yawResetSmoothing.interpolate( @@ -399,7 +322,7 @@ class TrackerResetsHandler(val tracker: Tracker) { constraintFix = Quaternion.IDENTITY // Get the current calibrated rotation - var rotBuf = adjustToDrift(tracker.getRawRotation()) + var rotBuf = tracker.getRawRotation() rotBuf *= attachmentFix rotBuf = mountingOrientation.inv() * rotBuf * mountingOrientation rotBuf = yawFix * rotBuf @@ -498,100 +421,4 @@ class TrackerResetsHandler(val tracker: Tracker) { sensorRotation *= attachmentFixNoMounting yawFixZeroReference = fixGyroscope(sensorRotation) } - - /** - * Calculates drift since last reset and store the data related to it in - * driftQuat and timeAtLastReset - */ - private fun calculateDrift(beforeQuat: Quaternion) { - if (driftCompensationEnabled) { - val rotQuat = adjustToReference(tracker.getRawRotation()) - - if (driftSince > 0 && System.currentTimeMillis() - timeAtLastReset > DRIFT_COOLDOWN_MS) { - // Check and remove from lists to keep them under the reset limit - if (driftQuats.size == driftQuats.capacity()) { - driftQuats.removeLast() - driftTimes.removeLast() - } - - // Add new drift quaternion - driftQuats.add(getYawQuaternion(rotQuat) / getYawQuaternion(beforeQuat)) - - // Add drift time to total - driftTimes.add(System.currentTimeMillis() - driftSince) - totalDriftTime = 0 - for (time in driftTimes) { - totalDriftTime += time - } - - // Calculate drift Quaternions' weights - val driftWeights = ArrayList(driftTimes.size) - for (time in driftTimes) { - driftWeights.add(time.toFloat() / totalDriftTime.toFloat()) - } - - // Make it so recent Quaternions weigh more - for (i in driftWeights.size - 1 downTo 1) { - // Add some of i-1's value to i - driftWeights[i] = driftWeights[i] + driftWeights[i - 1] / driftWeights.size - // Remove the value that was added to i from i-1 - driftWeights[i - 1] = driftWeights[i - 1] - driftWeights[i - 1] / driftWeights.size - } - - // Set final averaged drift Quaternion - averagedDriftQuat = fromAveragedQuaternions(driftQuats, driftWeights) - - // Save tracker rotation and current time - rotationSinceReset = driftQuats.latest - timeAtLastReset = System.currentTimeMillis() - } else if (System.currentTimeMillis() - timeAtLastReset < DRIFT_COOLDOWN_MS && driftQuats.size > 0) { - // Replace latest drift quaternion - rotationSinceReset *= (getYawQuaternion(rotQuat) / getYawQuaternion(beforeQuat)) - driftQuats[driftQuats.size - 1] = rotationSinceReset - - // Add drift time to total - driftTimes[driftTimes.size - 1] = driftTimes.latest + System.currentTimeMillis() - driftSince - totalDriftTime = 0 - for (time in driftTimes) { - totalDriftTime += time - } - - // Calculate drift Quaternions' weights - val driftWeights = ArrayList(driftTimes.size) - for (time in driftTimes) { - driftWeights.add(time.toFloat() / totalDriftTime.toFloat()) - } - - // Make it so recent Quaternions weigh more - for (i in driftWeights.size - 1 downTo 1) { - // Add some of i-1's value to i - driftWeights[i] = driftWeights[i] + driftWeights[i - 1] / driftWeights.size - // Remove the value that was added to i from i-1 - driftWeights[i - 1] = driftWeights[i - 1] - driftWeights[i - 1] / driftWeights.size - } - - // Set final averaged drift Quaternion - averagedDriftQuat = fromAveragedQuaternions(driftQuats, driftWeights) - } else { - timeAtLastReset = System.currentTimeMillis() - } - - driftSince = System.currentTimeMillis() - } - } - - /** - * Calculates and returns the averaged Quaternion - * from the given Quaternions and weights. - */ - private fun fromAveragedQuaternions( - qn: CircularArrayList, - tn: ArrayList, - ): Quaternion { - var totalMatrix = qn[0].toMatrix() * tn[0] - for (i in 1 until qn.size) { - totalMatrix += (qn[i].toMatrix() * tn[i]) - } - return totalMatrix.toQuaternion() - } } From 3287f1ee7d45af0a545a7733d9a68e9e5e1606a5 Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Tue, 6 Jan 2026 23:15:43 -0500 Subject: [PATCH 2/6] Remove drift compensation from TrackerConfig --- server/core/src/main/java/dev/slimevr/config/TrackerConfig.kt | 2 -- 1 file changed, 2 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/config/TrackerConfig.kt b/server/core/src/main/java/dev/slimevr/config/TrackerConfig.kt index 7770bec6be..7ac3e23125 100644 --- a/server/core/src/main/java/dev/slimevr/config/TrackerConfig.kt +++ b/server/core/src/main/java/dev/slimevr/config/TrackerConfig.kt @@ -15,7 +15,6 @@ class TrackerConfig { var adjustment: ObjectQuaternion? = null var mountingOrientation: ObjectQuaternion? = null var mountingResetOrientation: ObjectQuaternion? = null - var allowDriftCompensation: Boolean? = null /** * Only checked if [ServerConfig.useMagnetometerOnAllTrackers] enabled @@ -27,7 +26,6 @@ class TrackerConfig { constructor(tracker: Tracker) { this.designation = if (tracker.trackerPosition != null) tracker.trackerPosition!!.designation else null this.customName = tracker.customName - allowDriftCompensation = tracker.isImu() shouldHaveMagEnabled = tracker.isImu() } From 66c151200ffc363082775ff3d8bf1c30617fc1d8 Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Tue, 6 Jan 2026 23:23:24 -0500 Subject: [PATCH 3/6] Remove drift compensation from GUI & translation --- gui/public/i18n/en/translation.ftl | 30 ------------------- .../pages/mounting/ManualMounting.tsx | 1 - .../trackers-assign/TrackerAssignment.tsx | 1 - .../components/tracker/TrackerSettings.tsx | 3 -- 4 files changed, 35 deletions(-) diff --git a/gui/public/i18n/en/translation.ftl b/gui/public/i18n/en/translation.ftl index c54b92788d..a35b836231 100644 --- a/gui/public/i18n/en/translation.ftl +++ b/gui/public/i18n/en/translation.ftl @@ -292,9 +292,6 @@ widget-overlay = Overlay widget-overlay-is_visible_label = Show Overlay in SteamVR widget-overlay-is_mirrored_label = Display Overlay as Mirror -## Widget: Drift compensation -widget-drift_compensation-clear = Clear drift compensation - ## Widget: Clear Mounting calibration widget-clear_mounting = Clear mounting calibration @@ -384,9 +381,6 @@ tracker-settings-assignment_section-edit = Edit assignment tracker-settings-mounting_section = Mounting orientation tracker-settings-mounting_section-description = Where is the tracker mounted? tracker-settings-mounting_section-edit = Edit mounting -tracker-settings-drift_compensation_section = Allow drift compensation -tracker-settings-drift_compensation_section-description = Should this tracker compensate for its drift when drift compensation is enabled? -tracker-settings-drift_compensation_section-edit = Allow drift compensation tracker-settings-use_mag = Allow magnetometer on this tracker # Multiline! tracker-settings-use_mag-description = @@ -540,29 +534,6 @@ settings-general-tracker_mechanics-filtering-type-prediction = Prediction settings-general-tracker_mechanics-filtering-type-prediction-description = Reduces latency and makes movements more snappy, but may increase jitter. settings-general-tracker_mechanics-filtering-amount = Amount settings-general-tracker_mechanics-yaw-reset-smooth-time = Yaw reset smooth time (0s disables smoothing) -settings-general-tracker_mechanics-drift_compensation = Drift compensation -# This cares about multilines -settings-general-tracker_mechanics-drift_compensation-description = - Compensates for IMU yaw drift by applying an inverse rotation. - Change the amount of compensation and the number of resets taken into account. - This should only be used if you need to reset very often! -settings-general-tracker_mechanics-drift_compensation-enabled-label = Drift compensation -settings-general-tracker_mechanics-drift_compensation-prediction = Drift compensation prediction -# This cares about multilines -settings-general-tracker_mechanics-drift_compensation-prediction-description = - Predicts yaw drift compensation beyond previously measured range. - Enable this if your trackers are continuously spinning on the yaw axis. -settings-general-tracker_mechanics-drift_compensation-prediction-label = Drift compensation prediction -settings-general-tracker_mechanics-drift_compensation_warning = - Warning: Only use drift compensation if you need to reset - very often (every ~5-10 minutes). - - Some IMUs prone to frequent resets include: - Joy-Cons, owoTrack, and MPUs (without recent firmware). -settings-general-tracker_mechanics-drift_compensation_warning-cancel = Cancel -settings-general-tracker_mechanics-drift_compensation_warning-done = I understand -settings-general-tracker_mechanics-drift_compensation-amount-label = Compensation amount -settings-general-tracker_mechanics-drift_compensation-max_resets-label = Use up to x last resets settings-general-tracker_mechanics-save_mounting_reset = Save automatic mounting calibration settings-general-tracker_mechanics-save_mounting_reset-description = Saves the automatic mounting calibration for the trackers between restarts. Useful @@ -582,7 +553,6 @@ settings-stay_aligned = Stay Aligned settings-stay_aligned-description = Stay Aligned reduces drift by gradually adjusting your trackers to match your relaxed poses. settings-stay_aligned-setup-label = Setup Stay Aligned settings-stay_aligned-setup-description = You must complete "Setup Stay Aligned" to enable Stay Aligned. -settings-stay_aligned-warnings-drift_compensation = ⚠ Please turn off Drift Compensation! Drift Compensation will conflict with Stay Aligned. settings-stay_aligned-enabled-label = Adjust trackers settings-stay_aligned-hide_yaw_correction-label = Hide adjustment (to compare with no Stay Aligned) settings-stay_aligned-general-label = General diff --git a/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx b/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx index 366b8ba3e1..b81d3d7f62 100644 --- a/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx +++ b/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx @@ -56,7 +56,6 @@ export function ManualMountingPage() { mountingOrientationDegrees ); assignreq.trackerId = td.tracker.trackerId; - assignreq.allowDriftCompensation = false; sendRPCPacket(RpcMessage.AssignTrackerRequest, assignreq); Sentry.metrics.count('manual_mounting_set', 1, { diff --git a/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx b/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx index 2039a06fd1..3a14217691 100644 --- a/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx +++ b/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx @@ -216,7 +216,6 @@ export function TrackersAssignPage() { assignreq.bodyPosition = role; assignreq.mountingOrientation = rotation; assignreq.trackerId = trackerId; - assignreq.allowDriftCompensation = false; sendRPCPacket(RpcMessage.AssignTrackerRequest, assignreq); }; diff --git a/gui/src/components/tracker/TrackerSettings.tsx b/gui/src/components/tracker/TrackerSettings.tsx index bba3e36fc1..4c350173b0 100644 --- a/gui/src/components/tracker/TrackerSettings.tsx +++ b/gui/src/components/tracker/TrackerSettings.tsx @@ -85,7 +85,6 @@ export function TrackerSettingsPage() { ); assignreq.bodyPosition = tracker?.tracker.info?.bodyPart || BodyPart.NONE; assignreq.trackerId = tracker?.tracker.trackerId; - assignreq.allowDriftCompensation = false; sendRPCPacket(RpcMessage.AssignTrackerRequest, assignreq); setSelectRotation(false); }; @@ -96,7 +95,6 @@ export function TrackerSettingsPage() { const assignreq = new AssignTrackerRequestT(); assignreq.bodyPosition = role; assignreq.trackerId = tracker?.tracker.trackerId; - assignreq.allowDriftCompensation = false; sendRPCPacket(RpcMessage.AssignTrackerRequest, assignreq); setSelectBodypart(false); }; @@ -116,7 +114,6 @@ export function TrackerSettingsPage() { assignreq.displayName = trackerName ?? null; assignreq.trackerId = tracker?.tracker.trackerId; - assignreq.allowDriftCompensation = false; sendRPCPacket(RpcMessage.AssignTrackerRequest, assignreq); }; From ffc8ac94e4840f226ba590b5b4540f2cbf32521b Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Tue, 6 Jan 2026 23:28:05 -0500 Subject: [PATCH 4/6] Remove last remnants of drift compensation --- .../java/dev/slimevr/tracking/trackers/Tracker.kt | 8 ++++---- .../tracking/trackers/TrackerResetsHandler.kt | 12 +++++------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/tracking/trackers/Tracker.kt b/server/core/src/main/java/dev/slimevr/tracking/trackers/Tracker.kt index 0d69ba018d..3c3579a8a2 100644 --- a/server/core/src/main/java/dev/slimevr/tracking/trackers/Tracker.kt +++ b/server/core/src/main/java/dev/slimevr/tracking/trackers/Tracker.kt @@ -270,7 +270,7 @@ class Tracker @JvmOverloads constructor( /** * Gets the adjusted tracker rotation after the resetsHandler's corrections - * (reset, mounting and drift compensation). + * (reset and mounting). * This is the rotation that is applied on the SlimeVR skeleton bones. * Warning: This performs several Quaternion multiplications, so calling * it too much should be avoided for performance reasons. @@ -285,7 +285,7 @@ class Tracker @JvmOverloads constructor( // Reset if needed and is not computed and internal return if (allowReset && !(isComputed && isInternal) && trackerDataType == TrackerDataType.ROTATION) { - // Adjust to reset, mounting and drift compensation + // Adjust to reset and mounting resetsHandler.getReferenceAdjustedRotationFrom(rot) } else { rot @@ -305,7 +305,7 @@ class Tracker @JvmOverloads constructor( // Reset if needed and is not computed and internal return if (allowReset && !(isComputed && isInternal) && trackerDataType == TrackerDataType.ROTATION) { - // Adjust to reset, mounting and drift compensation + // Adjust to reset and mounting resetsHandler.getReferenceAdjustedRotationFrom(rot) } else { rot @@ -314,7 +314,7 @@ class Tracker @JvmOverloads constructor( /** * Gets the identity-adjusted tracker rotation after the resetsHandler's corrections - * (identity reset, drift and identity mounting). + * (identity reset and identity mounting). * This is used for debugging/visualizing tracker data */ fun getIdentityAdjustedRotation(): Quaternion { diff --git a/server/core/src/main/java/dev/slimevr/tracking/trackers/TrackerResetsHandler.kt b/server/core/src/main/java/dev/slimevr/tracking/trackers/TrackerResetsHandler.kt index dfbcb9237e..51e5251cad 100644 --- a/server/core/src/main/java/dev/slimevr/tracking/trackers/TrackerResetsHandler.kt +++ b/server/core/src/main/java/dev/slimevr/tracking/trackers/TrackerResetsHandler.kt @@ -10,7 +10,7 @@ import io.github.axisangles.ktmath.Quaternion import io.github.axisangles.ktmath.Vector3 import kotlin.math.* -/** Class taking care of full reset, yaw reset, mounting reset, and drift compensation logic. */ +/** Class taking care of full reset, yaw reset, and mounting reset logic. */ class TrackerResetsHandler(val tracker: Tracker) { private val HalfHorizontal = EulerAngles( @@ -187,9 +187,8 @@ class TrackerResetsHandler(val tracker: Tracker) { Quaternion.IDENTITY } - // Old rot for drift compensation - val oldRot = adjustToReference(tracker.getRawRotation()) - lastResetQuaternion = oldRot + // Old rot for drift logging + lastResetQuaternion = adjustToReference(tracker.getRawRotation()) // Adjust raw rotation to mountingOrientation val rotation = tracker.getRawRotation() @@ -280,9 +279,8 @@ class TrackerResetsHandler(val tracker: Tracker) { return } - // Old rot for drift compensation - val oldRot = adjustToReference(tracker.getRawRotation()) - lastResetQuaternion = oldRot + // Old rot for drift logging + lastResetQuaternion = adjustToReference(tracker.getRawRotation()) val yawFixOld = yawFix yawFix = fixYaw(tracker.getRawRotation(), reference) From ea2b208f66010103786b3445a286c27ca4faa703 Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Thu, 8 Jan 2026 14:50:48 -0500 Subject: [PATCH 5/6] Use SolarXR PR --- .../dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java | 1 - .../dev/slimevr/protocol/rpc/settings/RPCSettingsHandler.kt | 2 +- solarxr-protocol | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java b/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java index b09ef457ca..3b6346fb0e 100644 --- a/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java +++ b/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsBuilder.java @@ -352,7 +352,6 @@ public static int createSettingsResponse(FlatBufferBuilder fbb, VRServer server) fbb, server.configManager.getVrConfig().getFilters() ), - 0, RPCSettingsBuilder .createOSCRouterSettings( fbb, diff --git a/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsHandler.kt b/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsHandler.kt index 309abbea63..ec1046e006 100644 --- a/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsHandler.kt +++ b/server/core/src/main/java/dev/slimevr/protocol/rpc/settings/RPCSettingsHandler.kt @@ -380,7 +380,7 @@ class RPCSettingsHandler(var rpcHandler: RPCHandler, var api: ProtocolAPI) { val settings = SettingsResponse .createSettingsResponse( fbb, - RPCSettingsBuilder.createSteamVRSettings(fbb, bridge), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + RPCSettingsBuilder.createSteamVRSettings(fbb, bridge), 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ) val outbound = rpcHandler.createRPCMessage(fbb, RpcMessage.SettingsResponse, settings) diff --git a/solarxr-protocol b/solarxr-protocol index 10a0ea778c..cb151b36a3 160000 --- a/solarxr-protocol +++ b/solarxr-protocol @@ -1 +1 @@ -Subproject commit 10a0ea778cff8a50f7985f41f97541bbe30d2469 +Subproject commit cb151b36a34e77f00bc5b4adb2fa6dbf8a951990 From 028ef9d3a91a7b19ac8896f317bea494fedef5ff Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Thu, 8 Jan 2026 15:21:20 -0500 Subject: [PATCH 6/6] Fix GUI --- gui/src/components/onboarding/pages/mounting/ManualMounting.tsx | 1 - .../onboarding/pages/trackers-assign/TrackerAssignment.tsx | 2 -- 2 files changed, 3 deletions(-) diff --git a/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx b/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx index b81d3d7f62..e79629d810 100644 --- a/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx +++ b/gui/src/components/onboarding/pages/mounting/ManualMounting.tsx @@ -176,7 +176,6 @@ export function ManualMountingPageStayAligned({ mountingOrientationDegrees ); assignreq.trackerId = td.tracker.trackerId; - assignreq.allowDriftCompensation = false; sendRPCPacket(RpcMessage.AssignTrackerRequest, assignreq); Sentry.metrics.count('manual_mounting_set', 1, { diff --git a/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx b/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx index 3a14217691..efb89c2646 100644 --- a/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx +++ b/gui/src/components/onboarding/pages/trackers-assign/TrackerAssignment.tsx @@ -112,7 +112,6 @@ export function TrackersAssignPage() { null, null, null, - null, newTapSettings ) ); @@ -128,7 +127,6 @@ export function TrackersAssignPage() { null, null, null, - null, newTapSettings ) );