diff --git a/include/core/processor/is_motion.h b/include/core/processor/is_motion.h index 2f725e18d723463e810441c83f7fc81acc206785..09d7bc68dee5511c28ee456bb42467e89168bbb4 100644 --- a/include/core/processor/is_motion.h +++ b/include/core/processor/is_motion.h @@ -26,8 +26,8 @@ class IsMotion // Queries to the processor: virtual TimeStamp getTimeStamp() const = 0; - virtual VectorComposite getState() const = 0; - virtual VectorComposite getState(const TimeStamp& _ts) const = 0; + virtual VectorComposite getState(const StateStructure& _structure = "") const = 0; + virtual VectorComposite getState(const TimeStamp& _ts, const StateStructure& _structure = "") const = 0; std::string getStateStructure(){return state_structure_;}; void setStateStructure(std::string _state_structure){state_structure_ = _state_structure;}; diff --git a/include/core/processor/processor_motion.h b/include/core/processor/processor_motion.h index 4df3a67fb9dcf99d07b6009f11f9906f7c4c9377..ef155cee11d49a9e0deb6c7c884e35d5cbc95b53 100644 --- a/include/core/processor/processor_motion.h +++ b/include/core/processor/processor_motion.h @@ -166,8 +166,8 @@ class ProcessorMotion : public ProcessorBase, public IsMotion // Queries to the processor: TimeStamp getTimeStamp() const override; - VectorComposite getState() const override; - VectorComposite getState(const TimeStamp& _ts) const override; + VectorComposite getState(const StateStructure& _structure = "") const override; + VectorComposite getState(const TimeStamp& _ts, const StateStructure& _structure = "") const override; /** \brief Gets the delta preintegrated covariance from all integrations so far * \return the delta preintegrated covariance matrix diff --git a/src/processor/processor_motion.cpp b/src/processor/processor_motion.cpp index 23dd66ba1656808066c272d65eb2569dc825560c..9aea50f6cb7dd123bcc8728bda1b9a46fcc0335e 100644 --- a/src/processor/processor_motion.cpp +++ b/src/processor/processor_motion.cpp @@ -400,7 +400,7 @@ void ProcessorMotion::processCapture(CaptureBasePtr _incoming_ptr) postProcess(); } -VectorComposite ProcessorMotion::getState() const +VectorComposite ProcessorMotion::getState(const StateStructure& _structure) const { if (last_ptr_ == nullptr or last_ptr_->getFrame() == nullptr) // We do not have any info of where to find a valid state @@ -474,7 +474,7 @@ VectorComposite ProcessorMotion::getState() const // _x needs to have the size of the processor state -VectorComposite ProcessorMotion::getState(const TimeStamp& _ts) const +VectorComposite ProcessorMotion::getState(const TimeStamp& _ts, const StateStructure& _structure) const { // We need to search for the capture containing a motion buffer with the queried time stamp