mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-07 00:31:35 +08:00
update comments
This commit is contained in:
@@ -108,7 +108,7 @@ void Ekf::updateTerrainValidity()
|
|||||||
float hagl_var = INFINITY;
|
float hagl_var = INFINITY;
|
||||||
sym::ComputeHaglInnovVar(P, 0.f, &hagl_var);
|
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)))) {
|
if ((hagl_var > 0.f) && (hagl_var < sq(fmaxf(0.1f * getHagl(), 0.5f)))) {
|
||||||
small_relative_hagl_var = true;
|
small_relative_hagl_var = true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1618,7 +1618,7 @@ void EKF2::PublishLocalPosition(const hrt_abstime ×tamp)
|
|||||||
|
|
||||||
#if defined(CONFIG_EKF2_TERRAIN)
|
#if defined(CONFIG_EKF2_TERRAIN)
|
||||||
// Distance to bottom surface (ground) in meters, must be positive
|
// 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_valid = _ekf.isTerrainEstimateValid();
|
||||||
lpos.dist_bottom = math::max(_ekf.getHagl(), 0.f);
|
lpos.dist_bottom = math::max(_ekf.getHagl(), 0.f);
|
||||||
lpos.dist_bottom_var = _ekf.getTerrainVariance();
|
lpos.dist_bottom_var = _ekf.getTerrainVariance();
|
||||||
|
|||||||
Reference in New Issue
Block a user