Skip to content

Commit 467a964

Browse files
committed
Plan: Lower minimum transect spacing to 0.3 meters
1 parent 95b4d5a commit 467a964

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

src/MissionManager/CorridorScanComplexItem.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,11 @@ double CorridorScanComplexItem::timeBetweenShots(void)
394394
double CorridorScanComplexItem::_calcTransectSpacing(void) const
395395
{
396396
double transectSpacing = _cameraCalc.adjustedFootprintSide()->rawValue().toDouble();
397-
if (transectSpacing < 0.5) {
397+
if (transectSpacing < _minimumTransectSpacingMeters) {
398398
// We can't let spacing get too small otherwise we will end up with too many transects.
399-
// So we limit to 0.5 meter spacing as min and set to huge value which will cause a single
400-
// transect to be added.
401-
transectSpacing = 100000;
399+
// So we limit the spacing to be above a small increment and below that value we set to huge spacing
400+
// which will cause a single transect to be added instead of having things blow up.
401+
transectSpacing = _forceLargeTransectSpacingMeters;
402402
}
403403

404404
return transectSpacing;

src/MissionManager/SurveyComplexItem.cc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -674,11 +674,11 @@ void SurveyComplexItem::_rebuildTransectsPhase1WorkerSinglePolygon(bool refly)
674674

675675
double gridAngle = _gridAngleFact.rawValue().toDouble();
676676
double gridSpacing = _cameraCalc.adjustedFootprintSide()->rawValue().toDouble();
677-
if (gridSpacing < 0.5) {
678-
// We can't let gridSpacing get too small otherwise we will end up with too many transects.
679-
// So we limit to 0.5 meter spacing as min and set to huge value which will cause a single
680-
// transect to be added.
681-
gridSpacing = 100000;
677+
if (gridSpacing < _minimumTransectSpacingMeters) {
678+
// We can't let spacing get too small otherwise we will end up with too many transects.
679+
// So we limit the spacing to be above a small increment and below that value we set to huge spacing
680+
// which will cause a single transect to be added instead of having things blow up.
681+
gridSpacing = _forceLargeTransectSpacingMeters;
682682
}
683683

684684
gridAngle = _clampGridAngle90(gridAngle);

src/MissionManager/TransectStyleComplexItem.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,8 @@ protected slots:
211211

212212
static constexpr int _terrainQueryTimeoutMsecs= 1000;
213213
static constexpr int _hoverAndCaptureDelaySeconds = 4;
214+
static constexpr double _minimumTransectSpacingMeters = 0.3;
215+
static constexpr double _forceLargeTransectSpacingMeters = 100000;
214216

215217
private slots:
216218
void _reallyQueryTransectsPathHeightInfo (void);
@@ -245,5 +247,5 @@ private slots:
245247
QTimer _terrainPolyPathQueryTimer;
246248

247249
// Deprecated json keys
248-
static constexpr const char* _jsonTerrainFollowKeyDeprecated = "FollowTerrain";
250+
static constexpr const char* _jsonTerrainFollowKeyDeprecated = "FollowTerrain";
249251
};

0 commit comments

Comments
 (0)