Commit fc0e560f authored by Adyasha Dash's avatar Adyasha Dash

check for when survey mission is the first item

parent 2a610aea
......@@ -844,6 +844,14 @@ void MissionController::_recalcAltitudeRangeBearing()
missionMaxTelemetry = telemetryDistance;
}
}
else if (lastCoordinateItem == homeItem && !item->isSimpleItem()){
missionDistance += qobject_cast<ComplexMissionItem*>(item)->surveyDistance();
missionMaxTelemetry = qobject_cast<ComplexMissionItem*>(item)->greatestDistanceTo(homeItem->exitCoordinate());
if (vtolCalc){
cruiseDistance += qobject_cast<ComplexMissionItem*>(item)->surveyDistance(); //assume all survey missions undertaken in cruise
}
}
lastCoordinateItem = item;
}
}
......
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