Auterion App SDK
Auterion SDK is a library that can be used by AuterionOS apps to communicate with the system.
Loading...
Searching...
No Matches
auterion::LosFilter Class Reference

A filter for estimating Line-of-Sight (LOS) vectors and their rates. More...

#include <auterion_sdk/tracking/los_filter/los_filter.hpp>

Public Member Functions

 LosFilter ()
 Default constructor.
 
void init ()
 Initializes the filter without an initial LOS vector.
 
void init (const Eigen::Vector3f &los_init, float los_std_init=0.1f, float los_rate_std_init=0.1f)
 Initializes the filter with a given LOS vector.
 
bool isInitialized () const
 Checks whether the filter has been initialized.
 
void reset ()
 Resets the filter to the uninitialized state, clearing state and covariance.
 
void predict (float dt, float los_rate_process_nsd=0.1f)
 Predicts the next state of the filter based on elapsed time.
 
void update (const Eigen::Vector3f &los_measurement, float los_variance)
 Updates the filter state with a new LOS measurement.
 
void update (const Eigen::Vector3f &los_measurement, const Eigen::Matrix3f &measurement_cov)
 Updates the filter state with a new LOS measurement and a full measurement covariance.
 
void resetLos (const Eigen::Vector3f &los, float los_std=0.1f)
 Moves the LOS estimate while keeping the estimated LOS rate.
 
Eigen::Vector3f getLOS () const
 Gets the current estimated LOS vector.
 
Eigen::Vector3f getLOSRate () const
 Gets the current estimated LOS rate.
 
const Eigen::MatrixXf getCovariance () const
 Gets the covariance matrix of the state.
 
Eigen::Matrix< float, 3, 2 > getTangentBasis () const
 Gets the world-frame tangent-plane basis of the LOS.
 
Eigen::Matrix2f getThetaCovariance () const
 Gets the covariance of the LOS error states, in the getTangentBasis() frame.
 
Eigen::Vector3f getLOSInnov () const
 Gets the LOS innovation (difference between measurement and prediction).
 
Eigen::Vector3f getLOSInnovVar () const
 Gets the variance of the LOS innovation.
 
Eigen::MatrixXf getStateVariance () const
 Gets the state variance matrix.
 
Eigen::MatrixXf getLOSVariance () const
 Gets the variance of the LOS estimates.
 
Eigen::MatrixXf getLOSRateVariance () const
 Gets the variance of the LOS rate estimates.
 

Detailed Description

A filter for estimating Line-of-Sight (LOS) vectors and their rates.

This class provides functionality for initializing, predicting, and updating the state of a LOS estimation filter. It maintains covariance information and provides access to various state variables.

Constructor & Destructor Documentation

◆ LosFilter()

auterion::LosFilter::LosFilter ( )

Default constructor.

Initializes an instance of the LosFilter.

Member Function Documentation

◆ getCovariance()

const Eigen::MatrixXf auterion::LosFilter::getCovariance ( ) const

Gets the covariance matrix of the state.

Returns
State covariance matrix.

◆ getLOS()

Eigen::Vector3f auterion::LosFilter::getLOS ( ) const

Gets the current estimated LOS vector.

Returns
Estimated LOS vector.

◆ getLOSInnov()

Eigen::Vector3f auterion::LosFilter::getLOSInnov ( ) const

Gets the LOS innovation (difference between measurement and prediction).

Returns
LOS innovation vector.

◆ getLOSInnovVar()

Eigen::Vector3f auterion::LosFilter::getLOSInnovVar ( ) const

Gets the variance of the LOS innovation.

Returns
LOS innovation variance vector.

◆ getLOSRate()

Eigen::Vector3f auterion::LosFilter::getLOSRate ( ) const

Gets the current estimated LOS rate.

Returns
Estimated LOS rate vector.

◆ getLOSRateVariance()

Eigen::MatrixXf auterion::LosFilter::getLOSRateVariance ( ) const

Gets the variance of the LOS rate estimates.

Returns
LOS rate variance matrix.

◆ getLOSVariance()

Eigen::MatrixXf auterion::LosFilter::getLOSVariance ( ) const

Gets the variance of the LOS estimates.

Returns
LOS variance matrix.

◆ getStateVariance()

Eigen::MatrixXf auterion::LosFilter::getStateVariance ( ) const

Gets the state variance matrix.

Returns
State variance matrix.

◆ getTangentBasis()

Eigen::Matrix< float, 3, 2 > auterion::LosFilter::getTangentBasis ( ) const

Gets the world-frame tangent-plane basis of the LOS.

The two columns are the unit directions the LOS error states perturb the LOS along: both orthogonal to getLOS() and right-handed with it. Together with getThetaCovariance() they give the LOS direction covariance T * C * T^T. This is the filter's own tangent frame and cannot be reconstructed from getLOS() alone.

Returns
3x2 matrix whose columns span the plane orthogonal to the LOS.

◆ getThetaCovariance()

Eigen::Matrix2f auterion::LosFilter::getThetaCovariance ( ) const

Gets the covariance of the LOS error states, in the getTangentBasis() frame.

Returns
2x2 LOS error covariance (rad^2).

◆ init()

void auterion::LosFilter::init ( const Eigen::Vector3f &  los_init,
float  los_std_init = 0.1f,
float  los_rate_std_init = 0.1f 
)

Initializes the filter with a given LOS vector.

Parameters
los_initInitial Line-of-Sight (LOS) vector.
los_std_initInitial LOS state standard deviation (rad). Defaults to 0.1.
los_rate_std_initInitial LOS rate state standard deviation (rad/s). Defaults to 0.1.

◆ isInitialized()

bool auterion::LosFilter::isInitialized ( ) const

Checks whether the filter has been initialized.

Returns
True if init() has been called and reset() has not been called since.

◆ predict()

void auterion::LosFilter::predict ( float  dt,
float  los_rate_process_nsd = 0.1f 
)

Predicts the next state of the filter based on elapsed time.

Parameters
dtTime step for prediction (in seconds).
los_rate_process_nsdLOS rate noise spectral density in rad/(s * sqrt(Hz)). Defaults to 0.1.

◆ resetLos()

void auterion::LosFilter::resetLos ( const Eigen::Vector3f &  los,
float  los_std = 0.1f 
)

Moves the LOS estimate while keeping the estimated LOS rate.

Applies the minimal world-frame rotation onto the given LOS, which carries the rate estimate with it, re-seeds the LOS variance and clears the LOS/rate cross-covariance. The rate variance is left untouched. Intended for small anchor corrections, where a full init() would throw away a rate estimate that is still valid. Behaves as init() if the filter has not been initialized.

Parameters
losNew LOS vector.
los_stdLOS state standard deviation to re-seed with (rad). Defaults to 0.1.

◆ update() [1/2]

void auterion::LosFilter::update ( const Eigen::Vector3f &  los_measurement,
const Eigen::Matrix3f &  measurement_cov 
)

Updates the filter state with a new LOS measurement and a full measurement covariance.

Anisotropic measurement noise is weighted along its actual direction instead of inflating every axis. Use this when the dominant error has a known direction, for example an attitude-rate error (omega x los) * dt.

Parameters
los_measurementMeasured LOS vector.
measurement_covMeasurement covariance in world axes. Must be positive definite: the component along the LOS itself is unobservable and only keeps the update well conditioned. A covariance that is not positive definite leaves the filter untouched.

◆ update() [2/2]

void auterion::LosFilter::update ( const Eigen::Vector3f &  los_measurement,
float  los_variance 
)

Updates the filter state with a new LOS measurement.

Parameters
los_measurementMeasured LOS vector.
los_varianceMeasurement variance.

The documentation for this class was generated from the following file: