Copter: correct terrain-alt logging
Also change to using an out-of-band value upon no-terrain-alt-available
This commit is contained in:
parent
f7a168478d
commit
893b761533
@ -115,8 +115,8 @@ void Copter::Log_Write_Control_Tuning()
|
||||
// get terrain altitude
|
||||
float terr_alt = 0.0f;
|
||||
#if AP_TERRAIN_AVAILABLE && AC_TERRAIN
|
||||
if (terrain.height_above_terrain(terr_alt, true)) {
|
||||
terr_alt = 0.0f;
|
||||
if (!terrain.height_above_terrain(terr_alt, true)) {
|
||||
terr_alt = DataFlash.quiet_nan();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user