Class EKF¶
Defined in File ekf.h
Inheritance Relationships¶
Base Type¶
public lupnt::KalmanFilter(Class KalmanFilter)
Derived Type¶
public lupnt::UDUEKF(Class UDUEKF)
Class Documentation¶
-
class EKF : public lupnt::KalmanFilter¶
Extended Kalman Filter (EKF): linearized predict/update with Joseph-form covariance update, residual-based outlier rejection, and RTS smoothing.
The standard recursive estimator used throughout LuPNT’s navigation applications (e.g. LNSS receiver/satellite state estimation) — registered with the
Filterasset factory under the name"EKF"so it can be constructed from YAML config.Subclassed by lupnt::UDUEKF
Public Functions
-
EKF() = default¶
-
EKF(Config &config)¶
Construct an EKF from a YAML config node, reading the optional
outlier_thresholdfield (default 3.0 sigma).
-
virtual ~EKF() = default¶
-
void SetOutlierThreshold(double outlier_threshold)¶
Set the outlier-rejection threshold (in standard deviations of the normalized residual
dz_i / sqrt(S_ii)) used byRemoveOutliers.- Parameters:
outlier_threshold – Threshold in sigma; must be non-negative
-
void RemoveOutliers()¶
Drop measurement components whose normalized residual
|dz_i| / sqrt(S_ii)exceedsoutlier_threshold_, shrinkingdz_,H_,R_, and recomputingS_accordingly.Called by
Updateas the default fault-detection step (when no customf_fault_det_is registered viaSetFaultDetectionFunction), after the residualdz_and innovation covarianceS_have been computed but before the Kalman gain is applied.
-
virtual void Predict(Real t, const State *u = nullptr) override¶
EKF predict step: propagate
x_/P_viaf_dyn_(linearized by the returned STMF_) and add the process noiseQ_fromf_proc_, i.e.P_ = F_ P_ F_^T + Q_.
-
virtual void Update(const VecX &z_true) override¶
EKF update step: linearized measurement update with Joseph-form covariance propagation
P_ = (I - K H) P (I - K H)^T + K R K^T, including outlier rejection viaRemoveOutliers(or a registered fault-detection function) before the Kalman gainK_ = P H^T S^-1is applied.
-
virtual void InitializeLogger(int max_tidx) override¶
EKF implementation of
KalmanFilter::InitializeLogger: allocates thex_prior_log_/P_prior_log_/x_pos_log_/P_pos_log_/stm_log_/x_sm_/P_sm_buffers formax_tidxepochs.
-
virtual void InitializeSmootherState() override¶
EKF implementation of
KalmanFilter::InitializeSmootherState: seedsx_sm_/P_sm_at the final time index with the currentx_post_/P_post_.
-
virtual void LogFilterEstimate(int tidx) override¶
EKF implementation of
KalmanFilter::LogFilterEstimate: records the current prior/posterior state, covariance, and state-transition matrixF_at indextidx.
-
virtual void UpdateSmoother(int tidx) override¶
EKF implementation of
KalmanFilter::UpdateSmoother: standard RTS smoother recursion using the logged prior/posterior states, covariances, and state-transition matrices.
-
EKF() = default¶