@@ -213,7 +213,7 @@ def test_benchmark_vru(self):
213213
214214 smoother = sf .FixedIntervalSmoother (ains , cov_smoothing = True )
215215
216- euler_ains = []
216+ euler_ains , err_ains = [], []
217217 for f_i , w_i in zip (acc_imu , gyro_imu ):
218218 smoother .update (
219219 f_i ,
@@ -222,12 +222,15 @@ def test_benchmark_vru(self):
222222 )
223223
224224 euler_ains .append (smoother .ains .euler (degrees = True ))
225+ err_ains .append (smoother .ains .P .diagonal ())
225226
226227 # Forward filter state estimates
227228 euler_ains = np .array (euler_ains )
229+ err_ains = np .array (err_ains )
228230
229231 # Smoothed state estimates
230232 euler_smth = smoother .euler (degrees = True )
233+ err_smth = np .array ([P_i .diagonal () for P_i in smoother .P ])
231234
232235 # Half-sample shift
233236 # # (compensates for the delay introduced by Euler integration)
@@ -245,3 +248,6 @@ def test_benchmark_vru(self):
245248 euler_err_smth = np .std ((euler_smth - euler )[warmup :], axis = 0 )
246249 euler_err_ains = np .std ((euler_ains - euler )[warmup :], axis = 0 )
247250 np .testing .assert_array_less (euler_err_smth , euler_err_ains )
251+
252+ smoother .P .shape == (len (acc_imu ), 12 , 12 )
253+ np .testing .assert_array_less (err_smth [warmup :], err_ains [warmup :] + 1e-12 )
0 commit comments