Commit 67f69b85 authored by DonLakeFlyer's avatar DonLakeFlyer

Fix item generation

parent 65369153
...@@ -380,9 +380,11 @@ void CorridorScanComplexItem::_rebuildTransectsPhase1(void) ...@@ -380,9 +380,11 @@ void CorridorScanComplexItem::_rebuildTransectsPhase1(void)
// Extend the transect ends for turnaround // Extend the transect ends for turnaround
double azimuth = transect[0].azimuthTo(transect[1]); double azimuth = transect[0].azimuthTo(transect[1]);
extensionCoord = transect[0].atDistanceAndAzimuth(-_turnAroundDistanceFact.rawValue().toDouble(), azimuth); extensionCoord = transect[0].atDistanceAndAzimuth(-_turnAroundDistanceFact.rawValue().toDouble(), azimuth);
extensionCoord.setAltitude(qQNaN());
transect.prepend(extensionCoord); transect.prepend(extensionCoord);
azimuth = transect.last().azimuthTo(transect[transect.count() - 2]); azimuth = transect.last().azimuthTo(transect[transect.count() - 2]);
extensionCoord = transect.last().atDistanceAndAzimuth(-_turnAroundDistanceFact.rawValue().toDouble(), azimuth); extensionCoord = transect.last().atDistanceAndAzimuth(-_turnAroundDistanceFact.rawValue().toDouble(), azimuth);
extensionCoord.setAltitude(qQNaN());
transect.append(extensionCoord); transect.append(extensionCoord);
} }
......
...@@ -388,11 +388,16 @@ void TransectStyleComplexItem::_adjustTransectPointsForTerrain(void) ...@@ -388,11 +388,16 @@ void TransectStyleComplexItem::_adjustTransectPointsForTerrain(void)
// Take care of last point // Take care of last point
QGeoCoordinate transectPoint = _transectPoints.last().value<QGeoCoordinate>(); QGeoCoordinate transectPoint = _transectPoints.last().value<QGeoCoordinate>();
bool surveyEdgeIndicator = transectPoint.altitude() == _surveyEdgeIndicator;
if (_followTerrain){ if (_followTerrain){
transectPoint.setAltitude(_transectsPathHeightInfo.last().rgHeight.last() + altitude); transectPoint.setAltitude(_transectsPathHeightInfo.last().rgHeight.last() + altitude);
} else { } else {
transectPoint.setAltitude(altitude); transectPoint.setAltitude(altitude);
} }
if (surveyEdgeIndicator) {
// Use to indicate survey edge
transectPoint.setAltitude(-transectPoint.altitude());
}
_transectPoints[_transectPoints.count() - 1] = QVariant::fromValue(transectPoint); _transectPoints[_transectPoints.count() - 1] = QVariant::fromValue(transectPoint);
} }
......
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