diff --git a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/System/PropulsionSystem.cpp b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/System/PropulsionSystem.cpp index ca583b2f8..7984d339b 100644 --- a/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/System/PropulsionSystem.cpp +++ b/bindings/python/src/OpenSpaceToolkitAstrodynamicsPy/Flight/System/PropulsionSystem.cpp @@ -1,7 +1,5 @@ /// Apache License 2.0 -#include - #include inline void OpenSpaceToolkitAstrodynamicsPy_Flight_System_PropulsionSystem(pybind11::module& aModule) @@ -10,10 +8,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_System_PropulsionSystem(pybin using ostk::core::type::Real; - using ostk::physics::Unit; - using ostk::physics::unit::Mass; - using ostk::physics::data::Scalar; - using ostk::astrodynamics::flight::system::PropulsionSystem; { @@ -26,20 +20,6 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_System_PropulsionSystem(pybin )doc" ) - // .def( - // init([](const Real& thrust, const Unit& thrustUnit, const Real& specificImpulse, const Unit& - // specificImpulseUnit) - // { - // return PropulsionSystem(Scalar(thrust, thrustUnit), Scalar(specificImpulse, - // specificImpulseUnit)); - // } - // ), - // arg("thrust"), - // arg("thrust_unit"), - // arg("specific_impulse"), - // arg("specific_unit") - // ) - .def( init(), R"doc( @@ -56,8 +36,8 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_System_PropulsionSystem(pybin .def(self == self) .def(self != self) - // .def("__str__", &(shiftToString)) - // .def("__repr__", &(shiftToString)) + .def("__str__", &(shiftToString)) + .def("__repr__", &(shiftToString)) .def( "is_defined", @@ -70,10 +50,50 @@ inline void OpenSpaceToolkitAstrodynamicsPy_Flight_System_PropulsionSystem(pybin )doc" ) - // .def("get_thrust", &PropulsionSystem::getThrust) - // .def("get_specific_impulse", &PropulsionSystem::getSpecificImpulse) - // .def("get_mass_flow_rate", &PropulsionSystem::getMassFlowRate) Scalar output - // .def("get_acceleration", &PropulsionSystem::getAcceleration, arg("mass")) + .def( + "get_thrust", + &PropulsionSystem::getThrust, + R"doc( + Return the thrust. + + Returns: + float: The thrust in Newton. + )doc" + ) + .def( + "get_specific_impulse", + &PropulsionSystem::getSpecificImpulse, + R"doc( + Return the specific impulse. + + Returns: + float: The specific impulse in Seconds. + )doc" + ) + .def( + "get_mass_flow_rate", + &PropulsionSystem::getMassFlowRate, + R"doc( + Return the mass flow rate. + + Returns: + float: The mass flow rate in Kilograms per Second. + )doc" + ) + .def( + "get_acceleration", + &PropulsionSystem::getAcceleration, + arg("mass"), + R"doc( + Return the acceleration. + + Args: + mass (float): Mass in Kilograms. + + Returns: + float: The acceleration in Meters per Second squared. + )doc" + ) .def_static( "undefined", diff --git a/bindings/python/test/flight/system/test_propulsion_system.py b/bindings/python/test/flight/system/test_propulsion_system.py index e9163935b..436423065 100644 --- a/bindings/python/test/flight/system/test_propulsion_system.py +++ b/bindings/python/test/flight/system/test_propulsion_system.py @@ -23,6 +23,11 @@ def propulsion_system() -> PropulsionSystem: ) +@pytest.fixture +def mass() -> Mass: + return Mass(90.0, Mass.Unit.Kilogram) + + class TestPropulsionSystem: def test_constructors( self, @@ -44,3 +49,25 @@ def test_is_defined( propulsion_system: PropulsionSystem, ): assert propulsion_system.is_defined() + + def test_getters( + self, + propulsion_system: PropulsionSystem, + mass: Mass, + ): + assert propulsion_system.get_thrust() == 1.0 + assert propulsion_system.get_specific_impulse() == 150.0 + assert propulsion_system.get_mass_flow_rate() is not None + assert propulsion_system.get_acceleration(mass) is not None + + def test_static_methods( + self, + mass: Mass, + ): + assert PropulsionSystem.undefined().is_defined() is False + + assert PropulsionSystem.default().is_defined() is True + assert PropulsionSystem.default().get_thrust() is not None + assert PropulsionSystem.default().get_specific_impulse() is not None + assert PropulsionSystem.default().get_mass_flow_rate() is not None + assert PropulsionSystem.default().get_acceleration(mass) is not None diff --git a/bindings/python/test/guidance_law/test_qlaw.py b/bindings/python/test/guidance_law/test_qlaw.py index 64e227858..86a8bba80 100644 --- a/bindings/python/test/guidance_law/test_qlaw.py +++ b/bindings/python/test/guidance_law/test_qlaw.py @@ -12,7 +12,6 @@ from ostk.physics.coordinate import Frame from ostk.physics.unit import Length from ostk.physics.unit import Angle -from ostk.physics.unit import Derived from ostk.astrodynamics.trajectory.orbit.model.kepler import COE diff --git a/include/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.hpp b/include/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.hpp index 904089588..c9ce1034d 100644 --- a/include/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.hpp +++ b/include/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.hpp @@ -5,11 +5,7 @@ #include -#include -#include -#include -#include -#include +#include namespace ostk { @@ -22,34 +18,12 @@ namespace system using ostk::core::type::Real; -using ostk::physics::data::Direction; -using ostk::physics::data::Scalar; -using ostk::physics::unit::Length; using ostk::physics::unit::Mass; -using ostk::physics::unit::Time; -using ostk::physics::unit::ElectricCurrent; -using ostk::physics::unit::Angle; -using ostk::physics::unit::Derived; -using ostk::physics::Unit; /// @brief Define a propulsion system (constant thrust, constant Isp for now) class PropulsionSystem { public: - static Unit thrustSIUnit; - static Unit specificImpulseSIUnit; - static Unit massFlowRateSIUnit; // TBI: Define in ostk physics as proper units - - /// @brief Constructor - /// - /// @code{.cpp} - /// PropulsionSystem propulsion = { ... }; - /// @endcode - /// - /// @param aThrust Thrust (scalar) - /// @param aSpecificImpulse Specific impulse (scalar) - PropulsionSystem(const Scalar& aThrust, const Scalar& aSpecificImpulse); - /// @brief Constructor /// /// @code{.cpp} @@ -93,39 +67,39 @@ class PropulsionSystem /// @brief Get propulsion system's thrust /// /// @code{.cpp} - /// Scalar thrust = propulsionSystem.getThrust(); + /// Real thrust = propulsionSystem.getThrust(); /// @endcode /// - /// @return Scalar - Scalar getThrust() const; + /// @return Real + Real getThrust() const; /// @brief Get propulsion system's specific impulse /// https://en.wikipedia.org/wiki/Specific_impulse /// /// @code{.cpp} - /// Scalar specificImpulse = propulsionSystem.getSpecificImpulse(); + /// Real specificImpulse = propulsionSystem.getSpecificImpulse(); /// @endcode /// - /// @return Scalar - Scalar getSpecificImpulse() const; + /// @return Real + Real getSpecificImpulse() const; /// @brief Get propulsion system's mass flow rate /// /// @code{.cpp} - /// Scalar massFlowRate = propulsionSystem.getMassFlowRate(); + /// Real massFlowRate = propulsionSystem.getMassFlowRate(); /// @endcode /// - /// @return Scalar - Scalar getMassFlowRate() const; + /// @return Real + Real getMassFlowRate() const; /// @brief Get propulsion system's acceleration /// /// @code{.cpp} - /// Scalar acceleration = propulsionSystem.getAcceleration(); + /// Real acceleration = propulsionSystem.getAcceleration(); /// @endcode /// - /// @return Scalar - Scalar getAcceleration(const Mass& aMass) const; + /// @return Real + Real getAcceleration(const Mass& aMass) const; /// @brief Undefined propulsion system /// @@ -146,9 +120,9 @@ class PropulsionSystem static PropulsionSystem Default(); private: - Scalar thrust_ = Scalar::Undefined(); /// Thrust [N] - Scalar specificImpulse_ = Scalar::Undefined(); /// Specific impulse [s] - Scalar massFlowRate_ = Scalar::Undefined(); /// Mass flow rate [kg/s] + Real thrust_; /// Thrust [N] + Real specificImpulse_; /// Specific impulse [s] + Real massFlowRate_; /// Mass flow rate [kg/s] }; } // namespace system diff --git a/include/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.hpp b/include/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.hpp index 67872d707..0edde02c3 100644 --- a/include/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.hpp +++ b/include/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.hpp @@ -7,7 +7,6 @@ #include -#include #include #include diff --git a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/AtmosphericDrag.cpp b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/AtmosphericDrag.cpp index 22a61afdd..3c27682c4 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/AtmosphericDrag.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/AtmosphericDrag.cpp @@ -29,9 +29,6 @@ using ostk::astrodynamics::trajectory::state::CoordinateSubset; using ostk::astrodynamics::trajectory::state::coordinatesubset::CartesianPosition; using ostk::astrodynamics::trajectory::state::coordinatesubset::CartesianVelocity; -static const Derived::Unit GravitationalParameterSIUnit = - Derived::Unit::GravitationalParameter(Length::Unit::Meter, Time::Unit::Second); - AtmosphericDrag::AtmosphericDrag(const Shared& aCelestialSPtr) : AtmosphericDrag(aCelestialSPtr, String::Format("Atmospheric Drag [{}]", aCelestialSPtr->getName())) { diff --git a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/CentralBodyGravity.cpp b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/CentralBodyGravity.cpp index 7c8ac45b8..b1ec6552b 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/CentralBodyGravity.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/CentralBodyGravity.cpp @@ -17,17 +17,10 @@ namespace dynamics using ostk::mathematics::object::Vector3d; using ostk::physics::coordinate::Position; -using ostk::physics::data::Vector; -using ostk::physics::unit::Derived; -using ostk::physics::unit::Length; -using ostk::physics::unit::Time; using ostk::astrodynamics::trajectory::state::coordinatesubset::CartesianPosition; using ostk::astrodynamics::trajectory::state::coordinatesubset::CartesianVelocity; -static const Derived::Unit GravitationalParameterSIUnit = - Derived::Unit::GravitationalParameter(Length::Unit::Meter, Time::Unit::Second); - CentralBodyGravity::CentralBodyGravity(const Shared& aCelestialObjectSPtr) : CentralBodyGravity( aCelestialObjectSPtr, String::Format("Central Body Gravity [{}]", aCelestialObjectSPtr->getName()) diff --git a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/PositionDerivative.cpp b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/PositionDerivative.cpp index 1b52a2713..9e913df9e 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/PositionDerivative.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/PositionDerivative.cpp @@ -3,8 +3,6 @@ #include #include -#include - #include #include #include diff --git a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/ThirdBodyGravity.cpp b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/ThirdBodyGravity.cpp index 5d7827962..6746edf7d 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/ThirdBodyGravity.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/ThirdBodyGravity.cpp @@ -19,17 +19,10 @@ using ostk::core::type::String; using ostk::mathematics::object::Vector3d; using ostk::physics::coordinate::Position; -using ostk::physics::data::Vector; -using ostk::physics::unit::Derived; -using ostk::physics::unit::Length; -using ostk::physics::unit::Time; using ostk::astrodynamics::trajectory::state::coordinatesubset::CartesianPosition; using ostk::astrodynamics::trajectory::state::coordinatesubset::CartesianVelocity; -static const Derived::Unit GravitationalParameterSIUnit = - Derived::Unit::GravitationalParameter(Length::Unit::Meter, Time::Unit::Second); - ThirdBodyGravity::ThirdBodyGravity(const Shared& aCelestialObjectSPtr) : ThirdBodyGravity(aCelestialObjectSPtr, String::Format("Third Body Gravity [{}]", aCelestialObjectSPtr->getName())) { diff --git a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/Thruster.cpp b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/Thruster.cpp index 9441e1b46..7b4afb2d7 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Dynamics/Thruster.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Dynamics/Thruster.cpp @@ -35,8 +35,7 @@ Thruster::Thruster( satelliteSystem_(aSatelliteSystem), guidanceLaw_(aGuidanceLaw), massFlowRateCache_( - aSatelliteSystem.isDefined() ? aSatelliteSystem.accessPropulsionSystem().getMassFlowRate().getValue() - : Real::Undefined() + aSatelliteSystem.isDefined() ? aSatelliteSystem.accessPropulsionSystem().getMassFlowRate() : Real::Undefined() ) { } @@ -93,7 +92,7 @@ VectorXd Thruster::computeContribution( } const Real maximumThrustAccelerationMagnitude = - satelliteSystem_.accessPropulsionSystem().getAcceleration(Mass::Kilograms(x[6])).getValue(); + satelliteSystem_.accessPropulsionSystem().getAcceleration(Mass::Kilograms(x[6])); const Vector3d acceleration = guidanceLaw_->calculateThrustAccelerationAt( anInstant, positionCoordinates, velocityCoordinates, maximumThrustAccelerationMagnitude, aFrameSPtr diff --git a/src/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.cpp b/src/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.cpp index bd386d217..603957965 100644 --- a/src/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.cpp +++ b/src/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.cpp @@ -18,66 +18,14 @@ namespace system using ostk::physics::environment::gravitational::Earth; -ostk::physics::Unit PropulsionSystem::thrustSIUnit = Unit::Derived(Derived::Unit( - Length::Unit::Meter, - {1}, - Mass::Unit::Kilogram, - {1}, - Time::Unit::Second, - {-2}, - ElectricCurrent::Unit::Undefined, - {0}, - Angle::Unit::Undefined, - {0} -)); - -ostk::physics::Unit PropulsionSystem::specificImpulseSIUnit = Unit::Derived(Derived::Unit( - Length::Unit::Undefined, - {0}, - Mass::Unit::Undefined, - {0}, - Time::Unit::Second, - {1}, - ElectricCurrent::Unit::Undefined, - {0}, - Angle::Unit::Undefined, - {0} -)); - -ostk::physics::Unit PropulsionSystem::massFlowRateSIUnit = Unit::Derived(Derived::Unit( - Length::Unit::Undefined, - {0}, - Mass::Unit::Kilogram, - {1}, - Time::Unit::Second, - {-1}, - ElectricCurrent::Unit::Undefined, - {0}, - Angle::Unit::Undefined, - {0} -)); - -PropulsionSystem::PropulsionSystem(const Scalar& aThrust, const Scalar& aSpecificImpulse) -{ - if (aThrust.isDefined() && aSpecificImpulse.isDefined()) - { - thrust_ = aThrust.inUnit(thrustSIUnit); - specificImpulse_ = aSpecificImpulse.inUnit(specificImpulseSIUnit); - - massFlowRate_ = { - aThrust.getValue() / (aSpecificImpulse.getValue() * Earth::gravityConstant), massFlowRateSIUnit - }; - } -} - PropulsionSystem::PropulsionSystem(const Real& aThrustInSIUnit, const Real& aSpecificImpulseInSIUnit) + : thrust_(aThrustInSIUnit), + specificImpulse_(aSpecificImpulseInSIUnit), + massFlowRate_(Real::Undefined()) { - thrust_ = Scalar(aThrustInSIUnit, thrustSIUnit); - specificImpulse_ = Scalar(aSpecificImpulseInSIUnit, specificImpulseSIUnit); - if (aThrustInSIUnit.isDefined() && aSpecificImpulseInSIUnit.isDefined()) { - massFlowRate_ = {aThrustInSIUnit / (aSpecificImpulseInSIUnit * Earth::gravityConstant), massFlowRateSIUnit}; + massFlowRate_ = {aThrustInSIUnit / (aSpecificImpulseInSIUnit * Earth::gravityConstant)}; } } @@ -118,12 +66,12 @@ void PropulsionSystem::print(std::ostream& anOutputStream, bool displayDecorator ostk::core::utils::Print::Line(anOutputStream) << "Specific Impulse:" << (specificImpulse_.isDefined() ? specificImpulse_.toString() : "Undefined"); ostk::core::utils::Print::Line(anOutputStream) - << "Mass Flow Rate:" << (getMassFlowRate().isDefined() ? getMassFlowRate().toString() : "Undefined"); + << "Mass Flow Rate:" << (massFlowRate_.isDefined() ? massFlowRate_.toString() : "Undefined"); displayDecorator ? ostk::core::utils::Print::Footer(anOutputStream) : void(); } -Scalar PropulsionSystem::getThrust() const +Real PropulsionSystem::getThrust() const { if (!this->isDefined()) { @@ -133,7 +81,7 @@ Scalar PropulsionSystem::getThrust() const return thrust_; } -Scalar PropulsionSystem::getSpecificImpulse() const +Real PropulsionSystem::getSpecificImpulse() const { if (!this->isDefined()) { @@ -143,7 +91,7 @@ Scalar PropulsionSystem::getSpecificImpulse() const return specificImpulse_; } -Scalar PropulsionSystem::getMassFlowRate() const +Real PropulsionSystem::getMassFlowRate() const { if (!this->isDefined()) { @@ -153,32 +101,29 @@ Scalar PropulsionSystem::getMassFlowRate() const return massFlowRate_; } -Scalar PropulsionSystem::getAcceleration(const Mass& aMass) const +Real PropulsionSystem::getAcceleration(const Mass& aMass) const { if (!this->isDefined()) { throw ostk::core::error::runtime::Undefined("PropulsionSystem"); } - return { - thrust_.getValue() / aMass.inKilograms(), - Unit::Derived(Derived::Unit::Acceleration(Length::Unit::Meter, Time::Unit::Second)), - }; + return {thrust_ / aMass.inKilograms()}; } PropulsionSystem PropulsionSystem::Undefined() { return { - Scalar(Real::Undefined(), thrustSIUnit), - Scalar(Real::Undefined(), specificImpulseSIUnit), + Real::Undefined(), + Real::Undefined(), }; } PropulsionSystem PropulsionSystem::Default() { return { - Scalar(1.0, thrustSIUnit), - Scalar(1000.0, specificImpulseSIUnit), + 1.0, + 1000.0, }; } diff --git a/test/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.test.cpp index 420b909e2..13170c74b 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Flight/System/PropulsionSystem.test.cpp @@ -4,7 +4,6 @@ #include #include -#include #include #include @@ -14,14 +13,11 @@ using ostk::core::type::Real; -using ostk::physics::data::Scalar; using ostk::physics::unit::Length; using ostk::physics::unit::Mass; using ostk::physics::unit::Time; -using ostk::physics::unit::ElectricCurrent; using ostk::physics::unit::Angle; using ostk::physics::unit::Derived; -using ostk::physics::Unit; using ostk::physics::environment::gravitational::Earth; @@ -30,60 +26,38 @@ using ostk::astrodynamics::flight::system::PropulsionSystem; class OpenSpaceToolkit_Astrodynamics_Flight_System_PropulsionSystem : public ::testing::Test { protected: - void SetUp() override - { - thrust_ = Scalar(0.01, PropulsionSystem::thrustSIUnit); - specificImpulse_ = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); - - propulsionSystem_ = {thrust_, specificImpulse_}; - } - - Scalar thrust_ = Scalar::Undefined(); - Scalar specificImpulse_ = Scalar::Undefined(); - PropulsionSystem propulsionSystem_ = PropulsionSystem::Undefined(); + const Real thrust_ = 0.01; + const Real specificImpulse_ = 100.0; + const PropulsionSystem propulsionSystem_ = PropulsionSystem(thrust_, specificImpulse_); }; TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_PropulsionSystem, Constructor) { { - EXPECT_NO_THROW(PropulsionSystem propulsionSystem(thrust_, specificImpulse_)); + EXPECT_NO_THROW(PropulsionSystem(thrust_, specificImpulse_)); } { - const Scalar thrust = Scalar(0.01, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); + EXPECT_NO_THROW(PropulsionSystem(Real::Undefined(), specificImpulse_)); + } - EXPECT_NO_THROW(PropulsionSystem propulsionSystem(thrust, specificImpulse)); + { + EXPECT_NO_THROW(PropulsionSystem(thrust_, Real::Undefined())); } } TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_PropulsionSystem, EqualToOperator) { { - const Scalar thrust = Scalar(0.01, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); - - const PropulsionSystem propulsionSystem = {thrust, specificImpulse}; - - EXPECT_TRUE(propulsionSystem == propulsionSystem_); + EXPECT_TRUE(PropulsionSystem(thrust_, specificImpulse_) == propulsionSystem_); } { - const Scalar thrust = Scalar(0.02, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); - - const PropulsionSystem propulsionSystem = {thrust, specificImpulse}; - - EXPECT_FALSE(propulsionSystem == propulsionSystem_); + EXPECT_FALSE(PropulsionSystem(0.02, specificImpulse_) == propulsionSystem_); } { - const Scalar thrust = Scalar(0.01, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.45, PropulsionSystem::specificImpulseSIUnit); - - const PropulsionSystem propulsionSystem = {thrust, specificImpulse}; - - EXPECT_FALSE(propulsionSystem == propulsionSystem_); + EXPECT_FALSE(PropulsionSystem(thrust_, 100.45) == propulsionSystem_); } { @@ -94,30 +68,15 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_PropulsionSystem, EqualToOpe TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_PropulsionSystem, NotEqualToOperator) { { - const Scalar thrust = Scalar(0.01, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); - - const PropulsionSystem propulsionSystem = {thrust, specificImpulse}; - - EXPECT_FALSE(propulsionSystem != propulsionSystem_); + EXPECT_FALSE(PropulsionSystem(thrust_, specificImpulse_) != propulsionSystem_); } { - const Scalar thrust = Scalar(0.02, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); - - const PropulsionSystem propulsionSystem = {thrust, specificImpulse}; - - EXPECT_TRUE(propulsionSystem != propulsionSystem_); + EXPECT_TRUE(PropulsionSystem(0.02, specificImpulse_) != propulsionSystem_); } { - const Scalar thrust = Scalar(0.01, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse = Scalar(100.45, PropulsionSystem::specificImpulseSIUnit); - - const PropulsionSystem propulsionSystem = {thrust, specificImpulse}; - - EXPECT_TRUE(propulsionSystem != propulsionSystem_); + EXPECT_TRUE(PropulsionSystem(thrust_, 100.45) != propulsionSystem_); } { @@ -163,11 +122,8 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_PropulsionSystem, Getters) } { - const Scalar massFlowRate = { - propulsionSystem_.getThrust().getValue() / - (propulsionSystem_.getSpecificImpulse().getValue() * Earth::gravityConstant), - PropulsionSystem::massFlowRateSIUnit - }; + const Real massFlowRate = + propulsionSystem_.getThrust() / (propulsionSystem_.getSpecificImpulse() * Earth::gravityConstant); EXPECT_TRUE(propulsionSystem_.getMassFlowRate() == massFlowRate); } diff --git a/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystem.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystem.test.cpp index 380bf1d63..94987bb79 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystem.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystem.test.cpp @@ -25,14 +25,7 @@ using ostk::mathematics::geometry::d3::object::Point; using ostk::mathematics::object::Matrix3d; using ostk::mathematics::object::Vector3d; -using ostk::physics::data::Scalar; -using ostk::physics::unit::Length; using ostk::physics::unit::Mass; -using ostk::physics::unit::Time; -using ostk::physics::unit::ElectricCurrent; -using ostk::physics::unit::Angle; -using ostk::physics::unit::Derived; -using ostk::physics::Unit; using ostk::astrodynamics::flight::system::SatelliteSystem; using ostk::astrodynamics::flight::system::PropulsionSystem; @@ -65,12 +58,9 @@ class OpenSpaceToolkit_Astrodynamics_Flight_System_SatelliteSystem : public ::te dragCoefficient_ = 1.2; // Define propulsion system - const Scalar thrust_ = Scalar(0.01, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse_ = Scalar(100.0, PropulsionSystem::specificImpulseSIUnit); - propulsionSystem_ = { - thrust_, - specificImpulse_, + 0.01, + 100.0, }; satelliteSystem_ = { @@ -202,9 +192,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_SatelliteSystem, EqualToOper } { - PropulsionSystem anotherPropulsionSystem = { - Scalar(0.099, PropulsionSystem::thrustSIUnit), Scalar(99.0, PropulsionSystem::specificImpulseSIUnit) - }; + PropulsionSystem anotherPropulsionSystem = {0.099, 99.0}; EXPECT_FALSE( satelliteSystem_ == SatelliteSystem( mass_, @@ -307,9 +295,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Flight_System_SatelliteSystem, NotEqualToO } { - PropulsionSystem anotherPropulsionSystem = { - Scalar(0.099, PropulsionSystem::thrustSIUnit), Scalar(99.0, PropulsionSystem::specificImpulseSIUnit) - }; + PropulsionSystem anotherPropulsionSystem = {0.099, 99.0}; EXPECT_TRUE( satelliteSystem_ != SatelliteSystem( mass_, diff --git a/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystemBuilder.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystemBuilder.test.cpp index a83433b77..076e27092 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystemBuilder.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Flight/System/SatelliteSystemBuilder.test.cpp @@ -26,14 +26,7 @@ using ostk::mathematics::geometry::d3::object::Point; using ostk::mathematics::object::Matrix3d; using ostk::mathematics::object::Vector3d; -using ostk::physics::data::Scalar; -using ostk::physics::unit::Length; using ostk::physics::unit::Mass; -using ostk::physics::unit::Time; -using ostk::physics::unit::ElectricCurrent; -using ostk::physics::unit::Angle; -using ostk::physics::unit::Derived; -using ostk::physics::Unit; using ostk::astrodynamics::flight::system::SatelliteSystem; using ostk::astrodynamics::flight::system::SatelliteSystemBuilder; diff --git a/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.test.cpp index a1c096d8a..267182b0f 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/ConstantThrust.test.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -48,8 +47,6 @@ using ostk::mathematics::object::VectorXd; using ostk::mathematics::object::Matrix3d; using ostk::mathematics::object::Vector3d; -using ostk::physics::data::Scalar; - using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; using ostk::physics::coordinate::Velocity; @@ -66,7 +63,6 @@ using ostk::physics::unit::Mass; using ostk::physics::unit::Length; using ostk::physics::unit::Derived; using ostk::physics::unit::Time; -using ostk::physics::data::Direction; using EarthGravitationalModel = ostk::physics::environment::gravitational::Earth; using EarthMagneticModel = ostk::physics::environment::magnetic::Earth; using EarthAtmosphericModel = ostk::physics::environment::atmospheric::Earth; @@ -82,9 +78,6 @@ using ostk::astrodynamics::guidancelaw::ConstantThrust; using namespace boost::numeric::odeint; -static const Derived::Unit GravitationalParameterSIUnit = - Derived::Unit::GravitationalParameter(Length::Unit::Meter, Time::Unit::Second); - class OpenSpaceToolkit_Astrodynamics_GuidanceLaw_ConstantThrust : public ::testing::Test { protected: @@ -130,15 +123,9 @@ class OpenSpaceToolkit_Astrodynamics_GuidanceLaw_ConstantThrust : public ::testi LocalOrbitalFrameFactory::VNC(Frame::GCRF()), }; - const Scalar thrust_ = Scalar(0.1, PropulsionSystem::thrustSIUnit); - const Scalar specificImpulse_ = Scalar(1500.0, PropulsionSystem::specificImpulseSIUnit); - const Mass satelliteDryMass_ = Mass::Kilograms(100.0); - const PropulsionSystem propulsionSystem_ = PropulsionSystem( - thrust_, // Thrust - specificImpulse_ // Isp - ); + const PropulsionSystem propulsionSystem_ = {0.1, 1500.0}; const ConstantThrust defaultConstantThrust_ = {localOrbitalFrameDirection_}; diff --git a/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/QLaw.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/QLaw.test.cpp index 59ebee21b..b0f8f82ce 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/QLaw.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/GuidanceLaw/QLaw.test.cpp @@ -38,7 +38,6 @@ using ostk::mathematics::geometry::d3::object::Composite; using ostk::mathematics::geometry::d3::object::Cuboid; using ostk::mathematics::geometry::d3::object::Point; -using ostk::physics::data::Scalar; using ostk::physics::unit::Derived; using ostk::physics::unit::Angle; using ostk::physics::unit::Length; diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Propagator.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Propagator.test.cpp index ffce4f53c..b15a6dfc4 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Propagator.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Propagator.test.cpp @@ -18,7 +18,6 @@ #include #include -#include #include #include #include @@ -71,7 +70,6 @@ using ostk::mathematics::object::VectorXd; using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; using ostk::physics::coordinate::Velocity; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using ostk::physics::environment::Object; using ostk::physics::environment::object::Celestial; @@ -118,10 +116,7 @@ class OpenSpaceToolkit_Astrodynamics_Trajectory_Orbit_Model_Propagator : public {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(0.1, PropulsionSystem::thrustSIUnit), - Scalar(1500.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {0.1, 1500.0}; this->satelliteGeometry_ = satelliteGeometry; this->propulsionSystem_ = propulsionSystem; diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Sequence.test.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Sequence.test.cpp index ca7d97ef8..dd03c7444 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Sequence.test.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Sequence.test.cpp @@ -49,7 +49,6 @@ using ostk::physics::coordinate::Velocity; using ostk::physics::unit::Angle; using ostk::physics::unit::Length; using ostk::physics::unit::Mass; -using ostk::physics::data::Scalar; using EarthGravitationalModel = ostk::physics::environment::gravitational::Earth; using EarthMagneticModel = ostk::physics::environment::magnetic::Earth; using EarthAtmosphericModel = ostk::physics::environment::atmospheric::Earth; @@ -595,14 +594,13 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Trajectory_Sequence, Solve_2) std::make_shared(satelliteSystem, std::make_shared(ConstantThrust::Intrack())) ); - const Shared coordinatesBrokerSPtr = - std::make_shared(CoordinateBroker({ - CartesianPosition::Default(), - CartesianVelocity::Default(), - CoordinateSubset::Mass(), - CoordinateSubset::SurfaceArea(), - CoordinateSubset::DragCoefficient(), - })); + const Shared coordinatesBrokerSPtr = std::make_shared(CoordinateBroker({ + CartesianPosition::Default(), + CartesianVelocity::Default(), + CoordinateSubset::Mass(), + CoordinateSubset::SurfaceArea(), + CoordinateSubset::DragCoefficient(), + })); VectorXd coordinates(9); coordinates << 7000000.0, 0.0, 0.0, 0.0, 7546.05329, 0.0, mass + 100.0, surfaceArea, dragCoefficient; diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/NRLMSIS00.validation.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/NRLMSIS00.validation.cpp index 2eec0a09f..534057269 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/NRLMSIS00.validation.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/NRLMSIS00.validation.cpp @@ -16,7 +16,6 @@ #include #include -#include #include #include #include @@ -66,7 +65,6 @@ using ostk::mathematics::object::Vector3d; using ostk::mathematics::object::VectorXd; using ostk::physics::coordinate::Frame; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using EarthAtmosphericModel = ostk::physics::environment::atmospheric::Earth; using EarthGravitationalModel = ostk::physics::environment::gravitational::Earth; @@ -109,10 +107,7 @@ class OpenSpaceToolkit_Astrodynamics_Validation_NRLMSIS00Validation : public ::t {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(0.1, PropulsionSystem::thrustSIUnit), - Scalar(1500.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {0.1, 1500.0}; this->satelliteGeometry_ = satelliteGeometry; this->propulsionSystem_ = propulsionSystem; diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.cross.validation.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.cross.validation.cpp index 39a378a95..c7ac35fb0 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.cross.validation.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.cross.validation.cpp @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -81,7 +80,6 @@ using ostk::mathematics::object::VectorXd; using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; using ostk::physics::coordinate::Velocity; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using EarthAtmosphericModel = ostk::physics::environment::atmospheric::Earth; using EarthGravitationalModel = ostk::physics::environment::gravitational::Earth; @@ -129,10 +127,7 @@ class OpenSpaceToolkit_Astrodynamics_Validation_CrossValidation : public ::testi {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(0.1, PropulsionSystem::thrustSIUnit), - Scalar(1500.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {0.1, 1500.0}; this->satelliteGeometry_ = satelliteGeometry; this->propulsionSystem_ = propulsionSystem; @@ -662,12 +657,11 @@ TEST_P(OpenSpaceToolkit_Astrodynamics_Validation_CrossValidation_Thruster, Force LocalOrbitalFrameDirection(localOrbitalFrameThrustVector, localOrbitalFrameFactory); // Coordinates Broker (scenario-independent) - const Shared coordinatesBrokerSPtr = - std::make_shared(CoordinateBroker({ - CartesianPosition::Default(), - CartesianVelocity::Default(), - CoordinateSubset::Mass(), - })); + const Shared coordinatesBrokerSPtr = std::make_shared(CoordinateBroker({ + CartesianPosition::Default(), + CartesianVelocity::Default(), + CoordinateSubset::Mass(), + })); // Setup initial state VectorXd initialCoordinates(7); @@ -683,10 +677,7 @@ TEST_P(OpenSpaceToolkit_Astrodynamics_Validation_CrossValidation_Thruster, Force }; // Setup satellite system - PropulsionSystem propulsionSystem = { - Scalar(thrustReal, PropulsionSystem::thrustSIUnit), - Scalar(specificImpulseReal, PropulsionSystem::specificImpulseSIUnit), - }; + PropulsionSystem propulsionSystem = {thrustReal, specificImpulseReal}; const Composite satelliteGeometry(Cuboid( {0.0, 0.0, 0.0}, {Vector3d {1.0, 0.0, 0.0}, Vector3d {0.0, 1.0, 0.0}, Vector3d {0.0, 0.0, 1.0}}, {1.0, 2.0, 3.0} @@ -1209,14 +1200,13 @@ TEST_P( LocalOrbitalFrameDirection(localOrbitalFrameThrustVector, localOrbitalFrameFactory); // Coordinates Broker (scenario-independent) - const Shared coordinatesBrokerSPtr = - std::make_shared(CoordinateBroker({ - CartesianPosition::Default(), - CartesianVelocity::Default(), - CoordinateSubset::Mass(), - CoordinateSubset::SurfaceArea(), - CoordinateSubset::DragCoefficient(), - })); + const Shared coordinatesBrokerSPtr = std::make_shared(CoordinateBroker({ + CartesianPosition::Default(), + CartesianVelocity::Default(), + CoordinateSubset::Mass(), + CoordinateSubset::SurfaceArea(), + CoordinateSubset::DragCoefficient(), + })); // Setup initial conditions VectorXd initialCoordinates(9); @@ -1232,10 +1222,7 @@ TEST_P( }; // Setup satellite system - PropulsionSystem propulsionSystem = { - Scalar(thrustReal, PropulsionSystem::thrustSIUnit), - Scalar(specificImpulseReal, PropulsionSystem::specificImpulseSIUnit), - }; + PropulsionSystem propulsionSystem = {thrustReal, specificImpulseReal}; const Composite satelliteGeometry(Cuboid( {0.0, 0.0, 0.0}, {Vector3d {1.0, 0.0, 0.0}, Vector3d {0.0, 1.0, 0.0}, Vector3d {0.0, 0.0, 1.0}}, {1.0, 2.0, 3.0} diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.self.validation.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.self.validation.cpp index d98720307..e4a7c3c3a 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.self.validation.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/Propagator.self.validation.cpp @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include @@ -74,7 +73,6 @@ using ostk::mathematics::object::VectorXd; using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; using ostk::physics::coordinate::Velocity; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using EarthAtmosphericModel = ostk::physics::environment::atmospheric::Earth; using EarthGravitationalModel = ostk::physics::environment::gravitational::Earth; @@ -120,10 +118,7 @@ class OpenSpaceToolkit_Astrodynamics_Validation_SelfValidation : public ::testin {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(0.1, PropulsionSystem::thrustSIUnit), - Scalar(1500.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {0.1, 1500.0}; this->satelliteGeometry_ = satelliteGeometry; this->propulsionSystem_ = propulsionSystem; @@ -194,10 +189,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Validation_SelfValidation, ForceModel_Tabu ); const Shared earthSPtr = std::make_shared(earth); - const PropulsionSystem propulsionSystem = { - Scalar(1e-1, PropulsionSystem::thrustSIUnit), - Scalar(3000.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {1e-1, 3000.0}; const SatelliteSystem satelliteSystem = SatelliteSystemBuilder::Default() .withPropulsionSystem(propulsionSystem) diff --git a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/QLaw.validation.cpp b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/QLaw.validation.cpp index 3d2acf5f3..6f4e750b2 100644 --- a/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/QLaw.validation.cpp +++ b/test/OpenSpaceToolkit/Astrodynamics/Trajectory/Validation/QLaw.validation.cpp @@ -15,7 +15,6 @@ #include #include -#include #include #include #include @@ -69,7 +68,6 @@ using ostk::mathematics::object::VectorXd; using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; using ostk::physics::coordinate::Velocity; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using EarthGravitationalModel = ostk::physics::environment::gravitational::Earth; using ostk::physics::environment::Object; @@ -117,10 +115,7 @@ class OpenSpaceToolkit_Astrodynamics_Validation_QLawValidation {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(0.1, PropulsionSystem::thrustSIUnit), - Scalar(1500.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {0.1, 1500.0}; this->satelliteGeometry_ = satelliteGeometry; this->propulsionSystem_ = propulsionSystem; @@ -218,10 +213,7 @@ TEST_P(OpenSpaceToolkit_Astrodynamics_Validation_QLawValidation, QLaw_Paper_Case {0.0, 0.0, 0.0}, {Vector3d {1.0, 0.0, 0.0}, Vector3d {0.0, 1.0, 0.0}, Vector3d {0.0, 0.0, 1.0}}, {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(1.0, PropulsionSystem::thrustSIUnit), - Scalar(3100.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {1.0, 3100.0}; const SatelliteSystem satelliteSystem = { mass, @@ -318,10 +310,7 @@ TEST_P(OpenSpaceToolkit_Astrodynamics_Validation_QLawValidation, QLaw_Paper_Case {0.0, 0.0, 0.0}, {Vector3d {1.0, 0.0, 0.0}, Vector3d {0.0, 1.0, 0.0}, Vector3d {0.0, 0.0, 1.0}}, {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(2.0, PropulsionSystem::thrustSIUnit), - Scalar(2000.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {2.0, 2000.0}; const SatelliteSystem satelliteSystem = { mass, @@ -408,10 +397,7 @@ TEST_P(OpenSpaceToolkit_Astrodynamics_Validation_QLawValidation, SSO_targeting) {0.0, 0.0, 0.0}, {Vector3d {1.0, 0.0, 0.0}, Vector3d {0.0, 1.0, 0.0}, Vector3d {0.0, 0.0, 1.0}}, {1.0, 2.0, 3.0} )); - const PropulsionSystem propulsionSystem = { - Scalar(1.0, PropulsionSystem::thrustSIUnit), - Scalar(1000.0, PropulsionSystem::specificImpulseSIUnit), - }; + const PropulsionSystem propulsionSystem = {1.0, 1000.0}; const SatelliteSystem satelliteSystem = { mass, diff --git a/validation/OpenSpaceToolkit/Astrodynamics/Framework.validation.cpp b/validation/OpenSpaceToolkit/Astrodynamics/Framework.validation.cpp index 60ca184d9..2f7424738 100644 --- a/validation/OpenSpaceToolkit/Astrodynamics/Framework.validation.cpp +++ b/validation/OpenSpaceToolkit/Astrodynamics/Framework.validation.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include #include @@ -38,7 +37,6 @@ #include #include #include -#include #include #include @@ -88,7 +86,6 @@ using ostk::mathematics::object::Matrix3d; using ostk::mathematics::object::Vector3d; using ostk::mathematics::object::VectorXd; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; @@ -106,7 +103,6 @@ using ostk::physics::time::Interval; using ostk::physics::time::Time; using ostk::physics::time::Scale; using ostk::physics::unit::Angle; -using ostk::physics::unit::Derived; using ostk::physics::unit::Length; using ostk::physics::unit::Mass; using ostk::physics::environment::object::celestial::Earth; diff --git a/validation/OpenSpaceToolkit/Astrodynamics/Parser.hpp b/validation/OpenSpaceToolkit/Astrodynamics/Parser.hpp index 4fdbd802c..718e83c42 100644 --- a/validation/OpenSpaceToolkit/Astrodynamics/Parser.hpp +++ b/validation/OpenSpaceToolkit/Astrodynamics/Parser.hpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include diff --git a/validation/OpenSpaceToolkit/Astrodynamics/Parser.test.cpp b/validation/OpenSpaceToolkit/Astrodynamics/Parser.test.cpp index 37d2e9351..5c8170ad9 100644 --- a/validation/OpenSpaceToolkit/Astrodynamics/Parser.test.cpp +++ b/validation/OpenSpaceToolkit/Astrodynamics/Parser.test.cpp @@ -33,7 +33,6 @@ using ostk::mathematics::object::VectorXd; using ostk::physics::coordinate::Frame; using ostk::physics::coordinate::Position; using ostk::physics::coordinate::Velocity; -using ostk::physics::data::Scalar; using ostk::physics::Environment; using ostk::physics::environment::Object; using ostk::physics::environment::object::Celestial; @@ -106,12 +105,7 @@ TEST_F(OpenSpaceToolkit_Astrodynamics_Validation_Parser, CreateSatelliteSystem) EXPECT_EQ(satelliteSystem.getMass(), Mass::Kilograms(0.0)); EXPECT_EQ(satelliteSystem.getCrossSectionalSurfaceArea(), 1.0); EXPECT_EQ(satelliteSystem.getDragCoefficient(), 2.2); - EXPECT_EQ( - satelliteSystem.getPropulsionSystem(), - PropulsionSystem( - Scalar(0.01, PropulsionSystem::thrustSIUnit), Scalar(3000.0, PropulsionSystem::specificImpulseSIUnit) - ) - ); + EXPECT_EQ(satelliteSystem.getPropulsionSystem(), PropulsionSystem(0.01, 3000.0)); } }