QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
TransectStyleComplexItem Class Referenceabstract

#include <TransectStyleComplexItem.h>

+ Inheritance diagram for TransectStyleComplexItem:
+ Collaboration diagram for TransectStyleComplexItem:

Classes

struct  CoordInfo_t
 

Signals

void cameraShotsChanged (void)
 
void timeBetweenShotsChanged (void)
 
void visualTransectPointsChanged (void)
 
void coveredAreaChanged (void)
 
void _updateFlightPathSegmentsSignal (void)
 
- Signals inherited from ComplexMissionItem
void patternNameChanged (void)
 
void complexDistanceChanged (void)
 
void boundingCubeChanged (void)
 
void greatestDistanceToChanged (void)
 
void presetNamesChanged (void)
 
void isIncompleteChanged (void)
 
void minAMSLAltitudeChanged (void)
 
void maxAMSLAltitudeChanged (void)
 
void terrainCollisionChanged (bool terrainCollision)
 
- Signals inherited from VisualMissionItem
void altDifferenceChanged (double altDifference)
 
void altPercentChanged (double altPercent)
 
void terrainPercentChanged (double terrainPercent)
 
void terrainCollisionChanged (bool terrainCollision)
 
void azimuthChanged (double azimuth)
 
void commandDescriptionChanged (void)
 
void commandNameChanged (void)
 
void abbreviationChanged (void)
 
void coordinateChanged (const QGeoCoordinate &coordinate)
 
void entryCoordinateChanged (const QGeoCoordinate &entryCoordinate)
 
void exitCoordinateChanged (const QGeoCoordinate &exitCoordinate)
 
void dirtyChanged (bool dirty)
 
void distanceChanged (double distance)
 
void distanceFromStartChanged (double distanceFromStart)
 
void isCurrentItemChanged (bool isCurrentItem)
 
void hasCurrentChildItemChanged (bool hasCurrentChildItem)
 
void sequenceNumberChanged (int sequenceNumber)
 
void isSimpleItemChanged (bool isSimpleItem)
 
void isTakeoffItemChanged (bool isTakeoffItem)
 
void isLandCommandChanged (void)
 
void specifiesCoordinateChanged (void)
 
void isStandaloneCoordinateChanged (void)
 
void specifiesAltitudeOnlyChanged (void)
 
void specifiedFlightSpeedChanged (void)
 
void specifiedGimbalYawChanged (void)
 
void specifiedGimbalPitchChanged (void)
 
void specifiedVehicleYawChanged (void)
 
void lastSequenceNumberChanged (int sequenceNumber)
 
void missionGimbalYawChanged (double missionGimbalYaw)
 
void missionVehicleYawChanged (double missionVehicleYaw)
 
void terrainAltitudeChanged (double terrainAltitude)
 
void terrainQueryFailedChanged (bool terrainQueryFailed)
 
void additionalTimeDelayChanged (void)
 
void boundingCubeChanged (void)
 
void readyForSaveStateChanged (void)
 
void wizardModeChanged (bool wizardMode)
 
void parentItemChanged (VisualMissionItem *parentItem)
 
void amslEntryAltChanged (double alt)
 
void amslExitAltChanged (double alt)
 
void previousVTOLModeChanged (void)
 
void currentVTOLModeChanged (void)
 Signals that this item has changed the VTOL mode (MAV_CMD_DO_VTOL_TRANSITION)
 
void exitCoordinateSameAsEntryChanged (bool exitCoordinateSameAsEntry)
 

Public Member Functions

 TransectStyleComplexItem (PlanMasterController *masterController, bool flyView, QString settignsGroup)
 
QGCMapPolygonsurveyAreaPolygon (void)
 
CameraCalccameraCalc (void)
 
QVariantList visualTransectPoints (void)
 
FactturnAroundDistance (void)
 
FactcameraTriggerInTurnAround (void)
 
FacthoverAndCapture (void)
 
Factrefly90Degrees (void)
 
FactterrainAdjustTolerance (void)
 
FactterrainAdjustMaxDescentRate (void)
 
FactterrainAdjustMaxClimbRate (void)
 
const FacthoverAndCapture (void) const
 
int cameraShots (void) const
 
double coveredArea (void) const
 
bool hoverAndCaptureAllowed (void) const
 
virtual double timeBetweenShots (void)
 
double triggerDistance (void) const
 
bool hoverAndCaptureEnabled (void) const
 
bool triggerCamera (void) const
 
int _transectCount (void) const
 
int lastSequenceNumber (void) const final
 
QString mapVisualQML (void) const override=0
 
bool load (const QJsonObject &complexObject, int sequenceNumber, QString &errorString) override=0
 
void addKMLVisuals (KMLPlanDomDocument &domDocument) final
 
double complexDistance (void) const final
 
double greatestDistanceTo (const QGeoCoordinate &other) const final
 
void save (QJsonArray &planItems) override=0
 
bool specifiesCoordinate (void) const override=0
 
void appendMissionItems (QList< MissionItem * > &items, QObject *missionItemParent) final
 
void applyNewAltitude (double newAltitude) final
 Adjust the altitude of the item if appropriate to the new altitude.
 
bool dirty (void) const final
 
bool isSimpleItem (void) const final
 
bool isStandaloneCoordinate (void) const final
 
bool specifiesAltitudeOnly (void) const final
 
QGeoCoordinate coordinate (void) const final
 
QGeoCoordinate entryCoordinate (void) const final
 
QGeoCoordinate exitCoordinate (void) const final
 
int sequenceNumber (void) const final
 
double specifiedFlightSpeed (void) final
 
double specifiedGimbalYaw (void) final
 
double specifiedGimbalPitch (void) final
 
void setMissionFlightStatus (MissionFlightStatus_t &missionFlightStatus) final
 
ReadyForSaveState readyForSaveState (void) const override
 
QString commandDescription (void) const override
 
QString commandName (void) const override
 
QString abbreviation (void) const override
 
bool exitCoordinateSameAsEntry (void) const final
 
void setDirty (bool dirty) final
 
void setCoordinate (const QGeoCoordinate &coordinate) override
 
void setSequenceNumber (int sequenceNumber) final
 
double editableAlt (void) const final
 
double amslEntryAlt (void) const final
 
double amslExitAlt (void) const final
 
double minAMSLAltitude (void) const final
 
double maxAMSLAltitude (void) const final
 
- Public Member Functions inherited from ComplexMissionItem
 ComplexMissionItem (PlanMasterController *masterController, bool flyView)
 
const ComplexMissionItemoperator= (const ComplexMissionItem &other)
 
QmlObjectListModelflightPathSegments (void)
 
virtual QString patternName (void) const =0
 
virtual bool terrainCollision (void) const
 
virtual bool isSingleItem (void) const
 
virtual Q_INVOKABLE void loadPreset (const QString &name)
 
virtual Q_INVOKABLE void savePreset (const QString &name)
 
Q_INVOKABLE void deletePreset (const QString &name)
 
virtual QStringList presetNames (void)
 
virtual QString presetsSettingsGroup (void)
 
virtual void applyPreviousAltitudeFrame (QGroundControlQmlGlobal::AltitudeFrame prevAltFrame, double prevAltitude)
 
bool presetsSupported (void)
 
bool isIncomplete (void) const
 
- Public Member Functions inherited from VisualMissionItem
 VisualMissionItem (PlanMasterController *masterController, bool flyView)
 
 VisualMissionItem (const VisualMissionItem &other, bool flyView)
 
 ~VisualMissionItem ()
 
const VisualMissionItemoperator= (const VisualMissionItem &other)
 
bool homePosition (void) const
 < Flight path cumalative horizontal distance from home point to this item
 
double altDifference (void) const
 
double altPercent (void) const
 
double terrainPercent (void) const
 
bool terrainCollision (void) const
 
double azimuth (void) const
 
double distance (void) const
 
double distanceFromStart (void) const
 
bool isCurrentItem (void) const
 
bool hasCurrentChildItem (void) const
 
double terrainAltitude (void) const
 
bool terrainQueryFailed (void) const
 
bool flyView (void) const
 
bool wizardMode (void) const
 
VisualMissionItemparentItem (void)
 
QmlObjectListModelchildItems (void)
 
void setIsCurrentItem (bool isCurrentItem)
 
void setHasCurrentChildItem (bool hasCurrentChildItem)
 
void setAltDifference (double altDifference)
 
void setAltPercent (double altPercent)
 
void setTerrainPercent (double terrainPercent)
 
void setTerrainCollision (bool terrainCollision)
 
void setAzimuth (double azimuth)
 
void setDistance (double distance)
 
void setDistanceFromStart (double distanceFromStart)
 
void setWizardMode (bool wizardMode)
 
void setParentItem (VisualMissionItem *parentItem)
 
void setHomePositionSpecialCase (bool homePositionSpecialCase)
 
FlightPathSegmentsimpleFlightPathSegment (void)
 
void setSimpleFlighPathSegment (FlightPathSegment *segment)
 
void clearSimpleFlighPathSegment (void)
 
PlanMasterControllermasterController (void)
 
virtual bool isTakeoffItem (void) const
 
virtual bool isLandCommand (void) const
 
virtual bool isSurveyItem (void) const
 
virtual double specifiedVehicleYaw (void)
 
virtual QGCGeoBoundingCubeboundingCube (void)
 
virtual double additionalTimeDelay (void) const =0
 
double missionGimbalYaw (void) const
 
double missionVehicleYaw (void) const
 
void setMissionVehicleYaw (double vehicleYaw)
 

Static Public Attributes

static constexpr const char * turnAroundDistanceName = "TurnAroundDistance"
 
static constexpr const char * turnAroundDistanceMultiRotorName = "TurnAroundDistanceMultiRotor"
 
static constexpr const char * cameraTriggerInTurnAroundName = "CameraTriggerInTurnAround"
 
static constexpr const char * hoverAndCaptureName = "HoverAndCapture"
 
static constexpr const char * refly90DegreesName = "Refly90Degrees"
 
static constexpr const char * terrainAdjustToleranceName = "TerrainAdjustTolerance"
 
static constexpr const char * terrainAdjustMaxClimbRateName = "TerrainAdjustMaxClimbRate"
 
static constexpr const char * terrainAdjustMaxDescentRateName = "TerrainAdjustMaxDescentRate"
 
- Static Public Attributes inherited from ComplexMissionItem
static constexpr const char * jsonComplexItemTypeKey = "complexItemType"
 This mission item attribute specifies the type of the complex item.
 
- Static Public Attributes inherited from VisualMissionItem
static constexpr const char * jsonTypeKey = "type"
 Json file attribute which specifies the item type.
 
static constexpr const char * jsonTypeSimpleItemValue = "SimpleItem"
 Item type is MISSION_ITEM.
 
static constexpr const char * jsonTypeComplexItemValue = "ComplexItem"
 Item type is Complex Item.
 

Protected Types

enum  CoordType {
  CoordTypeInterior , CoordTypeInteriorHoverTrigger , CoordTypeInteriorTerrainAdded , CoordTypeSurveyEntry ,
  CoordTypeSurveyExit , CoordTypeTurnaround
}
 

Protected Slots

void _setDirty (void)
 
void _setIfDirty (bool dirty)
 
void _updateCoordinateAltitudes (void)
 
void _polyPathTerrainData (bool success, const QList< TerrainPathQuery::PathHeightInfo_t > &rgPathHeightInfo)
 
void _missionItemCoordTerrainData (bool success, QList< double > heights)
 
void _rebuildTransects (void)
 
- Protected Slots inherited from ComplexMissionItem
virtual void _segmentTerrainCollisionChanged (bool terrainCollision)
 
- Protected Slots inherited from VisualMissionItem
void _amslEntryAltChanged (void)
 
void _amslExitAltChanged (void)
 

Protected Member Functions

virtual void _rebuildTransectsPhase1 (void)=0
 Rebuilds the _transects array.
 
virtual void _recalcCameraShots (void)=0
 
void _save (QJsonObject &saveObject)
 
bool _load (const QJsonObject &complexObject, bool forPresets, QString &errorString)
 
void _setExitCoordinate (const QGeoCoordinate &coordinate)
 
void _setCameraShots (int cameraShots)
 
double _triggerDistance (void) const
 
bool _hasTurnaround (void) const
 
double _turnAroundDistance (void) const
 
void _appendWaypoint (QList< MissionItem * > &items, QObject *missionItemParent, int &seqNum, MAV_FRAME mavFrame, float holdTime, const QGeoCoordinate &coordinate)
 
void _appendSinglePhotoCapture (QList< MissionItem * > &items, QObject *missionItemParent, int &seqNum)
 
void _appendConditionGate (QList< MissionItem * > &items, QObject *missionItemParent, int &seqNum, MAV_FRAME mavFrame, const QGeoCoordinate &coordinate)
 
void _appendCameraTriggerDistance (QList< MissionItem * > &items, QObject *missionItemParent, int &seqNum, float triggerDistance)
 
void _appendCameraTriggerDistanceUpdatePoint (QList< MissionItem * > &items, QObject *missionItemParent, int &seqNum, MAV_FRAME mavFrame, const QGeoCoordinate &coordinate, bool useConditionGate, float triggerDistance)
 
void _buildAndAppendMissionItems (QList< MissionItem * > &items, QObject *missionItemParent)
 
void _appendLoadedMissionItems (QList< MissionItem * > &items, QObject *missionItemParent)
 
void _recalcComplexDistance (void)
 
- Protected Member Functions inherited from ComplexMissionItem
void _savePresetJson (const QString &name, QJsonObject &presetObject)
 
QJsonObject _loadPresetJson (const QString &name)
 
void _appendFlightPathSegment (FlightPathSegment::SegmentType segmentType, const QGeoCoordinate &coord1, double coord1AMSLAlt, const QGeoCoordinate &coord2, double coord2AMSLAlt)
 
- Protected Member Functions inherited from VisualMissionItem
void _setBoundingCube (QGCGeoBoundingCube bc)
 

Protected Attributes

int _sequenceNumber = 0
 
QGeoCoordinate _entryCoordinate
 
QGeoCoordinate _exitCoordinate
 
QGCMapPolygon _surveyAreaPolygon
 
QVariantList _visualTransectPoints
 Used to draw the flight path visuals on the screen.
 
QList< QList< CoordInfo_t > > _transects
 
QList< TerrainPathQuery::PathHeightInfo_t_rgPathHeightInfo
 Path height for each segment includes turn segments.
 
QList< QGeoCoordinate > _rgFlyThroughMissionItemCoords
 
QList< double > _rgFlyThroughMissionItemCoordsTerrainHeights
 
QList< CoordInfo_t_rgFlightPathCoordInfo
 Fully calculated flight path (including terrain if needed)
 
bool _ignoreRecalc = false
 
double _complexDistance = qQNaN()
 
int _cameraShots = 0
 
double _timeBetweenShots = 0
 
double _vehicleSpeed = 5
 
CameraCalc _cameraCalc
 
double _minAMSLAltitude = qQNaN()
 
double _maxAMSLAltitude = qQNaN()
 
QObject * _loadedMissionItemsParent = nullptr
 Parent for all items in _loadedMissionItems for simpler delete.
 
QList< MissionItem * > _loadedMissionItems
 Mission items loaded from plan file.
 
QMap< QString, FactMetaData * > _metaDataMap
 
SettingsFact _turnAroundDistanceFact
 
SettingsFact _cameraTriggerInTurnAroundFact
 
SettingsFact _hoverAndCaptureFact
 
SettingsFact _refly90DegreesFact
 
SettingsFact _terrainAdjustToleranceFact
 
SettingsFact _terrainAdjustMaxClimbRateFact
 
SettingsFact _terrainAdjustMaxDescentRateFact
 
- Protected Attributes inherited from ComplexMissionItem
bool _isIncomplete = true
 
int _cTerrainCollisionSegments = 0
 
QmlObjectListModel _flightPathSegments
 
QMap< QString, FactMetaData * > _metaDataMap
 
- Protected Attributes inherited from VisualMissionItem
bool _flyView = false
 
bool _isCurrentItem = false
 
bool _hasCurrentChildItem = false
 
bool _dirty = false
 
bool _homePositionSpecialCase = false
 true: This item is being used as a ui home position indicator
 
bool _wizardMode = false
 true: Item editor is showing wizard completion panel
 
double _terrainAltitude = qQNaN()
 Altitude of terrain at coordinate position, NaN for not known.
 
bool _terrainQueryFailed = false
 true: Last terrain query failed
 
double _altDifference = 0
 Difference in altitude from previous waypoint.
 
double _altPercent = 0
 Percent of total altitude change in mission.
 
double _terrainPercent = qQNaN()
 Percent of terrain altitude for coordinate.
 
bool _terrainCollision = false
 true: item collides with terrain
 
double _azimuth = 0
 Azimuth to previous waypoint.
 
double _distance = 0
 Distance to previous waypoint.
 
double _distanceFromStart = 0
 Flight path cumalative horizontal distance from home point to this item.
 
QString _editorQml
 Qml resource for editing item.
 
double _missionGimbalYaw = qQNaN()
 
double _missionVehicleYaw = qQNaN()
 
QGCMAVLinkTypes::VehicleClass_t _previousVTOLMode = QGCMAVLinkTypes::VehicleClassGeneric
 Generic == unknown.
 
PlanMasterController_masterController = nullptr
 
MissionController_missionController = nullptr
 
Vehicle_controllerVehicle = nullptr
 
FlightPathSegment_simpleFlightPathSegment = nullptr
 The simple item flight segment (if any) which starts with this visual item.
 
VisualMissionItem_parentItem = nullptr
 
QGCGeoBoundingCube _boundingCube
 The bounding "cube" of this element.
 
QmlObjectListModel _childItems
 This is used to reference any subsequent mission items which do not specify a coordinate.
 

Static Protected Attributes

static constexpr const char * _jsonTransectStyleComplexItemKey = "TransectStyleComplexItem"
 
static constexpr const char * _jsonCameraCalcKey = "CameraCalc"
 
static constexpr const char * _jsonVisualTransectPointsKey = "VisualTransectPoints"
 
static constexpr const char * _jsonItemsKey = "Items"
 
static constexpr const char * _jsonTerrainFlightSpeed = "TerrainFlightSpeed"
 
static constexpr const char * _jsonCameraShotsKey = "CameraShots"
 
static constexpr int _terrainQueryTimeoutMsecs = 1000
 
static constexpr int _hoverAndCaptureDelaySeconds = 4
 
static constexpr double _minimumTransectSpacingMeters = 0.3
 
static constexpr double _forceLargeTransectSpacingMeters = 100000
 
- Static Protected Attributes inherited from ComplexMissionItem
static constexpr const char * _presetSettingsKey = "_presets"
 

Additional Inherited Members

- Public Types inherited from VisualMissionItem
enum  ReadyForSaveState { ReadyForSave , NotReadyForSaveTerrain , NotReadyForSaveData }
 

Detailed Description

Definition at line 12 of file TransectStyleComplexItem.h.

Member Enumeration Documentation

◆ CoordType

Enumerator
CoordTypeInterior 

Interior waypoint for flight path only (example: interior corridor point)

CoordTypeInteriorHoverTrigger 

Interior waypoint for hover and capture trigger.

CoordTypeInteriorTerrainAdded 

Interior waypoint added for terrain.

CoordTypeSurveyEntry 

Waypoint at entry edge of survey polygon.

CoordTypeSurveyExit 

Waypoint at exit edge of survey polygon.

CoordTypeTurnaround 

Turnaround extension waypoint.

Definition at line 151 of file TransectStyleComplexItem.h.

Constructor & Destructor Documentation

◆ TransectStyleComplexItem()

Member Function Documentation

◆ _appendCameraTriggerDistance()

void TransectStyleComplexItem::_appendCameraTriggerDistance ( QList< MissionItem * > &  items,
QObject *  missionItemParent,
int &  seqNum,
float  triggerDistance 
)
protected

Definition at line 1189 of file TransectStyleComplexItem.cc.

References triggerDistance().

Referenced by _appendCameraTriggerDistanceUpdatePoint().

◆ _appendCameraTriggerDistanceUpdatePoint()

void TransectStyleComplexItem::_appendCameraTriggerDistanceUpdatePoint ( QList< MissionItem * > &  items,
QObject *  missionItemParent,
int &  seqNum,
MAV_FRAME  mavFrame,
const QGeoCoordinate &  coordinate,
bool  useConditionGate,
float  triggerDistance 
)
protected

◆ _appendConditionGate()

void TransectStyleComplexItem::_appendConditionGate ( QList< MissionItem * > &  items,
QObject *  missionItemParent,
int &  seqNum,
MAV_FRAME  mavFrame,
const QGeoCoordinate &  coordinate 
)
protected

◆ _appendLoadedMissionItems()

void TransectStyleComplexItem::_appendLoadedMissionItems ( QList< MissionItem * > &  items,
QObject *  missionItemParent 
)
protected

◆ _appendSinglePhotoCapture()

void TransectStyleComplexItem::_appendSinglePhotoCapture ( QList< MissionItem * > &  items,
QObject *  missionItemParent,
int &  seqNum 
)
protected

Definition at line 1154 of file TransectStyleComplexItem.cc.

Referenced by _buildAndAppendMissionItems().

◆ _appendWaypoint()

void TransectStyleComplexItem::_appendWaypoint ( QList< MissionItem * > &  items,
QObject *  missionItemParent,
int &  seqNum,
MAV_FRAME  mavFrame,
float  holdTime,
const QGeoCoordinate &  coordinate 
)
protected

◆ _buildAndAppendMissionItems()

◆ _hasTurnaround()

bool TransectStyleComplexItem::_hasTurnaround ( void  ) const
protected

Definition at line 385 of file TransectStyleComplexItem.cc.

References _turnAroundDistance().

◆ _load()

bool TransectStyleComplexItem::_load ( const QJsonObject &  complexObject,
bool  forPresets,
QString &  errorString 
)
protected

Definition at line 197 of file TransectStyleComplexItem.cc.

References VisualMissionItem::_amslEntryAltChanged(), VisualMissionItem::_amslExitAltChanged(), _cameraCalc, _cameraShots, _cameraTriggerInTurnAroundFact, VisualMissionItem::_controllerVehicle, _entryCoordinate, _exitCoordinate, _hoverAndCaptureFact, ComplexMissionItem::_isIncomplete, _jsonCameraCalcKey, _jsonCameraShotsKey, _jsonItemsKey, _jsonTerrainFlightSpeed, _jsonTransectStyleComplexItemKey, _jsonVisualTransectPointsKey, _loadedMissionItems, _loadedMissionItemsParent, _maxAMSLAltitude, _minAMSLAltitude, _refly90DegreesFact, _terrainAdjustMaxClimbRateFact, _terrainAdjustMaxDescentRateFact, _terrainAdjustToleranceFact, _turnAroundDistanceFact, _updateFlightPathSegmentsSignal(), _vehicleSpeed, _visualTransectPoints, QGroundControlQmlGlobal::AltitudeFrameCalcAboveTerrain, QGroundControlQmlGlobal::AltitudeFrameTerrain, cameraTriggerInTurnAroundName, CameraCalc::distanceMode(), errorString, MissionCommandTree::getUIInfo(), hoverAndCaptureName, MissionCommandTree::instance(), MissionCommandUIInfo::isStandaloneCoordinate(), JsonParsing::jsonVersionKey, CameraCalc::load(), MissionItem::load(), GeoJsonHelper::loadGeoCoordinateArray(), ComplexMissionItem::maxAMSLAltitudeChanged(), ComplexMissionItem::minAMSLAltitudeChanged(), refly90DegreesName, Fact::setRawValue(), MissionCommandUIInfo::specifiesCoordinate(), terrainAdjustMaxClimbRateName, terrainAdjustMaxDescentRateName, terrainAdjustToleranceName, turnAroundDistanceName, JsonParsing::validateKeys(), and QGCMAVLinkTypes::VehicleClassGeneric.

◆ _missionItemCoordTerrainData

void TransectStyleComplexItem::_missionItemCoordTerrainData ( bool  success,
QList< double >  heights 
)
protectedslot

◆ _polyPathTerrainData

void TransectStyleComplexItem::_polyPathTerrainData ( bool  success,
const QList< TerrainPathQuery::PathHeightInfo_t > &  rgPathHeightInfo 
)
protectedslot

◆ _rebuildTransects

void TransectStyleComplexItem::_rebuildTransects ( void  )
protectedslot

◆ _rebuildTransectsPhase1()

virtual void TransectStyleComplexItem::_rebuildTransectsPhase1 ( void  )
protectedpure virtual

Rebuilds the _transects array.

Referenced by _rebuildTransects().

◆ _recalcCameraShots()

virtual void TransectStyleComplexItem::_recalcCameraShots ( void  )
protectedpure virtual

Referenced by _rebuildTransects().

◆ _recalcComplexDistance()

void TransectStyleComplexItem::_recalcComplexDistance ( void  )
protected

◆ _save()

◆ _setCameraShots()

void TransectStyleComplexItem::_setCameraShots ( int  cameraShots)
protected

Definition at line 105 of file TransectStyleComplexItem.cc.

References _cameraShots, cameraShots(), and cameraShotsChanged().

◆ _setDirty

void TransectStyleComplexItem::_setDirty ( void  )
protectedslot

◆ _setExitCoordinate()

void TransectStyleComplexItem::_setExitCoordinate ( const QGeoCoordinate &  coordinate)
protected

◆ _setIfDirty

void TransectStyleComplexItem::_setIfDirty ( bool  dirty)
protectedslot

Definition at line 367 of file TransectStyleComplexItem.cc.

References dirty(), and setDirty().

Referenced by TransectStyleComplexItem().

◆ _transectCount()

int TransectStyleComplexItem::_transectCount ( void  ) const
inline

Definition at line 61 of file TransectStyleComplexItem.h.

References _transects.

◆ _triggerDistance()

double TransectStyleComplexItem::_triggerDistance ( void  ) const
protected

◆ _turnAroundDistance()

double TransectStyleComplexItem::_turnAroundDistance ( void  ) const
protected

Definition at line 390 of file TransectStyleComplexItem.cc.

References _turnAroundDistanceFact, and Fact::rawValue().

Referenced by _hasTurnaround().

◆ _updateCoordinateAltitudes

void TransectStyleComplexItem::_updateCoordinateAltitudes ( void  )
protectedslot

◆ _updateFlightPathSegmentsSignal

void TransectStyleComplexItem::_updateFlightPathSegmentsSignal ( void  )
signal

◆ abbreviation()

QString TransectStyleComplexItem::abbreviation ( void  ) const
inlineoverridevirtual

Implements VisualMissionItem.

Definition at line 91 of file TransectStyleComplexItem.h.

◆ addKMLVisuals()

◆ amslEntryAlt()

◆ amslExitAlt()

◆ appendMissionItems()

void TransectStyleComplexItem::appendMissionItems ( QList< MissionItem * > &  items,
QObject *  missionItemParent 
)
finalvirtual

Returns the mission items associated with the complex item. Caller is responsible for freeing.

Parameters
itemsList to append to
missionItemParentParent object for newly created MissionItems

Implements VisualMissionItem.

Definition at line 1123 of file TransectStyleComplexItem.cc.

References _appendLoadedMissionItems(), _buildAndAppendMissionItems(), and _loadedMissionItems.

Referenced by _save().

◆ applyNewAltitude()

void TransectStyleComplexItem::applyNewAltitude ( double  newAltitude)
finalvirtual

Adjust the altitude of the item if appropriate to the new altitude.

Implements VisualMissionItem.

Definition at line 1442 of file TransectStyleComplexItem.cc.

References _cameraCalc, CameraCalc::distanceToSurface(), Fact::setRawValue(), and CameraCalc::valueSetIsDistance().

◆ cameraCalc()

CameraCalc * TransectStyleComplexItem::cameraCalc ( void  )
inline

Definition at line 37 of file TransectStyleComplexItem.h.

References _cameraCalc.

◆ cameraShots()

int TransectStyleComplexItem::cameraShots ( void  ) const
inline

Definition at line 50 of file TransectStyleComplexItem.h.

References _cameraShots.

Referenced by _setCameraShots().

◆ cameraShotsChanged

void TransectStyleComplexItem::cameraShotsChanged ( void  )
signal

Referenced by _setCameraShots().

◆ cameraTriggerInTurnAround()

Fact * TransectStyleComplexItem::cameraTriggerInTurnAround ( void  )
inline

Definition at line 41 of file TransectStyleComplexItem.h.

References _cameraTriggerInTurnAroundFact.

◆ commandDescription()

QString TransectStyleComplexItem::commandDescription ( void  ) const
inlineoverridevirtual

Implements VisualMissionItem.

Definition at line 89 of file TransectStyleComplexItem.h.

◆ commandName()

QString TransectStyleComplexItem::commandName ( void  ) const
inlineoverridevirtual

Implements VisualMissionItem.

Definition at line 90 of file TransectStyleComplexItem.h.

◆ complexDistance()

double TransectStyleComplexItem::complexDistance ( void  ) const
inlinefinalvirtual
Returns
The distance covered the complex mission item in meters. Signals complexDistanceChanged

Implements ComplexMissionItem.

Definition at line 68 of file TransectStyleComplexItem.h.

References _complexDistance.

◆ coordinate()

QGeoCoordinate TransectStyleComplexItem::coordinate ( void  ) const
inlinefinalvirtual

◆ coveredArea()

double TransectStyleComplexItem::coveredArea ( void  ) const

Definition at line 380 of file TransectStyleComplexItem.cc.

References _surveyAreaPolygon, and QGCMapPolygon::area().

◆ coveredAreaChanged

void TransectStyleComplexItem::coveredAreaChanged ( void  )
signal

◆ dirty()

bool TransectStyleComplexItem::dirty ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 76 of file TransectStyleComplexItem.h.

References VisualMissionItem::_dirty.

Referenced by _setIfDirty(), and setDirty().

◆ editableAlt()

double TransectStyleComplexItem::editableAlt ( void  ) const
finalvirtual

◆ entryCoordinate()

QGeoCoordinate TransectStyleComplexItem::entryCoordinate ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 81 of file TransectStyleComplexItem.h.

References _entryCoordinate.

Referenced by _updateCoordinateAltitudes(), and coordinate().

◆ exitCoordinate()

QGeoCoordinate TransectStyleComplexItem::exitCoordinate ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 82 of file TransectStyleComplexItem.h.

References _exitCoordinate.

Referenced by _updateCoordinateAltitudes().

◆ exitCoordinateSameAsEntry()

bool TransectStyleComplexItem::exitCoordinateSameAsEntry ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 92 of file TransectStyleComplexItem.h.

◆ greatestDistanceTo()

double TransectStyleComplexItem::greatestDistanceTo ( const QGeoCoordinate &  other) const
finalvirtual

Get the point of complex mission item furthest away from a coordinate

Parameters
otherQGeoCoordinate to which distance is calculated
Returns
the greatest distance from any point of the complex item to some coordinate Signals greatestDistanceToChanged

Implements ComplexMissionItem.

Definition at line 337 of file TransectStyleComplexItem.cc.

References _visualTransectPoints, and VisualMissionItem::distance().

◆ hoverAndCapture() [1/2]

Fact * TransectStyleComplexItem::hoverAndCapture ( void  )
inline

Definition at line 42 of file TransectStyleComplexItem.h.

References _hoverAndCaptureFact.

Referenced by hoverAndCaptureEnabled().

◆ hoverAndCapture() [2/2]

const Fact * TransectStyleComplexItem::hoverAndCapture ( void  ) const
inline

Definition at line 48 of file TransectStyleComplexItem.h.

References _hoverAndCaptureFact.

◆ hoverAndCaptureAllowed()

bool TransectStyleComplexItem::hoverAndCaptureAllowed ( void  ) const

◆ hoverAndCaptureEnabled()

bool TransectStyleComplexItem::hoverAndCaptureEnabled ( void  ) const
inline

◆ isSimpleItem()

bool TransectStyleComplexItem::isSimpleItem ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 77 of file TransectStyleComplexItem.h.

◆ isStandaloneCoordinate()

bool TransectStyleComplexItem::isStandaloneCoordinate ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 78 of file TransectStyleComplexItem.h.

◆ lastSequenceNumber()

◆ load()

bool TransectStyleComplexItem::load ( const QJsonObject &  complexObject,
int  sequenceNumber,
QString &  errorString 
)
overridepure virtual

Load the complex mission item from Json

Parameters
complexObjectComplex mission item json object
sequenceNumberSequence number for first MISSION_ITEM in survey
[out]errorStringError if load fails
Returns
true: load success, false: load failed, errorString set

Implements ComplexMissionItem.

Implemented in CorridorScanComplexItem, and SurveyComplexItem.

◆ mapVisualQML()

QString TransectStyleComplexItem::mapVisualQML ( void  ) const
overridepure virtual
Returns
The QML resource file which contains the control which visualizes the item on the map.

Implements VisualMissionItem.

Implemented in CorridorScanComplexItem, and SurveyComplexItem.

◆ maxAMSLAltitude()

double TransectStyleComplexItem::maxAMSLAltitude ( void  ) const
finalvirtual

◆ minAMSLAltitude()

double TransectStyleComplexItem::minAMSLAltitude ( void  ) const
finalvirtual

◆ readyForSaveState()

◆ refly90Degrees()

Fact * TransectStyleComplexItem::refly90Degrees ( void  )
inline

Definition at line 43 of file TransectStyleComplexItem.h.

References _refly90DegreesFact.

◆ save()

void TransectStyleComplexItem::save ( QJsonArray &  missionItems)
overridepure virtual

Save the item(s) in Json format

Parameters
missionItemsCurrent set of mission items, new items should be appended to the end

Implements VisualMissionItem.

Implemented in CorridorScanComplexItem, and SurveyComplexItem.

◆ sequenceNumber()

int TransectStyleComplexItem::sequenceNumber ( void  ) const
inlinefinalvirtual

◆ setCoordinate()

void TransectStyleComplexItem::setCoordinate ( const QGeoCoordinate &  coordinate)
overridevirtual

◆ setDirty()

void TransectStyleComplexItem::setDirty ( bool  dirty)
finalvirtual

◆ setMissionFlightStatus()

void TransectStyleComplexItem::setMissionFlightStatus ( MissionFlightStatus_t missionFlightStatus)
finalvirtual

Update item to mission flight status at point where this item appears in mission. IMPORTANT: Overrides must call base class implementation

Reimplemented from VisualMissionItem.

Definition at line 351 of file TransectStyleComplexItem.cc.

References _rebuildTransects(), _vehicleSpeed, QGC::fuzzyCompare(), VisualMissionItem::setMissionFlightStatus(), timeBetweenShotsChanged(), and MissionFlightStatus_t::vehicleSpeed.

◆ setSequenceNumber()

void TransectStyleComplexItem::setSequenceNumber ( int  sequenceNumber)
finalvirtual

◆ specifiedFlightSpeed()

double TransectStyleComplexItem::specifiedFlightSpeed ( void  )
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 84 of file TransectStyleComplexItem.h.

◆ specifiedGimbalPitch()

double TransectStyleComplexItem::specifiedGimbalPitch ( void  )
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 86 of file TransectStyleComplexItem.h.

◆ specifiedGimbalYaw()

double TransectStyleComplexItem::specifiedGimbalYaw ( void  )
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 85 of file TransectStyleComplexItem.h.

◆ specifiesAltitudeOnly()

bool TransectStyleComplexItem::specifiesAltitudeOnly ( void  ) const
inlinefinalvirtual

Implements VisualMissionItem.

Definition at line 79 of file TransectStyleComplexItem.h.

◆ specifiesCoordinate()

bool TransectStyleComplexItem::specifiesCoordinate ( void  ) const
overridepure virtual

◆ surveyAreaPolygon()

QGCMapPolygon * TransectStyleComplexItem::surveyAreaPolygon ( void  )
inline

Definition at line 36 of file TransectStyleComplexItem.h.

References _surveyAreaPolygon.

◆ terrainAdjustMaxClimbRate()

Fact * TransectStyleComplexItem::terrainAdjustMaxClimbRate ( void  )
inline

Definition at line 46 of file TransectStyleComplexItem.h.

References _terrainAdjustMaxClimbRateFact.

◆ terrainAdjustMaxDescentRate()

Fact * TransectStyleComplexItem::terrainAdjustMaxDescentRate ( void  )
inline

Definition at line 45 of file TransectStyleComplexItem.h.

References _terrainAdjustMaxDescentRateFact.

◆ terrainAdjustTolerance()

Fact * TransectStyleComplexItem::terrainAdjustTolerance ( void  )
inline

Definition at line 44 of file TransectStyleComplexItem.h.

References _terrainAdjustToleranceFact.

◆ timeBetweenShots()

virtual double TransectStyleComplexItem::timeBetweenShots ( void  )
inlinevirtual

Reimplemented in CorridorScanComplexItem, and SurveyComplexItem.

Definition at line 54 of file TransectStyleComplexItem.h.

◆ timeBetweenShotsChanged

void TransectStyleComplexItem::timeBetweenShotsChanged ( void  )
signal

◆ triggerCamera()

bool TransectStyleComplexItem::triggerCamera ( void  ) const
inline

Definition at line 58 of file TransectStyleComplexItem.h.

References triggerDistance().

Referenced by _buildAndAppendMissionItems(), and lastSequenceNumber().

◆ triggerDistance()

◆ turnAroundDistance()

Fact * TransectStyleComplexItem::turnAroundDistance ( void  )
inline

Definition at line 40 of file TransectStyleComplexItem.h.

References _turnAroundDistanceFact.

◆ visualTransectPoints()

QVariantList TransectStyleComplexItem::visualTransectPoints ( void  )
inline

Definition at line 38 of file TransectStyleComplexItem.h.

References _visualTransectPoints.

◆ visualTransectPointsChanged

void TransectStyleComplexItem::visualTransectPointsChanged ( void  )
signal

Member Data Documentation

◆ _cameraCalc

◆ _cameraShots

int TransectStyleComplexItem::_cameraShots = 0
protected

◆ _cameraTriggerInTurnAroundFact

SettingsFact TransectStyleComplexItem::_cameraTriggerInTurnAroundFact
protected

Definition at line 187 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), and cameraTriggerInTurnAround().

◆ _complexDistance

double TransectStyleComplexItem::_complexDistance = qQNaN()
protected

Definition at line 173 of file TransectStyleComplexItem.h.

Referenced by _recalcComplexDistance(), and complexDistance().

◆ _entryCoordinate

QGeoCoordinate TransectStyleComplexItem::_entryCoordinate
protected

◆ _exitCoordinate

QGeoCoordinate TransectStyleComplexItem::_exitCoordinate
protected

Definition at line 148 of file TransectStyleComplexItem.h.

Referenced by _load(), _rebuildTransects(), and exitCoordinate().

◆ _forceLargeTransectSpacingMeters

constexpr double TransectStyleComplexItem::_forceLargeTransectSpacingMeters = 100000
staticconstexprprotected

Definition at line 204 of file TransectStyleComplexItem.h.

◆ _hoverAndCaptureDelaySeconds

constexpr int TransectStyleComplexItem::_hoverAndCaptureDelaySeconds = 4
staticconstexprprotected

◆ _hoverAndCaptureFact

SettingsFact TransectStyleComplexItem::_hoverAndCaptureFact
protected

Definition at line 188 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), hoverAndCapture(), and hoverAndCapture().

◆ _ignoreRecalc

bool TransectStyleComplexItem::_ignoreRecalc = false
protected

Definition at line 172 of file TransectStyleComplexItem.h.

Referenced by _rebuildTransects().

◆ _jsonCameraCalcKey

constexpr const char* TransectStyleComplexItem::_jsonCameraCalcKey = "CameraCalc"
staticconstexprprotected

Definition at line 195 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ _jsonCameraShotsKey

constexpr const char* TransectStyleComplexItem::_jsonCameraShotsKey = "CameraShots"
staticconstexprprotected

Definition at line 199 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ _jsonItemsKey

constexpr const char* TransectStyleComplexItem::_jsonItemsKey = "Items"
staticconstexprprotected

Definition at line 197 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ _jsonTerrainFlightSpeed

constexpr const char* TransectStyleComplexItem::_jsonTerrainFlightSpeed = "TerrainFlightSpeed"
staticconstexprprotected

Definition at line 198 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ _jsonTransectStyleComplexItemKey

constexpr const char* TransectStyleComplexItem::_jsonTransectStyleComplexItemKey = "TransectStyleComplexItem"
staticconstexprprotected

Definition at line 194 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ _jsonVisualTransectPointsKey

constexpr const char* TransectStyleComplexItem::_jsonVisualTransectPointsKey = "VisualTransectPoints"
staticconstexprprotected

Definition at line 196 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ _loadedMissionItems

QList<MissionItem*> TransectStyleComplexItem::_loadedMissionItems
protected

Mission items loaded from plan file.

Definition at line 182 of file TransectStyleComplexItem.h.

Referenced by _appendLoadedMissionItems(), _load(), amslEntryAlt(), amslExitAlt(), appendMissionItems(), lastSequenceNumber(), and readyForSaveState().

◆ _loadedMissionItemsParent

QObject* TransectStyleComplexItem::_loadedMissionItemsParent = nullptr
protected

Parent for all items in _loadedMissionItems for simpler delete.

Definition at line 181 of file TransectStyleComplexItem.h.

Referenced by _load().

◆ _maxAMSLAltitude

double TransectStyleComplexItem::_maxAMSLAltitude = qQNaN()
protected

Definition at line 179 of file TransectStyleComplexItem.h.

Referenced by _load(), _rebuildTransects(), and maxAMSLAltitude().

◆ _metaDataMap

QMap<QString, FactMetaData*> TransectStyleComplexItem::_metaDataMap
protected

Definition at line 184 of file TransectStyleComplexItem.h.

◆ _minAMSLAltitude

double TransectStyleComplexItem::_minAMSLAltitude = qQNaN()
protected

Definition at line 178 of file TransectStyleComplexItem.h.

Referenced by _load(), _rebuildTransects(), and minAMSLAltitude().

◆ _minimumTransectSpacingMeters

constexpr double TransectStyleComplexItem::_minimumTransectSpacingMeters = 0.3
staticconstexprprotected

Definition at line 203 of file TransectStyleComplexItem.h.

◆ _refly90DegreesFact

SettingsFact TransectStyleComplexItem::_refly90DegreesFact
protected

Definition at line 189 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), and refly90Degrees().

◆ _rgFlightPathCoordInfo

QList<CoordInfo_t> TransectStyleComplexItem::_rgFlightPathCoordInfo
protected

Fully calculated flight path (including terrain if needed)

Definition at line 170 of file TransectStyleComplexItem.h.

Referenced by _buildAndAppendMissionItems(), _rebuildTransects(), amslEntryAlt(), amslExitAlt(), and lastSequenceNumber().

◆ _rgFlyThroughMissionItemCoords

QList<QGeoCoordinate> TransectStyleComplexItem::_rgFlyThroughMissionItemCoords
protected

Definition at line 168 of file TransectStyleComplexItem.h.

◆ _rgFlyThroughMissionItemCoordsTerrainHeights

QList<double> TransectStyleComplexItem::_rgFlyThroughMissionItemCoordsTerrainHeights
protected

Definition at line 169 of file TransectStyleComplexItem.h.

Referenced by _missionItemCoordTerrainData().

◆ _rgPathHeightInfo

QList<TerrainPathQuery::PathHeightInfo_t> TransectStyleComplexItem::_rgPathHeightInfo
protected

Path height for each segment includes turn segments.

Definition at line 167 of file TransectStyleComplexItem.h.

Referenced by _missionItemCoordTerrainData(), _polyPathTerrainData(), _rebuildTransects(), amslEntryAlt(), amslExitAlt(), and readyForSaveState().

◆ _sequenceNumber

int TransectStyleComplexItem::_sequenceNumber = 0
protected

◆ _surveyAreaPolygon

◆ _terrainAdjustMaxClimbRateFact

SettingsFact TransectStyleComplexItem::_terrainAdjustMaxClimbRateFact
protected

Definition at line 191 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), and terrainAdjustMaxClimbRate().

◆ _terrainAdjustMaxDescentRateFact

SettingsFact TransectStyleComplexItem::_terrainAdjustMaxDescentRateFact
protected

Definition at line 192 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), and terrainAdjustMaxDescentRate().

◆ _terrainAdjustToleranceFact

SettingsFact TransectStyleComplexItem::_terrainAdjustToleranceFact
protected

Definition at line 190 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), and terrainAdjustTolerance().

◆ _terrainQueryTimeoutMsecs

constexpr int TransectStyleComplexItem::_terrainQueryTimeoutMsecs = 1000
staticconstexprprotected

Definition at line 201 of file TransectStyleComplexItem.h.

◆ _timeBetweenShots

double TransectStyleComplexItem::_timeBetweenShots = 0
protected

Definition at line 175 of file TransectStyleComplexItem.h.

◆ _transects

QList<QList<CoordInfo_t> > TransectStyleComplexItem::_transects
protected

◆ _turnAroundDistanceFact

SettingsFact TransectStyleComplexItem::_turnAroundDistanceFact
protected

Definition at line 186 of file TransectStyleComplexItem.h.

Referenced by _load(), _save(), _turnAroundDistance(), and turnAroundDistance().

◆ _vehicleSpeed

double TransectStyleComplexItem::_vehicleSpeed = 5
protected

◆ _visualTransectPoints

QVariantList TransectStyleComplexItem::_visualTransectPoints
protected

Used to draw the flight path visuals on the screen.

Definition at line 165 of file TransectStyleComplexItem.h.

Referenced by _load(), _rebuildTransects(), _recalcComplexDistance(), _save(), greatestDistanceTo(), and visualTransectPoints().

◆ cameraTriggerInTurnAroundName

constexpr const char* TransectStyleComplexItem::cameraTriggerInTurnAroundName = "CameraTriggerInTurnAround"
staticconstexpr

Definition at line 104 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ hoverAndCaptureName

constexpr const char* TransectStyleComplexItem::hoverAndCaptureName = "HoverAndCapture"
staticconstexpr

Definition at line 105 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ refly90DegreesName

constexpr const char* TransectStyleComplexItem::refly90DegreesName = "Refly90Degrees"
staticconstexpr

Definition at line 106 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ terrainAdjustMaxClimbRateName

constexpr const char* TransectStyleComplexItem::terrainAdjustMaxClimbRateName = "TerrainAdjustMaxClimbRate"
staticconstexpr

Definition at line 108 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ terrainAdjustMaxDescentRateName

constexpr const char* TransectStyleComplexItem::terrainAdjustMaxDescentRateName = "TerrainAdjustMaxDescentRate"
staticconstexpr

Definition at line 109 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ terrainAdjustToleranceName

constexpr const char* TransectStyleComplexItem::terrainAdjustToleranceName = "TerrainAdjustTolerance"
staticconstexpr

Definition at line 107 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().

◆ turnAroundDistanceMultiRotorName

constexpr const char* TransectStyleComplexItem::turnAroundDistanceMultiRotorName = "TurnAroundDistanceMultiRotor"
staticconstexpr

Definition at line 103 of file TransectStyleComplexItem.h.

◆ turnAroundDistanceName

constexpr const char* TransectStyleComplexItem::turnAroundDistanceName = "TurnAroundDistance"
staticconstexpr

Definition at line 102 of file TransectStyleComplexItem.h.

Referenced by _load(), and _save().


The documentation for this class was generated from the following files: