forked from Archive/PX4-Autopilot
navigator: always make sure that we set target lat/lon for fixed wing
takeoff Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
parent
5286ed3a11
commit
af5c48b869
|
@ -365,9 +365,9 @@ Navigator::run()
|
|||
rep->current.lon = cmd.param6;
|
||||
|
||||
} else {
|
||||
// If one of them is non-finite, reset both
|
||||
rep->current.lat = (double)NAN;
|
||||
rep->current.lon = (double)NAN;
|
||||
// If one of them is non-finite set the current global position as target
|
||||
rep->current.lat = get_global_position()->lat;
|
||||
rep->current.lon = get_global_position()->lon;
|
||||
}
|
||||
|
||||
rep->current.alt = cmd.param7;
|
||||
|
|
Loading…
Reference in New Issue