Commit 9574328f authored by DoinLakeFlyer's avatar DoinLakeFlyer

parent a2c9eb95
...@@ -217,7 +217,7 @@ void CorridorScanComplexItem::_buildAndAppendMissionItems(QList<MissionItem*>& i ...@@ -217,7 +217,7 @@ void CorridorScanComplexItem::_buildAndAppendMissionItems(QList<MissionItem*>& i
firstOverallPoint = false; firstOverallPoint = false;
// Possibly add trigger start/stop to survey area entrance/exit // Possibly add trigger start/stop to survey area entrance/exit
if (triggerCamera() && transectCoordInfo.coordType == TransectStyleComplexItem::CoordTypeSurveyEdge) { if (triggerCamera() && (transectCoordInfo.coordType == TransectStyleComplexItem::CoordTypeSurveyEntry || transectCoordInfo.coordType == TransectStyleComplexItem::CoordTypeSurveyExit)) {
if (transectEntry) { if (transectEntry) {
// Start of transect, always start triggering. We do this even if we are taking images everywhere. // Start of transect, always start triggering. We do this even if we are taking images everywhere.
// This allows a restart of the mission in mid-air without losing images from the entire mission. // This allows a restart of the mission in mid-air without losing images from the entire mission.
...@@ -370,9 +370,9 @@ void CorridorScanComplexItem::_rebuildTransectsPhase1(void) ...@@ -370,9 +370,9 @@ void CorridorScanComplexItem::_rebuildTransectsPhase1(void)
TransectStyleComplexItem::CoordInfo_t coordInfo = { transectCoords[j], CoordTypeInterior }; TransectStyleComplexItem::CoordInfo_t coordInfo = { transectCoords[j], CoordTypeInterior };
transect.append(coordInfo); transect.append(coordInfo);
} }
TransectStyleComplexItem::CoordInfo_t coordInfo = { transectCoords.first(), CoordTypeSurveyEdge }; TransectStyleComplexItem::CoordInfo_t coordInfo = { transectCoords.first(), CoordTypeSurveyEntry };
transect.prepend(coordInfo); transect.prepend(coordInfo);
coordInfo = { transectCoords.last(), CoordTypeSurveyEdge }; coordInfo = { transectCoords.last(), CoordTypeSurveyExit };
transect.append(coordInfo); transect.append(coordInfo);
// Extend the transect ends for turnaround // Extend the transect ends for turnaround
......
...@@ -858,6 +858,20 @@ ...@@ -858,6 +858,20 @@
"default": 25, "default": 25,
"units": "m", "units": "m",
"decimalPlaces": 2 "decimalPlaces": 2
},
"param2": {
"label": "Shutter",
"default": 0,
"units": "msecs",
"decimalPlaces": 0
},
"param3": {
"label": "Trigger",
"default": 25,
"enumStrings": "No Trigger,Once Immediately",
"enumValues": "0,1",
"default": 0,
"decimalPlaces": 0
} }
}, },
{ {
...@@ -1063,6 +1077,22 @@ ...@@ -1063,6 +1077,22 @@
"enumValues": "3,4" "enumValues": "3,4"
} }
}, },
{
"id": 4501,
"rawName": "MAV_CMD_CONDITION_GATE",
"friendlyName": "Condition Gate",
"description": "Delay mission state machine until gate has been reached.",
"specifiesCoordinate": true,
"friendlyEdit": true,
"category": "Conditionals",
"param2": {
"label": "Ignore Alt",
"enumStrings": "False,True",
"enumValues": "0,1",
"default": 1,
"decimalPlaces": 0
}
},
{ "id": 30001, "rawName": "MAV_CMD_PAYLOAD_PREPARE_DEPLOY", "friendlyName": "Payload prepare deploy" }, { "id": 30001, "rawName": "MAV_CMD_PAYLOAD_PREPARE_DEPLOY", "friendlyName": "Payload prepare deploy" },
{ "id": 30002, "rawName": "MAV_CMD_PAYLOAD_CONTROL_DEPLOY", "friendlyName": "Payload control deploy" } { "id": 30002, "rawName": "MAV_CMD_PAYLOAD_CONTROL_DEPLOY", "friendlyName": "Payload control deploy" }
] ]
......
This diff is collapsed.
...@@ -98,7 +98,6 @@ private: ...@@ -98,7 +98,6 @@ private:
void _intersectLinesWithRect(const QList<QLineF>& lineList, const QRectF& boundRect, QList<QLineF>& resultLines); void _intersectLinesWithRect(const QList<QLineF>& lineList, const QRectF& boundRect, QList<QLineF>& resultLines);
void _intersectLinesWithPolygon(const QList<QLineF>& lineList, const QPolygonF& polygon, QList<QLineF>& resultLines); void _intersectLinesWithPolygon(const QList<QLineF>& lineList, const QPolygonF& polygon, QList<QLineF>& resultLines);
void _adjustLineDirection(const QList<QLineF>& lineList, QList<QLineF>& resultLines); void _adjustLineDirection(const QList<QLineF>& lineList, QList<QLineF>& resultLines);
int _appendWaypointToMission(QList<MissionItem*>& items, int seqNum, QGeoCoordinate& coord, CameraTriggerCode cameraTrigger, QObject* missionItemParent);
bool _nextTransectCoord(const QList<QGeoCoordinate>& transectPoints, int pointIndex, QGeoCoordinate& coord); bool _nextTransectCoord(const QList<QGeoCoordinate>& transectPoints, int pointIndex, QGeoCoordinate& coord);
bool _appendMissionItemsWorker(QList<MissionItem*>& items, QObject* missionItemParent, int& seqNum, bool hasRefly, bool buildRefly); bool _appendMissionItemsWorker(QList<MissionItem*>& items, QObject* missionItemParent, int& seqNum, bool hasRefly, bool buildRefly);
void _optimizeTransectsForShortestDistance(const QGeoCoordinate& distanceCoord, QList<QList<QGeoCoordinate>>& transects); void _optimizeTransectsForShortestDistance(const QGeoCoordinate& distanceCoord, QList<QList<QGeoCoordinate>>& transects);
...@@ -130,6 +129,11 @@ private: ...@@ -130,6 +129,11 @@ private:
// return true if vertex a can see vertex b // return true if vertex a can see vertex b
bool _VertexCanSeeOther(const QPolygonF& polygon, const QPointF* vertexA, const QPointF* vertexB); bool _VertexCanSeeOther(const QPolygonF& polygon, const QPointF* vertexA, const QPointF* vertexB);
bool _VertexIsReflex(const QPolygonF& polygon, const QPointF* vertex); bool _VertexIsReflex(const QPolygonF& polygon, const QPointF* vertex);
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);
QMap<QString, FactMetaData*> _metaDataMap; QMap<QString, FactMetaData*> _metaDataMap;
......
...@@ -74,6 +74,9 @@ public: ...@@ -74,6 +74,9 @@ public:
bool hoverAndCaptureEnabled (void) const { return hoverAndCapture()->rawValue().toBool(); } bool hoverAndCaptureEnabled (void) const { return hoverAndCapture()->rawValue().toBool(); }
bool triggerCamera (void) const { return triggerDistance() != 0; } bool triggerCamera (void) const { return triggerDistance() != 0; }
// Used internally only by unit tests
int _transectCount(void) { return _transects.count(); }
// Overrides from ComplexMissionItem // Overrides from ComplexMissionItem
int lastSequenceNumber (void) const final; int lastSequenceNumber (void) const final;
...@@ -159,8 +162,9 @@ protected: ...@@ -159,8 +162,9 @@ protected:
CoordTypeInterior, ///< Interior waypoint for flight path only CoordTypeInterior, ///< Interior waypoint for flight path only
CoordTypeInteriorHoverTrigger, ///< Interior waypoint for hover and capture trigger CoordTypeInteriorHoverTrigger, ///< Interior waypoint for hover and capture trigger
CoordTypeInteriorTerrainAdded, ///< Interior waypoint added for terrain CoordTypeInteriorTerrainAdded, ///< Interior waypoint added for terrain
CoordTypeSurveyEdge, ///< Waypoint at edge of survey polygon CoordTypeSurveyEntry, ///< Waypoint at entry edge of survey polygon
CoordTypeTurnaround ///< Waypoint outside of survey polygon for turnaround CoordTypeSurveyExit, ///< Waypoint at exit edge of survey polygon
CoordTypeTurnaround, ///< First turnaround waypoint
}; };
typedef struct { typedef struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment