WPILibC++ 2024.1.1-beta-4
frc::KalmanFilterLatencyCompensator< States, Inputs, Outputs, KalmanFilterType > Class Template Reference

#include <frc/estimator/KalmanFilterLatencyCompensator.h>

Classes

struct  ObserverSnapshot
 

Public Member Functions

void Reset ()
 Clears the observer snapshot buffer. More...
 
void AddObserverState (const KalmanFilterType &observer, Vectord< Inputs > u, Vectord< Outputs > localY, units::second_t timestamp)
 Add past observer states to the observer snapshots list. More...
 
template<int Rows>
void ApplyPastGlobalMeasurement (KalmanFilterType *observer, units::second_t nominalDt, Vectord< Rows > y, std::function< void(const Vectord< Inputs > &u, const Vectord< Rows > &y)> globalMeasurementCorrect, units::second_t timestamp)
 Add past global measurements (such as from vision)to the estimator. More...
 

Member Function Documentation

◆ AddObserverState()

template<int States, int Inputs, int Outputs, typename KalmanFilterType >
void frc::KalmanFilterLatencyCompensator< States, Inputs, Outputs, KalmanFilterType >::AddObserverState ( const KalmanFilterType &  observer,
Vectord< Inputs >  u,
Vectord< Outputs >  localY,
units::second_t  timestamp 
)
inline

Add past observer states to the observer snapshots list.

Parameters
observerThe observer.
uThe input at the timestamp.
localYThe local output at the timestamp
timestampThe timesnap of the state.

◆ ApplyPastGlobalMeasurement()

template<int States, int Inputs, int Outputs, typename KalmanFilterType >
template<int Rows>
void frc::KalmanFilterLatencyCompensator< States, Inputs, Outputs, KalmanFilterType >::ApplyPastGlobalMeasurement ( KalmanFilterType *  observer,
units::second_t  nominalDt,
Vectord< Rows >  y,
std::function< void(const Vectord< Inputs > &u, const Vectord< Rows > &y)>  globalMeasurementCorrect,
units::second_t  timestamp 
)
inline

Add past global measurements (such as from vision)to the estimator.

Parameters
observerThe observer to apply the past global measurement.
nominalDtThe nominal timestep.
yThe measurement.
globalMeasurementCorrectThe function take calls correct() on the observer.
timestampThe timestamp of the measurement.

◆ Reset()

template<int States, int Inputs, int Outputs, typename KalmanFilterType >
void frc::KalmanFilterLatencyCompensator< States, Inputs, Outputs, KalmanFilterType >::Reset ( )
inline

Clears the observer snapshot buffer.


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