Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Nov 2, 2023
2 parents b0b95ab + 476488b commit 182f5e5
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 )
{
Expand Down Expand Up @@ -215,7 +215,7 @@ class PaneledRadiationPressureTargetModel : public RadiationPressureTargetModel
return segmentFixedPanels_;
}

bool forceFunctionRequiresLocalFrameInputs( )
bool forceFunctionRequiresLocalFrameInputs( ) override
{
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions include/tudat/astro/electromagnetism/radiationSourceModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}

Expand Down Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/astro/electromagnetism/radiationSourceModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ std::pair<std::vector<double>, std::vector<double>> 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)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
6 changes: 3 additions & 3 deletions tests/src/simulation/unitTestEnvironmentModelSetup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1579,19 +1579,19 @@ 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);
BOOST_CHECK_CLOSE(actualValue1, expectedValue1, 1e-13);

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 )
Expand Down

0 comments on commit 182f5e5

Please sign in to comment.