Skip to content
This repository was archived by the owner on Feb 14, 2025. It is now read-only.

Commit

Permalink
Merge pull request #1 from magnific0/RadiationPressureUpdate
Browse files Browse the repository at this point in the history
Code check, minor fixes
  • Loading branch information
DominicDirkx committed Apr 4, 2016
2 parents 7ffa877 + e58b58e commit cc38b82
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 17 deletions.
3 changes: 1 addition & 2 deletions Tudat/Astrodynamics/ElectroMagnetism/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ set(ELECTROMAGNETISM_SOURCES
)

# Set the header files.
set(ELECTROMAGNETISM_HEADERS
set(ELECTROMAGNETISM_HEADERS
"${SRCROOT}${ELECTROMAGNETISMDIR}/cannonBallRadiationPressureAcceleration.cpp"
"${SRCROOT}${ELECTROMAGNETISMDIR}/cannonBallRadiationPressureForce.cpp"
"${SRCROOT}${ELECTROMAGNETISMDIR}/lorentzStaticMagneticForce.cpp"
"${SRCROOT}${ELECTROMAGNETISMDIR}/lorentzStaticMagneticAcceleration.cpp"
"${SRCROOT}${ELECTROMAGNETISMDIR}/lorentzStaticMagneticAcceleration.cpp"
"${SRCROOT}${ELECTROMAGNETISMDIR}/radiationPressureInterface.cpp"
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ BOOST_AUTO_TEST_CASE( testShadowFunctionLink )
unoccultedRadiationPressureInterface->updateInterface( );

// Test application of shadow function (see testShadowFunctionForPartialShadow)
// Satellite partially visible. Satellite is located between the locations of the previous
// tests in penumbra. According to analytical derivations in Matlab the shadow function should
// be around 0.4547. Altitude of satellite = 1000 km (from unitTestMissionGeometry.cpp).
BOOST_CHECK_CLOSE_FRACTION(
occultedRadiationPressureInterface->getCurrentRadiationPressure( ) /
unoccultedRadiationPressureInterface->getCurrentRadiationPressure( ) , 0.4547,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ void RadiationPressureInterface::updateInterface( )

if( currentShadowFunction != 1.0 && shadowFunction != 1.0 )
{
std::cerr<<"Warning, multiple occultation occured in radiation pressure interface, "
<<"results may be slightly in error"<<std::endl;
std::cerr << "Warning, multiple occultation occured in radiation pressure interface, results may be slightly in error" << std::endl;
}

shadowFunction *= currentShadowFunction;
Expand All @@ -82,6 +81,5 @@ void RadiationPressureInterface::updateInterface( )
currentRadiationPressure_ *= shadowFunction;
}

}

}
} // namespace electro_magnetism
} // namespace tudat
19 changes: 9 additions & 10 deletions Tudat/Astrodynamics/ElectroMagnetism/radiationPressureInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@

#include <Eigen/Core>

#include <Tudat/Astrodynamics/BasicAstrodynamics/physicalConstants.h>
#include <Tudat/Mathematics/BasicMathematics/mathematicalConstants.h>
#include "Tudat/Astrodynamics/BasicAstrodynamics/physicalConstants.h"
#include "Tudat/Mathematics/BasicMathematics/mathematicalConstants.h"

namespace tudat
{
Expand Down Expand Up @@ -82,7 +82,7 @@ class RadiationPressureInterface{
* causing occultations (default none) NOTE: Multplie concurrent occultations may currently
* result in slighlty underestimted radiation pressure.
* \param occultingBodyRadii List of radii of the bodies causing occultations (default none).
* \param sourceRadius Radius of the source body (used for occultation calculations)
* \param sourceRadius Radius of the source body (used for occultation calculations) (default 0).
*/
RadiationPressureInterface(
const boost::function< double( ) > sourcePower,
Expand All @@ -103,7 +103,7 @@ class RadiationPressureInterface{
currentRadiationPressure_( 0.0 ){ }

//! Destructor
~RadiationPressureInterface( ){ }
virtual ~RadiationPressureInterface( ){ }

//! Function to update the current value of the radiation pressure
/*!
Expand Down Expand Up @@ -139,7 +139,7 @@ class RadiationPressureInterface{
*/
boost::function< Eigen::Vector3d( ) > getSourcePositionFunction( ) const
{
return sourcePositionFunction_ ;
return sourcePositionFunction_;
}

//! Function to return the function returning the current position of the target body.
Expand All @@ -149,7 +149,7 @@ class RadiationPressureInterface{
*/
boost::function< Eigen::Vector3d( ) > getTargetPositionFunction( ) const
{
return targetPositionFunction_ ;
return targetPositionFunction_;
}

//! Function to return the reflecting area of the target body.
Expand Down Expand Up @@ -251,8 +251,7 @@ class RadiationPressureInterface{
Eigen::Vector3d currentSolarVector_;
};

}
} // namespace electro_magnetism
} // namespace tudat

}

#endif // RADIATIONPRESSUREINTERFACE_H
#endif // TUDAT_RADIATIONPRESSUREINTERFACE_H

0 comments on commit cc38b82

Please sign in to comment.