MCPcopy Create free account
hub / github.com/TUC-ProAut/libRSF / setVariableInsideWindow

Method setVariableInsideWindow

src/FactorGraph.cpp:631–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629 }
630
631 void FactorGraph::setVariableInsideWindow(const string Name, const double TimeWindow, const double CurrentTime)
632 {
633 /** find end of the current state */
634 double Timestamp;
635 bool TimestampExists = _StateData.getTimeLast(Name, Timestamp);
636
637 /** estimate end */
638 const double CutTime = CurrentTime - TimeWindow;
639
640 /** loop over timestamps that are newer than CutTime */
641 if (TimestampExists)
642 {
643 while ((Timestamp > CutTime) && TimestampExists)
644 {
645 setVariable(Name, Timestamp);
646 TimestampExists = _StateData.getTimePrev(Name, Timestamp, Timestamp);
647 }
648 }
649 else if (!_StateData.checkID(Name))
650 {
651 PRINT_ERROR("State doesn't exist: ", Name);
652 }
653 }
654
655 void FactorGraph::setAllVariableInsideWindow(const double TimeWindow, const double CurrentTime)
656 {

Callers

nothing calls this directly

Calls 3

getTimePrevMethod · 0.80
checkIDMethod · 0.80
getTimeLastMethod · 0.45

Tested by

no test coverage detected