File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -394,11 +394,11 @@ double CorridorScanComplexItem::timeBetweenShots(void)
394
394
double CorridorScanComplexItem::_calcTransectSpacing (void ) const
395
395
{
396
396
double transectSpacing = _cameraCalc.adjustedFootprintSide ()->rawValue ().toDouble ();
397
- if (transectSpacing < 0.5 ) {
397
+ if (transectSpacing < _minimumTransectSpacingMeters ) {
398
398
// 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 ;
402
402
}
403
403
404
404
return transectSpacing;
Original file line number Diff line number Diff line change @@ -674,11 +674,11 @@ void SurveyComplexItem::_rebuildTransectsPhase1WorkerSinglePolygon(bool refly)
674
674
675
675
double gridAngle = _gridAngleFact.rawValue ().toDouble ();
676
676
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 ;
682
682
}
683
683
684
684
gridAngle = _clampGridAngle90 (gridAngle);
Original file line number Diff line number Diff line change @@ -211,6 +211,8 @@ protected slots:
211
211
212
212
static constexpr int _terrainQueryTimeoutMsecs= 1000 ;
213
213
static constexpr int _hoverAndCaptureDelaySeconds = 4 ;
214
+ static constexpr double _minimumTransectSpacingMeters = 0.3 ;
215
+ static constexpr double _forceLargeTransectSpacingMeters = 100000 ;
214
216
215
217
private slots:
216
218
void _reallyQueryTransectsPathHeightInfo (void );
@@ -245,5 +247,5 @@ private slots:
245
247
QTimer _terrainPolyPathQueryTimer;
246
248
247
249
// Deprecated json keys
248
- static constexpr const char * _jsonTerrainFollowKeyDeprecated = " FollowTerrain" ;
250
+ static constexpr const char * _jsonTerrainFollowKeyDeprecated = " FollowTerrain" ;
249
251
};
You can’t perform that action at this time.
0 commit comments