From 0498ccd5e7e71d8b85442d6251135a4707c09a29 Mon Sep 17 00:00:00 2001 From: Flavio Tonelli Date: Sun, 7 Apr 2019 22:35:22 +0200 Subject: [PATCH] BUGFIX: When scanning from the top the starting altitude shall be equal to the structure altitude. --- src/MissionManager/StructureScanComplexItem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MissionManager/StructureScanComplexItem.cc b/src/MissionManager/StructureScanComplexItem.cc index 4544f2b73..8eae2d8ff 100644 --- a/src/MissionManager/StructureScanComplexItem.cc +++ b/src/MissionManager/StructureScanComplexItem.cc @@ -293,7 +293,7 @@ void StructureScanComplexItem::appendMissionItems(QList& items, QO { int seqNum = _sequenceNumber; bool startFromTop = _startFromTopFact.rawValue().toBool(); - double startAltitude = _scanBottomAltFact.rawValue().toDouble() + (startFromTop ? _structureHeightFact.rawValue().toDouble() : 0); + double startAltitude = (startFromTop ? _structureHeightFact.rawValue().toDouble() : _scanBottomAltFact.rawValue().toDouble()); MissionItem* item = nullptr; -- 2.22.0