|
Avionics
Core avionics package for CURE flight computers
|
Sliding-window launch detector based on acceleration magnitude. More...
#include <LaunchDetector.h>

Public Member Functions | |
| LaunchDetector (float accelerationThreshold_ms2, uint16_t windowSize_ms, uint16_t windowInterval_ms) | |
| int | update (AccelerationTriplet accel) |
| bool | isLaunched () |
| uint32_t | getLaunchedTime () |
| float | getMedianAccelerationSquared () |
| void | reset () |
| CircularArray< DataPoint, kCircularArrayAllocatedSlots > * | getWindowPtr () |
| float | getThreshold () |
| uint16_t | getWindowInterval () |
| uint16_t | getAcceptableTimeDifference () |
Sliding-window launch detector based on acceleration magnitude.
Predicts launch by looking for a sustained acceleration above a threshold It takes the median acceleration magnitude over a window of time and compares it to the threshold. Because of the size of the window, short spikes are ignored.
The window is a circular array / rolling window of acceleration magnitudes squared
The delay in launch detection will equal half the window size because the median will only be high once half the window is high
Definition at line 51 of file LaunchDetector.h.
| LaunchDetector::LaunchDetector | ( | float | accelerationThreshold_ms2, |
| uint16_t | windowSize_ms, | ||
| uint16_t | windowInterval_ms ) |
Constructor
| accelerationThreshold_ms2 | The threshold for acceleration to be considered a launch |
| windowSize_ms | The size of the window to calculate the median acceleration. The delay in launch detection will equal half the window size A window too small will cause false positives. |
| windowInterval_ms | The interval between acceleration value in the window You must be able to update the detector faster than this interval The detector will reject data that comes in faster than this interval to maintain this interval or slower |
Definition at line 24 of file LaunchDetector.cpp.
|
inline |
Definition at line 88 of file LaunchDetector.h.
|
inline |
Definition at line 75 of file LaunchDetector.h.
|
inline |
Definition at line 76 of file LaunchDetector.h.
|
inline |
Definition at line 85 of file LaunchDetector.h.
|
inline |
Definition at line 87 of file LaunchDetector.h.
|
inline |
Definition at line 83 of file LaunchDetector.h.
|
inline |
Definition at line 74 of file LaunchDetector.h.
| void LaunchDetector::reset | ( | ) |
Definition at line 192 of file LaunchDetector.cpp.
| int LaunchDetector::update | ( | AccelerationTriplet | accel | ) |
Updates the detector with new acceleration data
| accel | The newest acceleration data (triplet of x, y, and z acceleration data points) |
Definition at line 44 of file LaunchDetector.cpp.