diff --git a/src/FlightDisplay/FlightDisplayViewMap.qml b/src/FlightDisplay/FlightDisplayViewMap.qml index 372d7f4d53e62edfebba105e3c2e09a5364f1555..b0a10636cfdbb9c0f1150979c8f9d791d67c29f1 100644 --- a/src/FlightDisplay/FlightDisplayViewMap.qml +++ b/src/FlightDisplay/FlightDisplayViewMap.qml @@ -369,7 +369,7 @@ FlightMap { clickMenu.coord = clickCoord clickMenu.popup() } else if (guidedActionsController.showGotoLocation) { - _guidedLocationCoordinate = clickCoord + gotoLocationItem.show(clickCoord) guidedActionsController.confirmAction(guidedActionsController.actionGoto, clickCoord) } else if (guidedActionsController.showOrbit) { orbitMapCircle.show(clickCoord) diff --git a/src/Vehicle/Vehicle.cc b/src/Vehicle/Vehicle.cc index cd12a23557a9813a092bdb574269ec631beb63b0..a23251c353e4d9cc61a02dd5fc750e578eb352ab 100644 --- a/src/Vehicle/Vehicle.cc +++ b/src/Vehicle/Vehicle.cc @@ -2777,15 +2777,6 @@ void Vehicle::guidedModeOrbit(const QGeoCoordinate& centerCoord, double radius, return; } - double lat, lon, alt; - if (centerCoord.isValid()) { - lat = lon = alt = qQNaN(); - } else { - lat = centerCoord.latitude(); - lon = centerCoord.longitude(); - alt = amslAltitude; - } - if (capabilityBits() && MAV_PROTOCOL_CAPABILITY_COMMAND_INT) { sendMavCommandInt(defaultComponentId(), MAV_CMD_DO_ORBIT, @@ -2795,7 +2786,7 @@ void Vehicle::guidedModeOrbit(const QGeoCoordinate& centerCoord, double radius, qQNaN(), // Use default velocity 0, // Vehicle points to center qQNaN(), // reserved - lat, lon, alt); + centerCoord.latitude(), centerCoord.longitude(), amslAltitude); } else { sendMavCommand(defaultComponentId(), MAV_CMD_DO_ORBIT, @@ -2804,7 +2795,7 @@ void Vehicle::guidedModeOrbit(const QGeoCoordinate& centerCoord, double radius, qQNaN(), // Use default velocity 0, // Vehicle points to center qQNaN(), // reserved - lat, lon, alt); + centerCoord.latitude(), centerCoord.longitude(), amslAltitude); } }