From fc25bd3ebd86c567f17f89b63fd658246dccc5f3 Mon Sep 17 00:00:00 2001 From: DonLakeFlyer Date: Thu, 17 Aug 2017 10:27:53 -0700 Subject: [PATCH] Fix camera shot calculation --- src/MissionManager/SurveyMissionItem.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/MissionManager/SurveyMissionItem.cc b/src/MissionManager/SurveyMissionItem.cc index eb28e7ec78..94520eefee 100644 --- a/src/MissionManager/SurveyMissionItem.cc +++ b/src/MissionManager/SurveyMissionItem.cc @@ -747,7 +747,9 @@ void SurveyMissionItem::_generateGrid(void) _setSurveyDistance(surveyDistance); if (cameraShots == 0 && _triggerCamera()) { - cameraShots = (int)ceil(surveyDistance / _triggerDistance()); + cameraShots = (int)floor(surveyDistance / _triggerDistance()); + // Take into account immediate camera trigger at waypoint entry + cameraShots++; } _setCameraShots(cameraShots); @@ -1065,7 +1067,9 @@ int SurveyMissionItem::_gridGenerator(const QList& polygonPoints, QLis // Calc camera shots here if there are no images in turnaround if (_triggerCamera() && !_imagesEverywhere()) { for (int i=0; i