1#ifndef APOGEE_DETECTOR_H
2#define APOGEE_DETECTOR_H
102 bool apogeeDetected_ =
false;
103 float apogeeThreshold_m_ = 1.0F;
105 float maxAltitude_ = 0.0F;
106 uint32_t maxAltitudeTimestamp_ = 0;
ApogeeDetector(float apogeeThreshold_m)
Constructs an ApogeeDetector with a custom drop threshold.
bool isApogeeDetected() const
Checks if apogee has been detected.
DataPoint getApogee() const
Retrieves the detected apogee.
float getEstimatedVelocity() const
Gets the current estimated vertical velocity.
int8_t getVerticalDirection() const
Gets the configured vertical direction (+1 or -1).
float getInertialVerticalAcceleration() const
Gets the current inertial vertical acceleration.
int8_t getVerticalAxis() const
Gets the configured vertical axis.
void update(VerticalVelocityEstimator *verticalVelocityEstimator)
Updates the detector using the latest estimated altitude and vertical velocity.
void init(ApogeeDetectorInitialState initialState)
Initializes the detector with the starting altitude and timestamp.
ApogeeDetector()
Constructs an ApogeeDetector with the default threshold of 1.0 meter.
float getEstimatedAltitude() const
Gets the current estimated altitude.
Timestamped float measurement container.
1D Kalman filter fusing altimeter and accelerometer data.
Represents the initial state for initializing the ApogeeDetector.
float initialAltitude
Initial altitude in meters.
uint32_t initialTimestamp
Initial timestamp in milliseconds.