Rely on laser altitude once valid

This commit is contained in:
Lorenz Meier 2014-08-31 17:58:43 +02:00
parent c17c585c3e
commit 0e954b30c2
1 changed files with 1 additions and 1 deletions

View File

@ -823,7 +823,7 @@ float FixedwingPositionControl::get_relative_landingalt(float land_setpoint_alt,
* the measurement is valid * the measurement is valid
* the estimated relative altitude (from global altitude estimate and landing waypoint) <= range_finder_use_relative_alt * the estimated relative altitude (from global altitude estimate and landing waypoint) <= range_finder_use_relative_alt
*/ */
if (range_finder_use_relative_alt < 0 || !range_finder.valid || rel_alt_estimated > range_finder_use_relative_alt ) { if (range_finder_use_relative_alt < 0 || !range_finder.valid || range_finder.distance > range_finder_use_relative_alt ) {
return rel_alt_estimated; return rel_alt_estimated;
} }