|
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 &altitude) |
| 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 34 of file VerticalVelocityEstimator.h.
| VerticalVelocityEstimator::VerticalVelocityEstimator | ( | NoiseVariances | noise = {1.0f, 0.1f} | ) |
Constructor.
| noise | Struct containing process and measurement noise variances.
|
Definition at line 10 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 172 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 176 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 180 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 192 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 184 of file VerticalVelocityEstimator.cpp.
|
virtual |
Definition at line 188 of file VerticalVelocityEstimator.cpp.
| void VerticalVelocityEstimator::init | ( | InitialState | initialState | ) |
Initialize the filter with an initial altitude and timestamp.
| initialState | Struct containing:
|
Definition at line 27 of file VerticalVelocityEstimator.cpp.
| void VerticalVelocityEstimator::update | ( | const AccelerationTriplet & | accel, |
| const DataPoint & | altitude ) |
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. |
| altitude | Altimeter reading. |
Definition at line 66 of file VerticalVelocityEstimator.cpp.