39 const double maxSearchDeviation,
const double tK) {
40 std::_Rb_tree_iterator<std::pair<const double, gtsam::Key>> upperIterator;
54 auto lowerIterator = upperIterator;
58 tInGraph = std::abs(tK - lowerIterator->first) < std::abs(upperIterator->first - tK) ? lowerIterator->first : upperIterator->first;
59 key = std::abs(tK - lowerIterator->first) < std::abs(upperIterator->first - tK) ? lowerIterator->second : upperIterator->second;
60 double timeDeviation = tInGraph - tK;
63 std::cout <<
YELLOW_START <<
"GMsf-TimeKeyBuffer" <<
COLOR_END <<
" " << callingName << std::setprecision(14)
64 <<
" searched time step: " << tK << std::endl;
65 std::cout <<
YELLOW_START <<
"GMsf-TimeKeyBuffer" <<
COLOR_END <<
" " << callingName << std::setprecision(14)
66 <<
" found time step: " << tInGraph <<
" at key " << key << std::endl;
67 std::cout <<
YELLOW_START <<
"GMsf-TimeKeyBuffer" <<
COLOR_END <<
" Time Deviation (t_graph-t_request): " << 1000 * timeDeviation
68 <<
" ms" << std::endl;
70 <<
", hence absolut delay of measurement is " << 1000 * (
tLatestInBuffer_ - tK) <<
"ms." << std::endl;
74 if (std::abs(timeDeviation) > maxSearchDeviation) {