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();