diff --git a/include/tudat/astro/orbit_determination/acceleration_partials/fullRadiationPressureAccelerationPartial.h b/include/tudat/astro/orbit_determination/acceleration_partials/fullRadiationPressureAccelerationPartial.h index 5c010f966b..3b4f382c7c 100644 --- a/include/tudat/astro/orbit_determination/acceleration_partials/fullRadiationPressureAccelerationPartial.h +++ b/include/tudat/astro/orbit_determination/acceleration_partials/fullRadiationPressureAccelerationPartial.h @@ -30,7 +30,7 @@ class RadiationPressureAccelerationPartial: public AccelerationPartial RadiationPressureAccelerationPartial( const std::string acceleratedBody, const std::string acceleratingBody, - const std::shared_ptr< electromagnetism::RadiationPressureAcceleration > radiationPressureAcceleration, + const std::shared_ptr< electromagnetism::PaneledSourceRadiationPressureAcceleration > radiationPressureAcceleration, const std::shared_ptr< estimatable_parameters::CustomSingleAccelerationPartialCalculatorSet > customAccelerationPartialSet = nullptr ): AccelerationPartial( acceleratedBody, acceleratingBody, basic_astrodynamics::custom_acceleration ), radiationPressureAcceleration_( radiationPressureAcceleration ), @@ -248,7 +248,7 @@ class RadiationPressureAccelerationPartial: public AccelerationPartial protected: - std::shared_ptr< electromagnetism::RadiationPressureAcceleration > radiationPressureAcceleration_; + std::shared_ptr< electromagnetism::PaneledSourceRadiationPressureAcceleration > radiationPressureAcceleration_; std::shared_ptr< estimatable_parameters::CustomSingleAccelerationPartialCalculatorSet > customAccelerationPartialSet_; diff --git a/include/tudat/simulation/estimation_setup/createAccelerationPartials.h b/include/tudat/simulation/estimation_setup/createAccelerationPartials.h index 169d3b9ebf..c050c53064 100644 --- a/include/tudat/simulation/estimation_setup/createAccelerationPartials.h +++ b/include/tudat/simulation/estimation_setup/createAccelerationPartials.h @@ -234,7 +234,8 @@ std::shared_ptr< acceleration_partials::AccelerationPartial > createRadiationPre // Create partial-calculating object. accelerationPartial = std::make_shared< acceleration_partials::RadiationPressureAccelerationPartial > - ( acceleratedBody.first, acceleratingBody.first, radiationPressureAccelerationModel, customPartialCalculator ); + ( acceleratedBody.first, acceleratingBody.first, + std::dynamic_pointer_cast< PaneledSourceRadiationPressureAcceleration >( radiationPressureAccelerationModel ), customPartialCalculator ); } return accelerationPartial; diff --git a/src/astro/orbit_determination/acceleration_partials/panelledRadiationPressureAccelerationPartial.cpp b/src/astro/orbit_determination/acceleration_partials/panelledRadiationPressureAccelerationPartial.cpp index bba6b5233d..a55669f140 100755 --- a/src/astro/orbit_determination/acceleration_partials/panelledRadiationPressureAccelerationPartial.cpp +++ b/src/astro/orbit_determination/acceleration_partials/panelledRadiationPressureAccelerationPartial.cpp @@ -70,9 +70,8 @@ void PanelledRadiationPressurePartial::update( const double currentTime ) currentPartialWrtPosition_ = rotationToInertialFrame * currentPartialWrtPosition_ * rotationToInertialFrame.transpose( ); currentPartialWrtPosition_ /= currentMass; - currentPartialWrtPosition_ += currentAcceleration / currentRadiationPressure * currentRadiationPressurePositionPartial_ * rotationToInertialFrame.transpose( ); - -// std::cout<<"Total partial: "<::epsilon( ) ); } -BOOST_AUTO_TEST_CASE( testRadiationPressureAccelerationPartials ) +BOOST_AUTO_TEST_CASE( testCannonballRadiationPressureAccelerationPartials ) { // Create empty bodies, earth and sun. std::shared_ptr< Body > vehicle = std::make_shared< Body >( ); @@ -364,7 +364,6 @@ BOOST_AUTO_TEST_CASE( testRadiationPressureAccelerationPartials ) TUDAT_CHECK_MATRIX_CLOSE_FRACTION( testPartialWrtSunPosition, partialWrtSunPosition, 1.0E-8 ); - std::cout<::epsilon( ) ); TUDAT_CHECK_MATRIX_CLOSE_FRACTION( testPartialWrtVehiclePosition, @@ -1463,29 +1462,22 @@ BOOST_AUTO_TEST_CASE( testThrustPartials ) partialWrtEngine2Thrust( 2 ) = 0.0; TUDAT_CHECK_MATRIX_CLOSE_FRACTION( testPartialWrtEngine2Thrust, partialWrtEngine2Thrust, 1.0E-9 ); - std::cout<<"Partial w.r.t. mass (analytical): "<