diff --git a/src/shared/algorithms/ADA/ADA.cpp b/src/shared/algorithms/ADA/ADA.cpp index 0b61cd63a78b4b7467da965234622a93b538fefb..929cacc5b223e014a2347a933f82c3a92b1f6838 100644 --- a/src/shared/algorithms/ADA/ADA.cpp +++ b/src/shared/algorithms/ADA/ADA.cpp @@ -44,6 +44,15 @@ void ADA::update(const float pressure) updateState(); } +void ADA::update() +{ + // Update the Kalman filter + filter.predict(); + + // Convert filter data to altitudes and speeds + updateState(); +} + ADAState ADA::getState() { return state; } void ADA::setReferenceValues(const ReferenceValues reference) diff --git a/src/shared/algorithms/ADA/ADA.h b/src/shared/algorithms/ADA/ADA.h index 26072b16ac3b9c09196a9993ca1dcc332f98917a..5dc63c49c616c634078aff3a0195a18a2fb8775f 100644 --- a/src/shared/algorithms/ADA/ADA.h +++ b/src/shared/algorithms/ADA/ADA.h @@ -44,6 +44,11 @@ public: */ void update(const float pressure); + /** + * @brief Update the Kalman filter, skipping the correct step. + */ + void update(); + /** * @param state ADA state with altitude and Kalman parameters. */