diff --git a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile.cpp b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile.cpp index fae0b9035..a871d0047 100644 --- a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile.cpp +++ b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile.cpp @@ -321,17 +321,17 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_Profile(pybind11::module& aMo ) .def_static( - "local_orbital_frame", - &Profile::LocalOrbitalFrame, + "local_orbital_frame_pointing", + &Profile::LocalOrbitalFramePointing, R"doc( - Create a nadir pointing profile. + Create a profile aligned with the provided local orbital frame type. Args: orbit (Orbit): The orbit. orbital_frame_type (OrbitalFrameType): The type of the orbital frame. Returns: - Profile: The nadir pointing profile. + Profile: The profile aligned with the local orbital frame. )doc", arg("orbit"), arg("orbital_frame_type") diff --git a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile/Model/Transform.cpp b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile/Model/Transform.cpp index edf315853..390e69442 100644 --- a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile/Model/Transform.cpp +++ b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/Profile/Model/Transform.cpp @@ -116,7 +116,7 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_Profile_Model_Transform(pybin Create a transform for inertial pointing. Args: - trajectory (Trajectory): The trajectory to point at. + trajectory (Trajectory): The trajectory of the satellite. quaternion (Quaternion): The quaternion to rotate the axes by. Returns: @@ -127,17 +127,17 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_Profile_Model_Transform(pybin ) .def_static( - "local_orbital_frame", - &Transform::LocalOrbitalFrame, + "local_orbital_frame_pointing", + &Transform::LocalOrbitalFramePointing, R"doc( - Create a transform for nadir pointing. + Create a profile aligned with the provided local orbital frame type. Args: - orbit (Orbit): The orbit to point at. + orbit (Orbit): The orbit of the satellite. orbital_frame_type (OrbitalFrameType): The type of the orbital frame. Returns: - Transform: The transform for nadir pointing. + Transform: The transform for the local orbital frame pointing. )doc", arg("orbit"), arg("orbital_frame_type") diff --git a/bindings/python/test/test_viewer.py b/bindings/python/test/test_viewer.py index 427c32429..02cad2530 100644 --- a/bindings/python/test/test_viewer.py +++ b/bindings/python/test/test_viewer.py @@ -38,7 +38,7 @@ def orbit(environment: Environment) -> Orbit: @pytest.fixture def profile(orbit: Orbit) -> Profile: - return Profile.local_orbital_frame( + return Profile.local_orbital_frame_pointing( orbit=orbit, orbital_frame_type=Orbit.FrameType.VVLH, ) diff --git a/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile.hpp b/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile.hpp index ea7d10e70..e3adeacbb 100644 --- a/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile.hpp +++ b/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile.hpp @@ -287,12 +287,12 @@ class Profile /// @return Flight profile static Profile InertialPointing(const Trajectory& aTrajectory, const Quaternion& aQuaternion); - /// @brief Constructs a flight profile with nadir pointing + /// @brief Constructs a flight profile with local orbital frame pointing /// /// @param anOrbit An orbit /// @param anOrbitalFrameType An orbital frame type /// @return Flight profile - static Profile LocalOrbitalFrame( + static Profile LocalOrbitalFramePointing( const trajectory::Orbit& anOrbit, const trajectory::Orbit::FrameType& anOrbitalFrameType ); diff --git a/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.hpp b/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.hpp index 2ca9bff45..7456e0e38 100644 --- a/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.hpp +++ b/include/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.hpp @@ -71,12 +71,12 @@ class Transform : public virtual Model /// @return Flight profile static Transform InertialPointing(const Trajectory& aTrajectory, const Quaternion& aQuaternion); - /// @brief Constructs a flight profile with nadir pointing + /// @brief Constructs a flight profile with local orbital frame pointing /// /// @param anOrbit An orbit /// @param anOrbitalFrameType An orbital frame type /// @return Flight profile - static Transform LocalOrbitalFrame( + static Transform LocalOrbitalFramePointing( const trajectory::Orbit& anOrbit, const trajectory::Orbit::FrameType& anOrbitalFrameType ); diff --git a/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile.cpp b/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile.cpp index 3b57b726e..beaa35629 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile.cpp @@ -216,11 +216,11 @@ Profile Profile::InertialPointing(const Trajectory& aTrajectory, const Quaternio return {TransformModel::InertialPointing(aTrajectory, aQuaternion)}; } -Profile Profile::LocalOrbitalFrame( +Profile Profile::LocalOrbitalFramePointing( const trajectory::Orbit& anOrbit, const trajectory::Orbit::FrameType& anOrbitalFrameType ) { - return {TransformModel::LocalOrbitalFrame(anOrbit, anOrbitalFrameType)}; + return {TransformModel::LocalOrbitalFramePointing(anOrbit, anOrbitalFrameType)}; } Profile Profile::CustomPointing( diff --git a/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.cpp b/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.cpp index 4da1447d0..1e5ec4890 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Model/Transform.cpp @@ -164,7 +164,7 @@ Transform Transform::InertialPointing(const Trajectory& aTrajectory, const Quate return {dynamicTransformProvider, Frame::GCRF()}; } -Transform Transform::LocalOrbitalFrame( +Transform Transform::LocalOrbitalFramePointing( const trajectory::Orbit& anOrbit, const trajectory::Orbit::FrameType& anOrbitalFrameType ) { diff --git a/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile.test.cpp index 92e3a061d..22671e25d 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile.test.cpp @@ -103,7 +103,7 @@ class OpenSpaceToolkit_Astrodynamics_Flight_Profile : public ::testing::Test this->orbit_ = {keplerianModel, environment.accessCelestialObjectWithName("Earth")}; - this->profile_ = Profile::LocalOrbitalFrame(this->orbit_, Orbit::FrameType::VVLH); + this->profile_ = Profile::LocalOrbitalFramePointing(this->orbit_, Orbit::FrameType::VVLH); } Orbit orbit_ = Orbit::Undefined(); @@ -382,7 +382,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, InertialPointing) } // TBI: Should move these tests to the Transform test suite and only test interface here -TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) +TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, LocalOrbitalFramePointing_VVLH) { // VVLH #1 @@ -410,7 +410,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) const Orbit orbit = {keplerianModel, environment.accessCelestialObjectWithName("Earth")}; - const Profile profile = Profile::LocalOrbitalFrame(orbit, Orbit::FrameType::VVLH); + const Profile profile = Profile::LocalOrbitalFramePointing(orbit, Orbit::FrameType::VVLH); const Real positionTolerance_m = 1e-3; const Real velocityTolerance_meterPerSec = 1e-6; @@ -419,9 +419,10 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) // Reference data setup - const File referenceDataFile = - File::Path(Path::Parse("/app/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/LocalOrbitalFrame/VVLH/" - "Satellite_1 t_UTC x_GCRF v_GCRF q_B_GCRF w_B_GCRF_in_GCRF.csv")); + const File referenceDataFile = File::Path( + Path::Parse("/app/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/LocalOrbitalFramePointing/VVLH/" + "Satellite_1 t_UTC x_GCRF v_GCRF q_B_GCRF w_B_GCRF_in_GCRF.csv") + ); const Table referenceData = Table::Load(referenceDataFile, Table::Format::CSV, true); @@ -520,7 +521,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) const Orbit orbit = {keplerianModel, environment.accessCelestialObjectWithName("Earth")}; - const Profile profile = Profile::LocalOrbitalFrame(orbit, Orbit::FrameType::VVLH); + const Profile profile = Profile::LocalOrbitalFramePointing(orbit, Orbit::FrameType::VVLH); const Real positionTolerance_m = 1e-3; const Real velocityTolerance_meterPerSec = 1e-6; @@ -529,9 +530,10 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) // Reference data setup - const File referenceDataFile = - File::Path(Path::Parse("/app/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/LocalOrbitalFrame/VVLH/" - "Satellite_2 t_UTC x_GCRF v_GCRF q_B_GCRF w_B_GCRF_in_GCRF.csv")); + const File referenceDataFile = File::Path( + Path::Parse("/app/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/LocalOrbitalFramePointing/VVLH/" + "Satellite_2 t_UTC x_GCRF v_GCRF q_B_GCRF w_B_GCRF_in_GCRF.csv") + ); const Table referenceData = Table::Load(referenceDataFile, Table::Format::CSV, true); @@ -630,7 +632,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) const Orbit orbit = {keplerianModel, environment.accessCelestialObjectWithName("Earth")}; - const Profile profile = Profile::LocalOrbitalFrame(orbit, Orbit::FrameType::VVLH); + const Profile profile = Profile::LocalOrbitalFramePointing(orbit, Orbit::FrameType::VVLH); const Real positionTolerance_m = 1e-3; const Real velocityTolerance_meterPerSec = 1e-6; @@ -639,9 +641,10 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, NadirPointing_VVLH) // Reference data setup - const File referenceDataFile = - File::Path(Path::Parse("/app/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/LocalOrbitalFrame/VVLH/" - "Satellite_3 t_UTC x_GCRF v_GCRF q_B_GCRF w_B_GCRF_in_GCRF.csv")); + const File referenceDataFile = File::Path( + Path::Parse("/app/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/LocalOrbitalFramePointing/VVLH/" + "Satellite_3 t_UTC x_GCRF v_GCRF q_B_GCRF w_B_GCRF_in_GCRF.csv") + ); const Table referenceData = Table::Load(referenceDataFile, Table::Format::CSV, true); @@ -988,7 +991,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile, CustomPointing) // Compare against Orbit VNC frame which has been validated - const Profile expectedProfile = Profile::LocalOrbitalFrame(orbit, Orbit::FrameType::VNC); + const Profile expectedProfile = Profile::LocalOrbitalFramePointing(orbit, Orbit::FrameType::VNC); for (const auto instant : Interval::Closed(epoch, epoch + Duration::Hours(1.0)).generateGrid(Duration::Minutes(5.0))) diff --git a/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Transform.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Transform.test.cpp index b881e886d..d4e9128f2 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Transform.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Flight/Profile/Transform.test.cpp @@ -76,7 +76,7 @@ class OpenSpaceToolkit_Astrodynamics_Flight_Profile_Models_Transform : public :: this->orbit_ = {keplerianModel, environment.accessCelestialObjectWithName("Earth")}; - this->transform_ = Transform::LocalOrbitalFrame(this->orbit_, Orbit::FrameType::VVLH); + this->transform_ = Transform::LocalOrbitalFramePointing(this->orbit_, Orbit::FrameType::VVLH); } Orbit orbit_ = Orbit::Undefined(); @@ -209,9 +209,9 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile_Models_Transform, InertialP } } -TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile_Models_Transform, LocalOrbitalFrame) +TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_Profile_Models_Transform, LocalOrbitalFramePointing) { { - EXPECT_TRUE(Transform::LocalOrbitalFrame(orbit_, Orbit::FrameType::VVLH).isDefined()); + EXPECT_TRUE(Transform::LocalOrbitalFramePointing(orbit_, Orbit::FrameType::VVLH).isDefined()); } }