Unverified Commit 4cbe2689 authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8459 from DonLakeFlyer/AlternateTransects

Plan: Fix alternate transects
parents 95389228 efb6ab7c
......@@ -64,7 +64,7 @@ Item {
for (var i = 1; i < coordList.length; i++) {
var lat = coordList[i].latitude
var lon = coordList[i].longitude
if (isNaN(lat) || lat == 0 || isNan(lon) || lon == 0) {
if (isNaN(lat) || lat == 0 || isNaN(lon) || lon == 0) {
// Be careful of invalid coords which can happen when items are not yet complete
continue
}
......
......@@ -78,6 +78,11 @@ SurveyComplexItem::SurveyComplexItem(Vehicle* vehicle, bool flyView, const QStri
_turnAroundDistanceFact.setRawValue(10);
}
if (_vehicle && !(_vehicle->fixedWing() || _vehicle->vtol())) {
// Only fixed wing flight paths support alternate transects
_flyAlternateTransectsFact.setRawValue(false);
}
// We override the altitude to the mission default
if (_cameraCalc.isManualCamera() || !_cameraCalc.valueSetIsDistance()->rawValue().toBool()) {
_cameraCalc.distanceToSurface()->setRawValue(qgcApp()->toolbox()->settingsManager()->appSettings()->defaultMissionItemAltitude()->rawValue());
......
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