mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-25 16:56:25 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user