Add time stamp tolerance to problem::check()
It would be very interesting to check whether each Capture in the wolf tree is within time tolerance with the KF above.
- When processors create KF, they attach their Captures to it, and give the TS of the Capture to the KF. In this case, the time stamps of C and KF match exactly.
- But when processors join the KFs made by others, the join is made according to a time tolerance between the own capture and the externally received KF. This time tolerance is a parameter of the processor.
In problem->check(), we should check that all these tolerances are OK.
It is not obvious since it is unclear up to which point we kept track of which Captures were processed by which Processor.
To start, we could check each Capture against the tolerance of all the processors of its own sensor:
for (const auto& Cap : Frame)
{
double time_diff = fabs(Cap->getTimeStamp - Frame->getTimeStamp())
const auto& Sen = Cap->getSensor();
for (const auto& Prc : Sen->getProcessorList())
{
const auto& time_tol = Prc->getTimeTolerance();
// ----------------------------------
//
// check that time_diff <= time_tol;
//
// ----------------------------------
}
}
Edited by Joan Solà Ortega