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

Remove getStructureSize() from Problem

parent 2c70794f
No related branches found
No related tags found
1 merge request!366Resolve "Complete state vector new data structure?"
......@@ -83,8 +83,6 @@ class Problem : public std::enable_shared_from_this<Problem>
// Properties -----------------------------------------
public:
SizeEigen getFrameStructureSize() const;
void getFrameStructureSize(SizeEigen& _x_size, SizeEigen& _cov_size) const;
SizeEigen getDim() const;
StateStructure getFrameStructure() const;
......@@ -208,7 +206,7 @@ class Problem : public std::enable_shared_from_this<Problem>
const TimeStamp &_ts,
const double &_time_tol);
/** \brief Emplace frame from string frame_structure
/** \brief Emplace frame from string frame_structure, dimension and vector
* \param _frame_key_type Either KEY, AUXILIARY or NON_ESTIMATED
* \param _time_stamp Time stamp of the frame
* \param _frame_structure String indicating the frame structure.
......@@ -226,12 +224,14 @@ class Problem : public std::enable_shared_from_this<Problem>
const SizeEigen _dim, //
const Eigen::VectorXd& _frame_state);
/** \brief Emplace frame from string frame_structure
/** \brief Emplace frame from string frame_structure and state
* \param _frame_key_type Either KEY, AUXILIARY or NON_ESTIMATED
* \param _time_stamp Time stamp of the frame
* \param _frame_structure String indicating the frame structure.
* \param _frame_state State vector; must match the size and format of the chosen frame structure
*
* - The dimension is taken from Problem
*
* This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
* - Create a Frame
* - Add it to Trajectory
......@@ -242,11 +242,14 @@ class Problem : public std::enable_shared_from_this<Problem>
const StateStructure& _frame_structure, //
const VectorComposite& _frame_state);
/** \brief Emplace frame from string frame_structure
/** \brief Emplace frame from state
* \param _frame_key_type Either KEY, AUXILIARY or NON_ESTIMATED
* \param _time_stamp Time stamp of the frame
* \param _frame_state State; must be part of the problem's frame structure
*
* - The structure is taken from Problem
* - The dimension is taken from Problem
*
* This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
* - Create a Frame
* - Add it to Trajectory
......@@ -256,12 +259,15 @@ class Problem : public std::enable_shared_from_this<Problem>
const TimeStamp& _time_stamp, //
const VectorComposite& _frame_state);
/** \brief Emplace frame from string frame_structure without state
/** \brief Emplace frame from string frame_structure and dimension
* \param _frame_key_type Either KEY, AUXILIARY or NON_ESTIMATED
* \param _time_stamp Time stamp of the frame
* \param _frame_structure String indicating the frame structure.
* \param _dim variable indicating the dimension of the problem
*
* - The dimension is taken from Problem
* - The state is taken from Problem
*
* This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
* - Create a Frame
* - Add it to Trajectory
......@@ -272,11 +278,14 @@ class Problem : public std::enable_shared_from_this<Problem>
const StateStructure& _frame_structure, //
const SizeEigen _dim);
/** \brief Emplace frame from string frame_structure without structure
/** \brief Emplace frame from state vector
* \param _frame_key_type Either KEY, AUXILIARY or NON_ESTIMATED
* \param _time_stamp Time stamp of the frame
* \param _frame_state State vector; must match the size and format of the chosen frame structure
*
* - The structure is taken from Problem
* - The dimension is taken from Problem
*
* This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
* - Create a Frame
* - Add it to Trajectory
......@@ -286,10 +295,14 @@ class Problem : public std::enable_shared_from_this<Problem>
const TimeStamp& _time_stamp, //
const Eigen::VectorXd& _frame_state);
/** \brief Emplace frame from string frame_structure without structure nor state
/** \brief Emplace frame, guess all values
* \param _frame_key_type Either KEY, AUXILIARY or NON_ESTIMATED
* \param _time_stamp Time stamp of the frame
*
* - The structure is taken from Problem
* - The dimension is taken from Problem
* - The state is taken from Problem
*
* This acts as a Frame factory, but also takes care to update related lists in WolfProblem:
* - Create a Frame
* - Add it to Trajectory
......
......@@ -483,17 +483,6 @@ VectorComposite Problem::getState (const TimeStamp& _ts, const StateStructure& _
return state;
}
SizeEigen Problem::getFrameStructureSize() const
{
return state_size_;
}
void Problem::getFrameStructureSize(SizeEigen& _x_size, SizeEigen& _cov_size) const
{
_x_size = state_size_;
_cov_size = state_cov_size_;
}
SizeEigen Problem::getDim() const
{
return dim_;
......
......@@ -74,7 +74,7 @@ TEST(Problem, create)
ASSERT_EQ(P, P->getMap()->getProblem());
// check frame structure through the state size
ASSERT_EQ(P->getFrameStructureSize(), 10);
ASSERT_EQ(P->getFrameStructure(), "POV");
}
TEST(Problem, Sensors)
......
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