update comments

This commit is contained in:
Jacob Dahl 2025-07-16 13:28:47 -08:00
parent 34a643fcda
commit fbb5f220bd
2 changed files with 2 additions and 2 deletions

View File

@ -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;
}

View File

@ -1618,7 +1618,7 @@ void EKF2::PublishLocalPosition(const hrt_abstime &timestamp)
#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();