#include <MissionController.h>
Public Types | |
| enum | SendToVehiclePreCheckState { SendToVehiclePreCheckStateOk , SendToVehiclePreCheckStateNoActiveVehicle , SendToVehiclePreCheckStateFirwmareVehicleMismatch , SendToVehiclePreCheckStateActiveMission } |
| using | MissionFlightStatus_t = ::MissionFlightStatus_t |
| Tree-structured view of visualItems for TreeView. | |
Public Member Functions | |
| MissionController (PlanMasterController *masterController, QObject *parent=nullptr) | |
| ~MissionController () | |
| Q_INVOKABLE void | removeVisualItem (int viIndex) |
| true: Default altitude changed while the mission had items which applyDefaultMissionAltitude can update | |
| Q_INVOKABLE int | visualItemIndexForObject (QObject *object) const |
| Returns the visual item index for the given VisualMissionItem object, or -1 if not found. | |
| Q_INVOKABLE void | setHomePosition (QGeoCoordinate coordinate) |
| Set the planned home position from a map click. | |
| Q_INVOKABLE VisualMissionItem * | insertSimpleMissionItem (QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertTakeoffItem (QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertVTOLMulticopterTakeoffItem (QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertLandItem (QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertROIMissionItem (QGeoCoordinate coordinate, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertCancelROIMissionItem (int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertComplexMissionItem (QString itemName, QGeoCoordinate mapCenterCoordinate, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE VisualMissionItem * | insertComplexMissionItemFromKMLOrSHP (QString itemName, QString file, int visualItemIndex, bool makeCurrentItem=false) |
| Q_INVOKABLE void | resumeMission (int resumeIndex) |
| Q_INVOKABLE void | applyDefaultMissionAltitude (void) |
| Updates the altitudes of mission items which use the plan altitude frame to the new default altitude. | |
| Q_INVOKABLE void | setCurrentPlanViewSeqNum (int sequenceNumber, bool force) |
| Q_INVOKABLE void | repositionMission (const QGeoCoordinate &newHome, bool repositionTakeoffItems=true, bool repositionLandingItems=true) |
| Q_INVOKABLE void | offsetMission (double eastMeters, double northMeters, double upMeters=0.0, bool offsetTakeoffItems=false, bool offsetLandingItems=false) |
| Q_INVOKABLE void | rotateMission (double degreesCW, bool rotateTakeoffItems=false, bool rotateLandingItems=false) |
| Q_INVOKABLE SendToVehiclePreCheckState | sendToVehiclePreCheck (void) |
| int | readyForSaveState (void) const |
| bool | loadTextFile (QFile &file, QString &errorString) |
| QGCGeoBoundingCube * | travelBoundingCube () |
| QGeoCoordinate | takeoffCoordinate () |
| bool | supported (void) const final |
| true: controller is waiting for the current load to complete | |
| void | start (bool flyView) final |
| Should be called immediately upon Component.onCompleted. | |
| void | save (QJsonObject &json) final |
| bool | load (const QJsonObject &json, QString &errorString) final |
| void | loadFromVehicle (void) final |
| void | sendToVehicle (void) final |
| void | removeAll (void) final |
| Removes all from controller only. | |
| void | removeAllFromVehicle (void) final |
| bool | syncInProgress (void) const final |
| bool | dirty (void) const final |
| void | setDirty (bool dirty) final |
| bool | containsItems (void) const final |
| bool | showPlanFromManagerVehicle (void) final |
| void | addMissionToKML (KMLPlanDomDocument &planKML) |
| QmlObjectListModel * | visualItems (void) |
| QmlObjectTreeModel * | visualItemsTree (void) |
| QPersistentModelIndex | planFileGroupIndex (void) const |
| QPersistentModelIndex | defaultsGroupIndex (void) const |
| QPersistentModelIndex | missionGroupIndex (void) const |
| QPersistentModelIndex | fenceGroupIndex (void) const |
| QPersistentModelIndex | rallyGroupIndex (void) const |
| QPersistentModelIndex | transformGroupIndex (void) const |
| QmlObjectListModel * | simpleFlightPathSegments (void) |
| QmlObjectListModel * | directionArrows (void) |
| QVariantList | complexMissionItems (void) const |
| QGeoCoordinate | plannedHomePosition (void) const |
| bool | homePositionSet (void) const |
| VisualMissionItem * | currentPlanViewItem (void) const |
| TakeoffMissionItem * | takeoffMissionItem (void) const |
| double | progressPct (void) const |
| bool | isInsertTakeoffValid (void) const |
| bool | multipleLandPatternsAllowed (void) const |
| double | minAMSLAltitude (void) const |
| double | maxAMSLAltitude (void) const |
| bool | applyDefaultMissionAltitudeAvailable (void) const |
| int | currentMissionIndex (void) const |
| int | resumeMissionIndex (void) const |
| int | currentPlanViewSeqNum (void) const |
| int | currentPlanViewVIIndex (void) const |
| double | missionTotalDistance (void) const |
| double | missionPlannedDistance (void) const |
| double | missionTime (void) const |
| double | missionHoverDistance (void) const |
| double | missionHoverTime (void) const |
| double | missionCruiseDistance (void) const |
| double | missionCruiseTime (void) const |
| double | missionMaxTelemetry (void) const |
| int | batteryChangePoint (void) const |
| -1 for not supported, 0 for not needed | |
| int | batteriesRequired (void) const |
| -1 for not supported | |
| bool | isFirstLandingComplexItem (const LandingComplexItem *item) const |
| bool | isEmpty (void) const |
| QGroundControlQmlGlobal::AltitudeFrame | globalAltitudeFrame (void) |
| QGroundControlQmlGlobal::AltitudeFrame | globalAltitudeFrameDefault (void) |
| void | setGlobalAltitudeFrame (QGroundControlQmlGlobal::AltitudeFrame altFrame) |
| Public Member Functions inherited from PlanElementController | |
| PlanElementController (PlanMasterController *masterController, QObject *parent=nullptr) | |
| ~PlanElementController () | |
| PlanMasterController * | masterController (void) |
Static Public Member Functions | |
| static void | sendItemsToVehicle (Vehicle *vehicle, QmlObjectListModel *visualMissionItems) |
| Sends the mission items to the specified vehicle. | |
Static Public Attributes | |
| static constexpr int | kPlanFileGroupRow = 0 |
| static constexpr int | kDefaultsGroupRow = 1 |
| static constexpr int | kMissionGroupRow = 2 |
| static constexpr int | kFenceGroupRow = 3 |
| static constexpr int | kRallyGroupRow = 4 |
| static constexpr int | kTransformGroupRow = 5 |
| static constexpr int | kGroupCount = 6 |
Additional Inherited Members | |
| Protected Attributes inherited from PlanElementController | |
| PlanMasterController * | _masterController |
| bool | _flyView |
Definition at line 36 of file MissionController.h.
| using MissionController::MissionFlightStatus_t = ::MissionFlightStatus_t |
Tree-structured view of visualItems for TreeView.
Used by Plan view only for interactive editing Each entry is a QVariantMap with keys "canonicalName" (insertion key) and "translatedName" (display string) Includes AMSL altitude true: Home position has been set by the user Segment which show show + split ui element Returns the item index two which a mission should be resumed. -1 indicates resume mission not available. Minimum altitude associated with this mission. Used to calculate percentages for terrain status. Maximum altitude associated with this mission. Used to calculate percentages for terrain status. Default to use for newly created items
Definition at line 50 of file MissionController.h.
| Enumerator | |
|---|---|
| SendToVehiclePreCheckStateOk | |
| SendToVehiclePreCheckStateNoActiveVehicle | |
| SendToVehiclePreCheckStateFirwmareVehicleMismatch | |
| SendToVehiclePreCheckStateActiveMission | |
Definition at line 221 of file MissionController.h.
| MissionController::MissionController | ( | PlanMasterController * | masterController, |
| QObject * | parent = nullptr ) |
Definition at line 38 of file MissionController.cc.
References PlanElementController::_masterController, _recalcFlightPathSegmentsSignal(), _recalcMissionFlightStatusSignal(), homePositionSetChanged(), PlanMasterController::managerVehicleChanged(), PlanElementController::masterController(), MissionController(), missionPlannedDistanceChanged(), multipleLandPatternsAllowedChanged(), PlanElementController::PlanElementController(), qgcApp, Fact::rawValueChanged(), and recalcTerrainProfile().
Referenced by MissionController().
| MissionController::~MissionController | ( | ) |
Definition at line 69 of file MissionController.cc.
|
signal |
Referenced by LandingComplexItem::_init(), and MissionController().
|
signal |
Referenced by MissionController().
| void MissionController::addMissionToKML | ( | KMLPlanDomDocument & | planKML | ) |
Definition at line 237 of file MissionController.cc.
References KMLPlanDomDocument::addMission().
| void MissionController::applyDefaultMissionAltitude | ( | void | ) |
Updates the altitudes of mission items which use the plan altitude frame to the new default altitude.
Definition at line 1897 of file MissionController.cc.
References VisualMissionItem::applyNewAltitude(), and VisualMissionItem::usesAltitudeFrame().
|
inline |
Definition at line 285 of file MissionController.h.
|
signal |
|
inline |
-1 for not supported
Definition at line 302 of file MissionController.h.
Referenced by batteriesRequiredChanged().
|
signal |
References batteriesRequired().
|
inline |
-1 for not supported, 0 for not needed
Definition at line 301 of file MissionController.h.
Referenced by batteryChangePointChanged().
|
signal |
References batteryChangePoint().
| QVariantList MissionController::complexMissionItems | ( | void | ) | const |
Definition at line 1863 of file MissionController.cc.
References QGCCorePlugin::complexMissionItemNames(), and QGCCorePlugin::instance().
|
signal |
|
finalvirtual |
Implements PlanElementController.
Definition at line 1846 of file MissionController.cc.
| int MissionController::currentMissionIndex | ( | void | ) | const |
Definition at line 1767 of file MissionController.cc.
References PlanElementController::_flyView.
Referenced by currentMissionIndexChanged().
|
signal |
References currentMissionIndex().
|
inline |
Definition at line 277 of file MissionController.h.
|
inline |
Definition at line 289 of file MissionController.h.
|
inline |
Definition at line 290 of file MissionController.h.
|
inline |
Definition at line 267 of file MissionController.h.
|
inline |
Definition at line 273 of file MissionController.h.
|
finalvirtual |
Implements PlanElementController.
Definition at line 1800 of file MissionController.cc.
References MissionSettingsItem::dirty().
Referenced by applyDefaultMissionAltitudeAvailableChanged(), and setDirty().
|
inline |
Definition at line 269 of file MissionController.h.
| QGroundControlQmlGlobal::AltitudeFrame MissionController::globalAltitudeFrame | ( | void | ) |
Definition at line 2465 of file MissionController.cc.
Referenced by insertComplexMissionItem().
|
signal |
Referenced by setGlobalAltitudeFrame().
| QGroundControlQmlGlobal::AltitudeFrame MissionController::globalAltitudeFrameDefault | ( | void | ) |
Definition at line 2470 of file MissionController.cc.
References QGroundControlQmlGlobal::AltitudeFrameMixed, and QGroundControlQmlGlobal::AltitudeFrameRelative.
|
signal |
Referenced by setCurrentPlanViewSeqNum().
| bool MissionController::homePositionSet | ( | void | ) | const |
Definition at line 1885 of file MissionController.cc.
Referenced by setCurrentPlanViewSeqNum().
|
signal |
Referenced by MissionController().
| VisualMissionItem * MissionController::insertCancelROIMissionItem | ( | int | visualItemIndex, |
| bool | makeCurrentItem = false ) |
Add a new Cancel ROI mission item to the list
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 402 of file MissionController.cc.
References SimpleMissionItem::missionItem(), SimpleMissionItem::setCommand(), MissionItem::setParam1(), and QGCMAVLinkTypes::VehicleClassGeneric.
| VisualMissionItem * MissionController::insertComplexMissionItem | ( | QString | itemName, |
| QGeoCoordinate | mapCenterCoordinate, | ||
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a new complex mission item to the list
| itemName | Name of complex item to create (canonicalName from complexMissionItems) |
| mapCenterCoordinate | coordinate for current center of map |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 413 of file MissionController.cc.
References PlanElementController::_flyView, PlanElementController::_masterController, QGroundControlQmlGlobal::AltitudeFrameMixed, ComplexMissionItem::applyPreviousAltitudeFrame(), QGCCorePlugin::createComplexMissionItem(), globalAltitudeFrame(), QGCCorePlugin::instance(), and VisualMissionItem::setCoordinate().
Referenced by insertLandItem().
| VisualMissionItem * MissionController::insertComplexMissionItemFromKMLOrSHP | ( | QString | itemName, |
| QString | file, | ||
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a new complex mission item to the list
| itemName | Name of complex item to create (canonicalName from complexMissionItems) |
| file | kml or shp file to load from shape from |
| coordinate | Coordinate for item |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 434 of file MissionController.cc.
References PlanElementController::_flyView, PlanElementController::_masterController, QGCCorePlugin::createComplexMissionItem(), and QGCCorePlugin::instance().
| VisualMissionItem * MissionController::insertLandItem | ( | QGeoCoordinate | coordinate, |
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a new land item to the list
| coordinate | Coordinate for item |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 378 of file MissionController.cc.
References FixedWingLandingComplexItem::canonicalName, VTOLLandingComplexItem::canonicalName, and insertComplexMissionItem().
| VisualMissionItem * MissionController::insertROIMissionItem | ( | QGeoCoordinate | coordinate, |
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a new ROI mission item to the list
| coordinate | Coordinate for item |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 391 of file MissionController.cc.
References SimpleMissionItem::missionItem(), SimpleMissionItem::setCommand(), MissionItem::setParam1(), and QGCMAVLinkTypes::VehicleClassGeneric.
| VisualMissionItem * MissionController::insertSimpleMissionItem | ( | QGeoCoordinate | coordinate, |
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a new simple mission item to the list
| coordinate | Coordinate for item |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 312 of file MissionController.cc.
| VisualMissionItem * MissionController::insertTakeoffItem | ( | QGeoCoordinate | coordinate, |
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a new takeoff item to the list
| coordinate | Coordinate for item |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 317 of file MissionController.cc.
| VisualMissionItem * MissionController::insertVTOLMulticopterTakeoffItem | ( | QGeoCoordinate | coordinate, |
| int | visualItemIndex, | ||
| bool | makeCurrentItem = false ) |
Add a multicopter takeoff item for a VTOL which supports remaining in multicopter mode
| coordinate | Coordinate for item |
| visualItemIndex | index to insert at, -1 for end of list |
| makeCurrentItem | true: Make this item the current item |
Definition at line 325 of file MissionController.cc.
References TakeoffMissionItem::isVTOLMulticopterTakeoff().
| bool MissionController::isEmpty | ( | void | ) | const |
Definition at line 2425 of file MissionController.cc.
| bool MissionController::isFirstLandingComplexItem | ( | const LandingComplexItem * | item | ) | const |
Definition at line 2410 of file MissionController.cc.
| bool MissionController::isInsertTakeoffValid | ( | void | ) | const |
|
finalvirtual |
Implements PlanElementController.
Definition at line 845 of file MissionController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 173 of file MissionController.cc.
References PlanElementController::_masterController, and syncInProgress().
| bool MissionController::loadTextFile | ( | QFile & | file, |
| QString & | errorString ) |
Definition at line 860 of file MissionController.cc.
References QGroundControlQmlGlobal::AltitudeFrameMixed, and setGlobalAltitudeFrame().
|
inline |
Definition at line 283 of file MissionController.h.
Referenced by maxAMSLAltitudeChanged().
|
signal |
References maxAMSLAltitude().
|
inline |
Definition at line 282 of file MissionController.h.
Referenced by minAMSLAltitudeChanged().
|
signal |
References minAMSLAltitude().
|
signal |
|
inline |
Definition at line 297 of file MissionController.h.
Referenced by missionCruiseDistanceChanged().
|
signal |
References missionCruiseDistance().
|
inline |
Definition at line 298 of file MissionController.h.
|
signal |
|
inline |
Definition at line 268 of file MissionController.h.
|
inline |
Definition at line 295 of file MissionController.h.
Referenced by missionHoverDistanceChanged().
|
signal |
References missionHoverDistance().
|
inline |
Definition at line 296 of file MissionController.h.
|
signal |
|
inline |
Definition at line 299 of file MissionController.h.
Referenced by missionMaxTelemetryChanged().
|
signal |
References missionMaxTelemetry().
|
inline |
Definition at line 293 of file MissionController.h.
Referenced by missionPlannedDistanceChanged().
|
signal |
References missionPlannedDistance().
Referenced by MissionController().
|
inline |
Definition at line 294 of file MissionController.h.
|
signal |
|
inline |
Definition at line 292 of file MissionController.h.
Referenced by missionTotalDistanceChanged().
|
signal |
References missionTotalDistance().
| bool MissionController::multipleLandPatternsAllowed | ( | void | ) | const |
Definition at line 369 of file MissionController.cc.
References PlanElementController::_masterController.
Referenced by setCurrentPlanViewSeqNum().
|
signal |
Referenced by MissionController().
|
signal |
| void MissionController::offsetMission | ( | double | eastMeters, |
| double | northMeters, | ||
| double | upMeters = 0.0, | ||
| bool | offsetTakeoffItems = false, | ||
| bool | offsetLandingItems = false ) |
Offsets all mission items which specify a coordinate by the specified ENU amounts in meters. Home altitude remains unchanged.
| eastMeters | Distance to offset items to the east, in meters |
| northMeters | Distance to offset items to the north, in meters |
| upMeters | Distance to offset items upwards, in meters |
| offsetTakeoffItems | If true, items identified as takeoff items (isTakeoffItem) will be offset |
| offsetLandingItems | If true, items identified as landing items (isLandCommand) will be offset |
Definition at line 2216 of file MissionController.cc.
References VisualMissionItem::applyNewAltitude(), VisualMissionItem::coordinate(), VisualMissionItem::editableAlt(), VisualMissionItem::isLandCommand(), VisualMissionItem::isStandaloneCoordinate(), VisualMissionItem::isTakeoffItem(), VisualMissionItem::setCoordinate(), setDirty(), VisualMissionItem::specifiesAltitudeOnly(), and VisualMissionItem::specifiesCoordinate().
|
inline |
Definition at line 266 of file MissionController.h.
| QGeoCoordinate MissionController::plannedHomePosition | ( | void | ) | const |
Definition at line 1876 of file MissionController.cc.
Referenced by plannedHomePositionChanged().
|
signal |
References plannedHomePosition().
Referenced by LandingComplexItem::_init(), ComplexMissionItem::ComplexMissionItem(), and StructureScanComplexItem::StructureScanComplexItem().
|
signal |
All plan-view properties are recomputed together in setCurrentPlanViewSeqNum, so one signal covers them all.
Referenced by setCurrentPlanViewSeqNum().
|
inline |
Definition at line 279 of file MissionController.h.
Referenced by applyDefaultMissionAltitudeAvailableChanged(), and progressPctChanged().
|
signal |
References progressPct().
|
inline |
Definition at line 270 of file MissionController.h.
| int MissionController::readyForSaveState | ( | void | ) | const |
Determines if the mission has all data needed to be saved or sent to the vehicle. IMPORTANT NOTE: The return value is a VisualMissionItem::ReadForSaveState value. It is an int here to work around a nightmare of circular header dependency problems.
Definition at line 880 of file MissionController.cc.
References VisualMissionItem::ReadyForSave, and VisualMissionItem::readyForSaveState().
|
signal |
|
finalvirtual |
Removes all from controller only.
Implements PlanElementController.
Definition at line 603 of file MissionController.cc.
References setDirty().
|
finalvirtual |
Removes all from vehicle and controller Signals removeAllComplete when done
Implements PlanElementController.
Definition at line 1851 of file MissionController.cc.
References PlanElementController::_masterController, and syncInProgress().
| void MissionController::removeVisualItem | ( | int | viIndex | ) |
true: Default altitude changed while the mission had items which applyDefaultMissionAltitude can update
Definition at line 508 of file MissionController.cc.
References CameraSection::cameraMode(), CameraSection::cameraModeSupported(), CameraSection::gimbalPitch(), CameraSection::gimbalYaw(), Fact::rawValue(), VisualMissionItem::sequenceNumber(), setCurrentPlanViewSeqNum(), setDirty(), CameraSection::setSpecifyCameraMode(), CameraSection::setSpecifyGimbal(), CameraSection::specifyCameraMode(), and CameraSection::specifyGimbal().
| void MissionController::repositionMission | ( | const QGeoCoordinate & | newHome, |
| bool | repositionTakeoffItems = true, | ||
| bool | repositionLandingItems = true ) |
Repositions all mission items which specify a coordinate around a new home coordinate. Requires a valid planned home position; otherwise the mission is not modified and a warning is logged.
| newHome | New coordinate for the home item |
| repositionTakeoffItems | If true, items identified as takeoff items (isTakeoffItem) will be repositioned |
| repositionLandingItems | If true, items identified as landing items (isLandCommand) will be repositioned |
Definition at line 2174 of file MissionController.cc.
References VisualMissionItem::coordinate(), VisualMissionItem::isLandCommand(), VisualMissionItem::isStandaloneCoordinate(), VisualMissionItem::isTakeoffItem(), VisualMissionItem::setCoordinate(), setDirty(), and VisualMissionItem::specifiesCoordinate().
| void MissionController::resumeMission | ( | int | resumeIndex | ) |
Definition at line 1868 of file MissionController.cc.
| int MissionController::resumeMissionIndex | ( | void | ) | const |
Definition at line 1749 of file MissionController.cc.
References PlanElementController::_flyView, and VisualMissionItem::sequenceNumber().
|
signal |
|
signal |
|
signal |
| void MissionController::rotateMission | ( | double | degreesCW, |
| bool | rotateTakeoffItems = false, | ||
| bool | rotateLandingItems = false ) |
Rotates all mission items which specify a coordinate around the up axis of the home position. Complex items are rotated by moving their reference coordinate: their geometry and orientation are not modified. Requires a valid planned home position; otherwise the mission is not modified and a warning is logged.
| degreesCW | Angle to rotate items by, in degrees clockwise |
| rotateTakeoffItems | If true, items identified as takeoff items (isTakeoffItem) will be rotated |
| rotateLandingItems | If true, items identified as landing items (isLandCommand) will be rotated |
Definition at line 2277 of file MissionController.cc.
References VisualMissionItem::coordinate(), VisualMissionItem::isLandCommand(), VisualMissionItem::isStandaloneCoordinate(), VisualMissionItem::isTakeoffItem(), VisualMissionItem::setCoordinate(), setDirty(), and VisualMissionItem::specifiesCoordinate().
|
finalvirtual |
Implements PlanElementController.
Definition at line 892 of file MissionController.cc.
References MissionSettingsItem::coordinate(), JsonParsing::jsonVersionKey, MissionItem::save(), VisualMissionItem::save(), and GeoJsonHelper::saveGeoCoordinate().
|
static |
Sends the mission items to the specified vehicle.
Definition at line 247 of file MissionController.cc.
References Vehicle::missionManager(), and PlanManager::writeMissionItems().
Referenced by sendToVehicle().
|
finalvirtual |
Sends the current plan element to the vehicle Signals sendComplete when done
Implements PlanElementController.
Definition at line 185 of file MissionController.cc.
References PlanElementController::_masterController, sendItemsToVehicle(), setDirty(), and syncInProgress().
| MissionController::SendToVehiclePreCheckState MissionController::sendToVehiclePreCheck | ( | void | ) |
Definition at line 2451 of file MissionController.cc.
References SendToVehiclePreCheckStateActiveMission, SendToVehiclePreCheckStateFirwmareVehicleMismatch, SendToVehiclePreCheckStateNoActiveVehicle, SendToVehiclePreCheckStateOk, and QGCMAVLink::vehicleClass().
| void MissionController::setCurrentPlanViewSeqNum | ( | int | sequenceNumber, |
| bool | force ) |
Sets a new current mission item (PlanView).
| sequenceNumber | - index for new item, -1 to clear current item |
| force | - true: reset internals even if specified item is already selected |
Definition at line 1997 of file MissionController.cc.
References PlanElementController::_masterController, SimpleMissionItem::coordinate(), hasLandItemChanged(), homePositionSet(), SimpleMissionItem::isStandaloneCoordinate(), VisualMissionItem::isStandaloneCoordinate(), SimpleMissionItem::mavCommand(), multipleLandPatternsAllowed(), VisualMissionItem::parentItem(), planViewStateChanged(), VisualMissionItem::sequenceNumber(), VisualMissionItem::setHasCurrentChildItem(), VisualMissionItem::setIsCurrentItem(), SimpleMissionItem::specifiesCoordinate(), VisualMissionItem::specifiesCoordinate(), and splitSegmentChanged().
Referenced by removeVisualItem().
|
finalvirtual |
Implements PlanElementController.
Definition at line 1806 of file MissionController.cc.
References dirty().
Referenced by offsetMission(), removeAll(), removeVisualItem(), repositionMission(), rotateMission(), and sendToVehicle().
| void MissionController::setGlobalAltitudeFrame | ( | QGroundControlQmlGlobal::AltitudeFrame | altFrame | ) |
Definition at line 2479 of file MissionController.cc.
References QGroundControlQmlGlobal::AltitudeFrameMixed, and globalAltitudeFrameChanged().
Referenced by loadTextFile().
| void MissionController::setHomePosition | ( | QGeoCoordinate | coordinate | ) |
Set the planned home position from a map click.
Definition at line 1890 of file MissionController.cc.
|
finalvirtual |
Implements PlanElementController.
Definition at line 1941 of file MissionController.cc.
References PlanElementController::_flyView, PlanElementController::_masterController, and syncInProgress().
|
inline |
Definition at line 272 of file MissionController.h.
|
signal |
Referenced by setCurrentPlanViewSeqNum().
|
finalvirtual |
Should be called immediately upon Component.onCompleted.
Reimplemented from PlanElementController.
Definition at line 90 of file MissionController.cc.
References PlanElementController::_masterController, PlanMasterController::managerVehicleChanged(), and PlanElementController::start().
|
inlinefinalvirtual |
true: controller is waiting for the current load to complete
Implements PlanElementController.
Definition at line 245 of file MissionController.h.
|
finalvirtual |
Implements PlanElementController.
Definition at line 1795 of file MissionController.cc.
Referenced by loadFromVehicle(), removeAllFromVehicle(), sendToVehicle(), and showPlanFromManagerVehicle().
|
inline |
Definition at line 242 of file MissionController.h.
|
inline |
Definition at line 278 of file MissionController.h.
|
signal |
|
inline |
Definition at line 271 of file MissionController.h.
|
inline |
Definition at line 241 of file MissionController.h.
| int MissionController::visualItemIndexForObject | ( | QObject * | object | ) | const |
Returns the visual item index for the given VisualMissionItem object, or -1 if not found.
Definition at line 503 of file MissionController.cc.
|
inline |
Definition at line 264 of file MissionController.h.
Referenced by applyDefaultMissionAltitudeAvailableChanged().
|
signal |
Referenced by TerrainProfile::setMissionController().
|
inline |
Definition at line 265 of file MissionController.h.
|
staticconstexpr |
Definition at line 313 of file MissionController.h.
|
staticconstexpr |
Definition at line 315 of file MissionController.h.
|
staticconstexpr |
Definition at line 318 of file MissionController.h.
|
staticconstexpr |
Definition at line 314 of file MissionController.h.
|
staticconstexpr |
Definition at line 312 of file MissionController.h.
|
staticconstexpr |
Definition at line 316 of file MissionController.h.
|
staticconstexpr |
Definition at line 317 of file MissionController.h.