|
|
|
@ -327,8 +327,10 @@ double TransectStyleComplexItem::greatestDistanceTo(const QGeoCoordinate &other)
@@ -327,8 +327,10 @@ double TransectStyleComplexItem::greatestDistanceTo(const QGeoCoordinate &other)
|
|
|
|
|
void TransectStyleComplexItem::setMissionFlightStatus(MissionController::MissionFlightStatus_t& missionFlightStatus) |
|
|
|
|
{ |
|
|
|
|
ComplexMissionItem::setMissionFlightStatus(missionFlightStatus); |
|
|
|
|
if (!qFuzzyCompare(_cruiseSpeed, missionFlightStatus.vehicleSpeed)) { |
|
|
|
|
_cruiseSpeed = missionFlightStatus.vehicleSpeed; |
|
|
|
|
if (!qFuzzyCompare(_vehicleSpeed, missionFlightStatus.vehicleSpeed)) { |
|
|
|
|
_vehicleSpeed = missionFlightStatus.vehicleSpeed; |
|
|
|
|
// Vehicle speed change affects max climb/descent rates calcs for terrain so we need to re-adjust
|
|
|
|
|
_rebuildTransects(); |
|
|
|
|
emit timeBetweenShotsChanged(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -707,9 +709,9 @@ int TransectStyleComplexItem::_maxPathHeight(const TerrainPathQuery::PathHeightI
@@ -707,9 +709,9 @@ int TransectStyleComplexItem::_maxPathHeight(const TerrainPathQuery::PathHeightI
|
|
|
|
|
|
|
|
|
|
void TransectStyleComplexItem::_adjustForMaxRates(QList<CoordInfo_t>& transect) |
|
|
|
|
{ |
|
|
|
|
double maxClimbRate = _terrainAdjustMaxClimbRateFact.rawValue().toDouble(); |
|
|
|
|
double maxDescentRate = _terrainAdjustMaxDescentRateFact.rawValue().toDouble(); |
|
|
|
|
double flightSpeed = _missionFlightStatus.vehicleSpeed; |
|
|
|
|
double maxClimbRate = _terrainAdjustMaxClimbRateFact.rawValue().toDouble(); |
|
|
|
|
double maxDescentRate = _terrainAdjustMaxDescentRateFact.rawValue().toDouble(); |
|
|
|
|
double flightSpeed = _vehicleSpeed; |
|
|
|
|
|
|
|
|
|
if (qIsNaN(flightSpeed) || (maxClimbRate == 0 && maxDescentRate == 0)) { |
|
|
|
|
if (qIsNaN(flightSpeed)) { |
|
|
|
|