From fbb5f220bd65d16c711ac49ae74e5e4166e2ee94 Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Wed, 16 Jul 2025 13:28:47 -0800 Subject: [PATCH] update comments --- src/modules/ekf2/EKF/terrain_control.cpp | 2 +- src/modules/ekf2/EKF2.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/ekf2/EKF/terrain_control.cpp b/src/modules/ekf2/EKF/terrain_control.cpp index 4149a962dd..747686febd 100644 --- a/src/modules/ekf2/EKF/terrain_control.cpp +++ b/src/modules/ekf2/EKF/terrain_control.cpp @@ -108,7 +108,7 @@ void Ekf::updateTerrainValidity() float hagl_var = INFINITY; sym::ComputeHaglInnovVar(P, 0.f, &hagl_var); - // TODO: quantigy this hagl_var check + // TODO: quantify this hagl_var check if ((hagl_var > 0.f) && (hagl_var < sq(fmaxf(0.1f * getHagl(), 0.5f)))) { small_relative_hagl_var = true; } diff --git a/src/modules/ekf2/EKF2.cpp b/src/modules/ekf2/EKF2.cpp index 3f21b86bb8..a40127f616 100644 --- a/src/modules/ekf2/EKF2.cpp +++ b/src/modules/ekf2/EKF2.cpp @@ -1618,7 +1618,7 @@ void EKF2::PublishLocalPosition(const hrt_abstime ×tamp) #if defined(CONFIG_EKF2_TERRAIN) // Distance to bottom surface (ground) in meters, must be positive - // TODO: review + // TODO: review -- we should merge getHagl() and isTerrainEstimateValid() since they must always be used together lpos.dist_bottom_valid = _ekf.isTerrainEstimateValid(); lpos.dist_bottom = math::max(_ekf.getHagl(), 0.f); lpos.dist_bottom_var = _ekf.getTerrainVariance();