Skip to content

Commit 450cf2a

Browse files
committed
Add Go here circle visuals if in forward flight
Added circle visuals to the Go here map item to show the orbit pattern that aircraft in forward flight will follow upon reaching the position. This feature is already available in firmware that supports the ORBIT_EXECUTION_STATUS MAVLink message, so this is only shown for vehicles operating on firmware that lacks this support.
1 parent 772af12 commit 450cf2a

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/FlightDisplay/FlyViewMap.qml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,44 @@ FlightMap {
379379
}
380380
}
381381

382+
// GoTo Location forward flight circle visuals
383+
QGCMapCircleVisuals {
384+
id: fwdFlightGotoMapCircle
385+
mapControl: parent
386+
mapCircle: _fwdFlightGotoMapCircle
387+
visible: gotoLocationItem.visible && _activeVehicle &&
388+
_activeVehicle.inFwdFlight &&
389+
!_activeVehicle.orbitActive
390+
391+
Connections {
392+
target: QGroundControl.multiVehicleManager
393+
function onActiveVehicleChanged(activeVehicle) {
394+
if (!activeVehicle) {
395+
visible = false
396+
}
397+
}
398+
}
399+
400+
Binding {
401+
target: _fwdFlightGotoMapCircle
402+
property: "center"
403+
value: gotoLocationItem.coordinate
404+
}
405+
406+
QGCMapCircle {
407+
id: _fwdFlightGotoMapCircle
408+
interactive: false
409+
showRotation: true
410+
clockwiseRotation: true
411+
412+
property real _defaultLoiterRadius: _flyViewSettings.forwardFlightGoToLocationLoiterRad.value
413+
414+
onCenterChanged: {
415+
radius.rawValue = _defaultLoiterRadius
416+
}
417+
}
418+
}
419+
382420
// GoTo Location visuals
383421
MapQuickItem {
384422
id: gotoLocationItem

0 commit comments

Comments
 (0)