ExtendedKalmanFilter.smooth

giant.ufo.extended_kalman_filter:

ExtendedKalmanFilter.smooth(maximum_sigma_update=5)[source]

This method performs backwards smoothing (kind-of) for all measurements processed by this EKF.

This is done by starting at the end of the “arc” and processing the measurements that were already ingested in reverse order. In order to do this we need to negate the process noise (otherwise it causes the covariance to collapse instead of grow). We then step through each measurement in reverse order and reprocess it using process_measurement().

After calling the method, long_residuals and long_state_history will be twice as long and residuals and state_history will have the “smoothed” residuals and state history.

If we can’t complete the smoothing (because of NaN in the covariance) then this function will return False. If we did complete the smoothing it will return True

Parameters:

maximum_sigma_update (Real) – The maximum state update allowed expressed as a multiple of the pre-update covariance

Return type:

bool