Fix ITD angle wrapping past 360°

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alex
2026-04-12 21:52:07 -05:00
parent cae14023b7
commit 8073e3eb02

View File

@@ -124,6 +124,7 @@ class SpatialTracker:
itd_angle, self._last_itd_samples = itd_result
self._smooth_itd_angle += SMOOTHING_ALPHA * (
self._shortest_angle_diff(itd_angle, self._smooth_itd_angle))
self._smooth_itd_angle %= 360 # keep in 0-360
if pos and any_vad:
# Smooth the position