|
Avionics
Core avionics package for CURE flight computers
|
1D Kalman filter fusing altimeter and accelerometer data. More...
#include <VerticalVelocityEstimator.h>

Public Member Functions | |
| VerticalVelocityEstimator (NoiseVariances noise={1.0f, 0.1f}) | |
| void | init (InitialState initialState) |
| void | update (const AccelerationTriplet &accel, const DataPoint &altimeter) |
| virtual float | getEstimatedAltitude () const |
| virtual float | getEstimatedVelocity () const |
| virtual uint32_t | getTimestamp () const |
| virtual float | getInertialVerticalAcceleration () const |
| virtual int8_t | getVerticalAxis () const |
| virtual int8_t | getVerticalDirection () const |
1D Kalman filter fusing altimeter and accelerometer data.
Maintains altitude and vertical velocity by treating vertical acceleration as the control input. Gravity is subtracted from raw accelerometer readings to obtain inertial acceleration. Call update() with new IMU + baro samples and query the latest estimates via getters.
Definition at line 37 of file VerticalVelocityEstimator.h.
| VerticalVelocityEstimator::VerticalVelocityEstimator | ( | NoiseVariances | noise = {1.0f, 0.1f} | ) |
Constructor.
| noise | Struct containing process and measurement noise variances.
|
Definition at line 8 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 151 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 155 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 159 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 171 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 163 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 167 of file VerticalVelocityEstimator.cpp.
| void VerticalVelocityEstimator::init | ( | InitialState | initialState | ) |
Initialize the filter with an initial altitude and timestamp.
| initialState | Struct containing:
|
Definition at line 25 of file VerticalVelocityEstimator.cpp.
| void VerticalVelocityEstimator::update | ( | const AccelerationTriplet & | accel, |
| const DataPoint & | altimeter ) |
Update the estimator with new sensor data.
The three acceleration DataPoints correspond to x, y, and z (vertical) axes. The altimeter DataPoint contains the altitude measurement.
| accel | Accelerometer readings for x, y, and z (vertical) axes. |
| altimeter | Altimeter reading. |
Definition at line 59 of file VerticalVelocityEstimator.cpp.