Skip to content

Commit 2ff494b

Browse files
example with AINS
1 parent f9c6261 commit 2ff494b

1 file changed

Lines changed: 25 additions & 10 deletions

File tree

docs/user_guide/quickstart.rst

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -256,17 +256,32 @@ The :class:`~smsfusion.FixedIntervalSmoother` implements fixed-interval smoothin
256256
for an :class:`~smsfusion.AidedINS` instance or one of its subclasses (:class:`~smsfusion.AHRS`
257257
or :class:`~smsfusion.VRU`). After a complete forward pass using the AINS algorithm,
258258
the smoother applies a backward pass using the Rauch-Tung-Striebel (RTS) algorithm [1]
259-
to refine the state (and covariance) estimates.
259+
to refine the state (and covariance) estimates:
260260

261+
.. code-block:: python
262+
263+
import smsfusion as sf
264+
265+
smoother = sf.FixedIntervalSmoother(ains)
266+
267+
for f_i, w_i, p_i, h_i in zip(acc_imu, gyro_imu, pos_aid, head_aid):
268+
smoother.update(
269+
f_i,
270+
w_i,
271+
degrees=False,
272+
pos=p_i,
273+
pos_var=pos_noise_std**2 * np.ones(3),
274+
head=h_i,
275+
head_var=head_noise_std**2,
276+
head_degrees=False,
277+
)
261278
279+
pos_est = smoother.position()
280+
vel_est = smoother.velocity()
281+
euler_est = smoother.euler(degrees=False)
262282
263-
Smoothing is a post-processing technique used to enhance the accuracy of Kalman
264-
filter state estimates by incorporating both past and future measurements to produce
265-
more accurate estimates. This is in contrast to the standard Kalman filter algorithm,
266-
which only uses past and current measurements to produce estimates at each time step.
267283
268-
The :class:`~smsfusion.FixedIntervalSmoother` provides a fixed-interval smoothing
269-
layer for the :class:`~smsfusion.AidedINS` class and its subclasses (:class:`~smsfusion.AHRS`
270-
and :class:`~smsfusion.VRU`). After the initial forward pass with the AINS algorithm,
271-
the smoother performs a backward sweep with the Rauch-Tung-Striebel (RTS) algorithm [1]
272-
to refine the filter estimates.
284+
References
285+
----------
286+
[1] R. G. Brown and P. Y. C. Hwang, "Random signals and applied Kalman filtering
287+
with MATLAB exercises", 4th ed. Wiley, pp. 208-212, 2012.

0 commit comments

Comments
 (0)