diff --git a/include/tudat/astro/electromagnetism/radiationPressureTargetModel.h b/include/tudat/astro/electromagnetism/radiationPressureTargetModel.h index 8053b49e7d..700fd5f7f5 100644 --- a/include/tudat/astro/electromagnetism/radiationPressureTargetModel.h +++ b/include/tudat/astro/electromagnetism/radiationPressureTargetModel.h @@ -137,14 +137,14 @@ class CannonballRadiationPressureTargetModel : public RadiationPressureTargetMod coefficientFunction_ = coefficientFunction; } - bool forceFunctionRequiresLocalFrameInputs( ) + bool forceFunctionRequiresLocalFrameInputs( ) override { return false; } private: - virtual void updateMembers_(const double currentTime) + virtual void updateMembers_(const double currentTime) override { if( coefficientFunction_ != nullptr ) { @@ -215,7 +215,7 @@ class PaneledRadiationPressureTargetModel : public RadiationPressureTargetModel return segmentFixedPanels_; } - bool forceFunctionRequiresLocalFrameInputs( ) + bool forceFunctionRequiresLocalFrameInputs( ) override { return true; } diff --git a/include/tudat/astro/electromagnetism/radiationSourceModel.h b/include/tudat/astro/electromagnetism/radiationSourceModel.h index f143f6a63b..dd3a7b13b8 100644 --- a/include/tudat/astro/electromagnetism/radiationSourceModel.h +++ b/include/tudat/astro/electromagnetism/radiationSourceModel.h @@ -169,7 +169,7 @@ class RadiationSourcePanel { Eigen::Vector3d relativeCenterInSphericalCoords = coordinate_conversions::convertCartesianToSpherical(relativeCenter); - latitude_ = M_PI_2 - relativeCenterInSphericalCoords[1]; + latitude_ = mathematical_constants::PI / 2.0 - relativeCenterInSphericalCoords[1]; longitude_ = relativeCenterInSphericalCoords[2]; } @@ -204,7 +204,7 @@ class RadiationSourcePanel const double azimuthAngle) { relativeCenter_ = relativeCenter; - latitude_ = M_PI_2 - polarAngle; + latitude_ = mathematical_constants::PI / 2.0 - polarAngle; longitude_ = azimuthAngle; } diff --git a/src/astro/electromagnetism/radiationSourceModel.cpp b/src/astro/electromagnetism/radiationSourceModel.cpp index 911ac81e98..571ba9107d 100644 --- a/src/astro/electromagnetism/radiationSourceModel.cpp +++ b/src/astro/electromagnetism/radiationSourceModel.cpp @@ -369,7 +369,7 @@ std::pair, std::vector> generateEvenlySpacedPoints_S { // Numerator and denominator of the atan argument seem to be switched in the given equation, which produced // points that are skewed towards the poles - double polarAngle = M_PI_2 - atan(z / sqrt(1 - z*z)); + double polarAngle = mathematical_constants::PI / 2.0 - atan(z / sqrt(1 - z*z)); double azimuthAngle; if (j == 1) { diff --git a/tests/src/astro/electromagnetism/unitTestRadiationSourceModel.cpp b/tests/src/astro/electromagnetism/unitTestRadiationSourceModel.cpp index 02d190891c..c3acc3adde 100644 --- a/tests/src/astro/electromagnetism/unitTestRadiationSourceModel.cpp +++ b/tests/src/astro/electromagnetism/unitTestRadiationSourceModel.cpp @@ -533,8 +533,8 @@ BOOST_AUTO_TEST_CASE( testGenerateEvenlySpacedPoints_Spiraling_Values ) for (int i = 0; i < n; ++i) { - BOOST_CHECK_CLOSE(polarAngles[i], actualPolarAngles[i], 1e-15); - BOOST_CHECK_CLOSE(azimuthAngles[i], actualAzimuthAngles[i], 1e-15); + BOOST_CHECK_CLOSE(polarAngles[i], actualPolarAngles[i], 2.0e-15); + BOOST_CHECK_CLOSE(azimuthAngles[i], actualAzimuthAngles[i], 2.0e-15); } } diff --git a/tests/src/simulation/unitTestEnvironmentModelSetup.cpp b/tests/src/simulation/unitTestEnvironmentModelSetup.cpp index 1391a35bf8..4802629716 100644 --- a/tests/src/simulation/unitTestEnvironmentModelSetup.cpp +++ b/tests/src/simulation/unitTestEnvironmentModelSetup.cpp @@ -1579,11 +1579,11 @@ BOOST_AUTO_TEST_CASE( test_surfacePropertyDistributionSetup_SphericalHarmonics_D const auto expectedCosCoeff = -4.041203307692307e-08; const auto actualCosCoeff = surfacePropertyDistribution->getCosineCoefficients()(7, 6); - BOOST_CHECK_CLOSE(actualCosCoeff, expectedCosCoeff, 1e-15); + BOOST_CHECK_CLOSE(actualCosCoeff, expectedCosCoeff, 2e-15); const auto expectedSinCoeff = -4.987361846153846e-06; const auto actualSinCoeff = surfacePropertyDistribution->getSineCoefficients()(10, 3); - BOOST_CHECK_CLOSE(actualSinCoeff, expectedSinCoeff, 1e-15); + BOOST_CHECK_CLOSE(actualSinCoeff, expectedSinCoeff, 2e-15); const auto expectedValue1 = 0.11846922315451458; const auto actualValue1 = surfacePropertyDistribution->getValue(0.7, 0.42); @@ -1591,7 +1591,7 @@ BOOST_AUTO_TEST_CASE( test_surfacePropertyDistributionSetup_SphericalHarmonics_D const auto expectedValue2 = 0.15772976227190455; const auto actualValue2 = surfacePropertyDistribution->getValue(-1.5, 0.9); - BOOST_CHECK_CLOSE(actualValue2, expectedValue2, 1e-15); + BOOST_CHECK_CLOSE(actualValue2, expectedValue2, 2e-15); } BOOST_AUTO_TEST_CASE( test_surfacePropertyDistributionSetup_SecondDegreeZonalPeriodic_KnockeAlbedo )