Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions crhmcode/src/core/CRHMmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2308,7 +2308,7 @@ MMSData * CRHMmain::RunClick2Start()
}
}


Global::DTmin = (int)((DTstartR - Global::DTstart)* Global::Freq);
Global::DTindx = Global::DTmin;
Global::DTnow = Global::DTstart + Global::Interval*((long long)Global::DTindx + 1ll);
Expand Down Expand Up @@ -2351,13 +2351,19 @@ MMSData * CRHMmain::RunClick2Start()
GoodRun = false;
}


ClassData * FileData = NULL;
if (ObsFilesList->size() > 0)
{
FileData = ObsFilesList->begin()->second;
const double tolerance = 1e-9; // to handle floating point precision when DTstartR and FileData->Dt1 are effectively equal but have slightly different precision and then entered the first if statement below.

if (fabs(DTstartR - FileData->Dt1) < tolerance) { // check if effectively equal

LogMessageX("DTstartR and FileData->Dt1 are effectively equal but there still may be a small difference due to floating point precision");

} else if (DTstartR < FileData->Dt1 - tolerance) {

if (DTstartR < FileData->Dt1) {
LogMessageX("Start Time before first Observation");
GoodRun = false;
}
Expand Down