diff --git a/src/environment/global/moon_rotation.cpp b/src/environment/global/moon_rotation.cpp index 1314de4f7..1b8aea98d 100644 --- a/src/environment/global/moon_rotation.cpp +++ b/src/environment/global/moon_rotation.cpp @@ -19,7 +19,7 @@ void MoonRotation::Update(const SimulationTime& simulation_time) { if (mode_ == MoonRotationMode::kSimple) { math::Vector<3> moon_position_eci_m = celestial_information_.GetPositionFromSelectedBody_i_m("MOON", "EARTH"); math::Vector<3> moon_velocity_eci_m_s = celestial_information_.GetVelocityFromSelectedBody_i_m_s("MOON", "EARTH"); - dcm_j2000_to_mcmf_ = CalcDcmEciToPrincipalAxis(moon_position_eci_m, moon_velocity_eci_m_s); + dcm_j2000_to_mcmf_ = planet_rotation::CalcDcmEciToPrincipalAxis(moon_position_eci_m, moon_velocity_eci_m_s); } else if (mode_ == MoonRotationMode::kIauMoon) { ConstSpiceChar from[] = "J2000"; ConstSpiceChar to[] = "IAU_MOON"; diff --git a/src/math_physics/planet_rotation/moon_rotation_utilities.cpp b/src/math_physics/planet_rotation/moon_rotation_utilities.cpp index 93a3ee2e5..cd6dc020a 100644 --- a/src/math_physics/planet_rotation/moon_rotation_utilities.cpp +++ b/src/math_physics/planet_rotation/moon_rotation_utilities.cpp @@ -10,6 +10,8 @@ #include +namespace planet_rotation { + math::Matrix<3, 3> CalcDcmEciToPrincipalAxis(const math::Vector<3> moon_position_eci_m, const math::Vector<3> moon_velocity_eci_m_s) { math::Matrix<3, 3> dcm_eci2me = CalcDcmEciToMeanEarth(moon_position_eci_m, moon_velocity_eci_m_s); math::Matrix<3, 3> dcm_me2pa = CalcDcmMeanEarthToPrincipalAxis(); @@ -46,3 +48,5 @@ math::Matrix<3, 3> CalcDcmMeanEarthToPrincipalAxis() { return dcm_me_pa; } + +} // namespace planet_rotation diff --git a/src/math_physics/planet_rotation/moon_rotation_utilities.hpp b/src/math_physics/planet_rotation/moon_rotation_utilities.hpp index e2726f5e4..9ce97f876 100644 --- a/src/math_physics/planet_rotation/moon_rotation_utilities.hpp +++ b/src/math_physics/planet_rotation/moon_rotation_utilities.hpp @@ -12,6 +12,8 @@ #include "math_physics/math/matrix.hpp" #include "math_physics/math/vector.hpp" +namespace planet_rotation { + /** * @fn CalcDcmEciToPrincipalAxis * @brief Calculate DCM from ECI to PA (Principal Axis) moon fixed frame @@ -34,4 +36,6 @@ math::Matrix<3, 3> CalcDcmEciToMeanEarth(const math::Vector<3> moon_position_eci */ math::Matrix<3, 3> CalcDcmMeanEarthToPrincipalAxis(); +} // namespace planet_rotation + #endif // S2E_LIBRARY_PLANET_ROTATION_MOON_MEAN_EARTH_PRINCIPAL_AXIS_FRAME_HPP_