EKF2: add validity flags to global pos message (#23787)

Co-authored-by: Mathieu Bresciani <brescianimathieu@gmail.com>
This commit is contained in:
Marco Hauswirth
2024-10-23 10:19:04 +02:00
committed by GitHub
co-authored by Mathieu Bresciani
parent 808153b049
commit 0c451552c7
16 changed files with 87 additions and 102 deletions
+1 -1
View File
@@ -298,7 +298,7 @@ bool Ekf::resetGlobalPosToExternalObservation(const double latitude, const doubl
Vector3f pos_correction;
// apply a first order correction using velocity at the delayed time horizon and the delta time
if ((timestamp_observation > 0) && local_position_is_valid()) {
if ((timestamp_observation > 0) && isLocalHorizontalPositionValid()) {
timestamp_observation = math::min(_time_latest_us, timestamp_observation);