Skip to content
Snippets Groups Projects
Commit 0cef6ecf authored by Joan Solà Ortega's avatar Joan Solà Ortega
Browse files

Add composite vector getters to ProcMotion

parent cb74da1d
No related branches found
No related tags found
1 merge request!343WIP: Resolve "Complete state vector new data structure?"
...@@ -136,11 +136,6 @@ class ProcessorMotion : public ProcessorBase, public IsMotion ...@@ -136,11 +136,6 @@ class ProcessorMotion : public ProcessorBase, public IsMotion
// TODO move somewhere below
virtual bool getStateComposite(VectorComposite& _state) const override;
virtual bool getStateComposite(const TimeStamp& _ts, VectorComposite& _state) const override;
using IsMotion::getStateComposite;
...@@ -174,6 +169,11 @@ class ProcessorMotion : public ProcessorBase, public IsMotion ...@@ -174,6 +169,11 @@ class ProcessorMotion : public ProcessorBase, public IsMotion
// Queries to the processor: // Queries to the processor:
virtual bool getVectorComposite(VectorComposite& _state) const override;
virtual bool getVectorComposite(const TimeStamp& _ts, VectorComposite& _state) const override;
using IsMotion::getVectorComposite;
/** \brief Fill a reference to the state integrated so far /** \brief Fill a reference to the state integrated so far
* \param _x the returned state vector * \param _x the returned state vector
*/ */
......
...@@ -398,16 +398,21 @@ bool ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXd& _x) const ...@@ -398,16 +398,21 @@ bool ProcessorMotion::getState(const TimeStamp& _ts, Eigen::VectorXd& _x) const
return true; return true;
} }
bool ProcessorMotion::getStateComposite(VectorComposite& _state) const bool ProcessorMotion::getVectorComposite(VectorComposite& _state) const
{ {
// TODO implement this // TODO implement this
if (last_ptr_ && last_ptr_->getFrame()) if (last_ptr_ && last_ptr_->getFrame())
return getLast()->getFrame()->getVectorComposite(_state); return last_ptr_->getFrame()->getVectorComposite(_state);
else else
return false; if (origin_ptr_ && origin_ptr_->getFrame())
return origin_ptr_->getFrame()->getVectorComposite(_state);
else
return false;
} }
bool ProcessorMotion::getStateComposite(const TimeStamp& _ts, VectorComposite& _state) const bool ProcessorMotion::getVectorComposite(const TimeStamp& _ts, VectorComposite& _state) const
{ {
// TODO implement this // TODO implement this
if (last_ptr_ && last_ptr_->getFrame()) if (last_ptr_ && last_ptr_->getFrame())
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment