diff --git a/include/core/problem/problem.h b/include/core/problem/problem.h index a3557b0e9e49a0b38851b5af4ea0dc2253a6be3b..e01c6209420ccc7db99cf8be85372da41c5d219d 100644 --- a/include/core/problem/problem.h +++ b/include/core/problem/problem.h @@ -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 diff --git a/src/problem/problem.cpp b/src/problem/problem.cpp index 1cff3a84283ef40e343b6df3af01eb40502a776e..c95128244b1d66cda2d2747ce0940a360e133c03 100644 --- a/src/problem/problem.cpp +++ b/src/problem/problem.cpp @@ -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_; diff --git a/test/gtest_problem.cpp b/test/gtest_problem.cpp index 1d5fb269443065e7dff68a32b5d6a74b0c0a2daf..f173cb84938649867b851f43b507c4e08b777e74 100644 --- a/test/gtest_problem.cpp +++ b/test/gtest_problem.cpp @@ -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)