@@ -13,7 +13,7 @@ traffic.algorithms.filters
1313 default = noisy_landing.filter("default").assign(type="default")
1414 aggressive = noisy_landing.filter("aggressive").assign(type="aggressive")
1515
16- domain = ["raw data", "default", "aggressive"]
16+ domain = ["raw data", "default", "aggressive", "Kalman filter", "Kalman smoother" ]
1717
1818 features = [
1919 "altitude (in ft)",
@@ -71,6 +71,10 @@ traffic comes with some pre-implemented filters to be passed to the
7171 trajectories extracted from the OpenSky database (with their most common
7272 glitches)
7373
74+ .. code :: python
75+
76+ noisy_landing.filter()
77+
7478 .. jupyter-execute ::
7579 :hide-code:
7680
@@ -79,11 +83,55 @@ traffic comes with some pre-implemented filters to be passed to the
7983- ``"aggressive" `` is a composition of several filters which may result in
8084 smoother trajectories.
8185
86+ .. code :: python
87+
88+ noisy_landing.filter(" aggressive" )
89+
8290 .. jupyter-execute ::
8391 :hide-code:
8492
8593 chart(aggressive)
8694
95+ - :class: `~traffic.algorithms.filters.kalman.KalmanFilter6D ` is a Kalman filter
96+ applied to the 6D state vector (latitude, longitude, altitude, track angle,
97+ groundspeed, vertical rate)
98+
99+ .. code :: python
100+
101+ from traffic.algorithms.filters.kalman import KalmanFilter6D
102+
103+ # The Kalman filter needs first a projection in x, y
104+ from cartes.crs import EuroPP
105+
106+ noisy_landing.compute_xy(EuroPP()).filter(KalmanFilter6D())
107+
108+ .. jupyter-execute ::
109+ :hide-code:
110+
111+ from traffic.algorithms.filters.kalman import KalmanFilter6D
112+
113+ noisy_landing_xy = noisy_landing.compute_xy()
114+ kalman = noisy_landing_xy.filter(KalmanFilter6D()).assign(type="Kalman filter")
115+ chart(kalman)
116+
117+ - :class: `~traffic.algorithms.filters.kalman.KalmanSmoother6D ` is a Kalman
118+ smoother (a two-pass filter averaging the covariance of the errors on both
119+ sides) applied to the 6D state vector (latitude, longitude, altitude, track
120+ angle, groundspeed, vertical rate)
121+
122+ .. code :: python
123+
124+ from traffic.algorithms.filters.kalman import KalmanSmoother6D
125+
126+ noisy_landing.compute_xy(EuroPP()).filter(KalmanSmoother6D())
127+
128+ .. jupyter-execute ::
129+ :hide-code:
130+
131+ from traffic.algorithms.filters.kalman import KalmanSmoother6D
132+
133+ smoother = noisy_landing_xy.filter(KalmanSmoother6D()).assign(type="Kalman smoother")
134+ chart(smoother)
87135
88136API reference
89137-------------
0 commit comments