|
Avionics
Core avionics package for CURE flight computers
|
Predicts time‑to‑apogee and altitude‑at‑apogee from real‑time kinematics. More...
#include <ApogeePredictor.h>

Public Member Functions | |
| ApogeePredictor (const VerticalVelocityEstimator &velocityEstimator, float accelFilterAlpha=0.2F, float minimumClimbVelocity_mps=1.0F) | |
| void | update () |
| void | quadUpdate () |
| void | polyUpdate () |
| void | analyticUpdate () |
| void | simulateUpdate () |
| bool | isPredictionValid () const |
| float | getTimeToApogee_s () const |
| uint32_t | getPredictedApogeeTimestamp_ms () const |
| float | getPredictedApogeeAltitude_m () const |
| float | getFilteredDeceleration () const |
| float | getDragCoefficient () const |
Predicts time‑to‑apogee and altitude‑at‑apogee from real‑time kinematics.
The predictor treats the current deceleration (loss of vertical velocity) as constant and analytically projects forward:
t_apogee = v / |a| (time until v → 0) h_apogee = h + v·t − ½|a|t²
where v and a are the filtered estimates of vertical velocity and net vertical acceleration supplied by the VerticalVelocityEstimator.
To damp sensor noise, we run a single‑pole low‑pass filter on the measured deceleration magnitude. Call update() after each estimator refresh.
Definition at line 27 of file ApogeePredictor.h.
|
explicit |
| velocityEstimator | Reference to the velocity estimator |
| accelFilterAlpha | EMA weight for smoothing deceleration [0–1] |
| minimumClimbVelocity_mps | Minimum upward velocity (m/s) for a valid prediction |
Definition at line 26 of file ApogeePredictor.cpp.
| void ApogeePredictor::analyticUpdate | ( | ) |
Definition at line 173 of file ApogeePredictor.cpp.
|
nodiscard |
Definition at line 308 of file ApogeePredictor.cpp.
|
nodiscard |
Definition at line 304 of file ApogeePredictor.cpp.
|
nodiscard |
Definition at line 300 of file ApogeePredictor.cpp.
|
nodiscard |
Definition at line 296 of file ApogeePredictor.cpp.
|
nodiscard |
Definition at line 292 of file ApogeePredictor.cpp.
|
nodiscard |
Definition at line 290 of file ApogeePredictor.cpp.
| void ApogeePredictor::polyUpdate | ( | ) |
Definition at line 106 of file ApogeePredictor.cpp.
| void ApogeePredictor::quadUpdate | ( | ) |
Optional: Update using a quadratic-drag model (more accurate under drag)
Definition at line 76 of file ApogeePredictor.cpp.
| void ApogeePredictor::simulateUpdate | ( | ) |
Definition at line 232 of file ApogeePredictor.cpp.
| void ApogeePredictor::update | ( | ) |
Call after every estimator refresh to update prediction
Definition at line 41 of file ApogeePredictor.cpp.