diff --git a/filterpy/kalman/unscented_transform.py b/filterpy/kalman/unscented_transform.py index 8019136..c3538f3 100644 --- a/filterpy/kalman/unscented_transform.py +++ b/filterpy/kalman/unscented_transform.py @@ -69,10 +69,9 @@ def state_mean(sigmas, Wm): def residual(a, b): y = a[0] - b[0] + y = y % (2 * np.pi) if y > np.pi: y -= 2*np.pi - if y < -np.pi: - y = 2*np.pi return y