Skip to content

Commit

Permalink
With modifications from Jacco
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Oct 13, 2016
2 parents 60964ff + 6978519 commit a0e7252
Show file tree
Hide file tree
Showing 131 changed files with 532 additions and 642 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ install_manifest.txt
*.exe
*.out
*.app
*.sh

#
# Build and doxygen related
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ namespace unit_tests

using basic_mathematics::Vector6d;
using mathematical_constants::PI;
using std::vector;
using namespace aerodynamics;

boost::shared_ptr< HypersonicLocalInclinationAnalysis > getApolloCoefficientInterface( )
Expand All @@ -23,9 +22,9 @@ boost::shared_ptr< HypersonicLocalInclinationAnalysis > getApolloCoefficientInte
= boost::make_shared< geometric_shapes::Capsule >(
4.694, 1.956, 2.662, -1.0 * 33.0 * PI / 180.0, 0.196 );

vector< int > numberOfLines;
vector< int > numberOfPoints;
vector< bool > invertOrders;
std::vector< int > numberOfLines;
std::vector< int > numberOfPoints;
std::vector< bool > invertOrders;
numberOfLines.resize( 4 );
numberOfPoints.resize( 4 );
invertOrders.resize( 4 );
Expand Down Expand Up @@ -84,7 +83,7 @@ boost::shared_ptr< HypersonicLocalInclinationAnalysis > getApolloCoefficientInte
3.9116, momentReference );
}

}
} // namespace unit_tests

}
} // namespace tudat
#endif // TUDAT_TESTAPOLLOCAPSULECOEFFICIENTS_H
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,6 @@ void testAerodynamicForceDirection( const bool includeThrustForce,
}
for( unsigned int i = 4; i < maximumIndex; i++ )
{
std::cout<<"Run: "<<i<<std::endl;
// Create Earth object
std::map< std::string, boost::shared_ptr< BodySettings > > defaultBodySettings =
getDefaultBodySettings( boost::assign::list_of( "Earth" ), -1.0E6, 1.0E6 );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ namespace unit_tests

using basic_mathematics::Vector6d;
using mathematical_constants::PI;
using std::vector;

using namespace aerodynamics;

Expand All @@ -92,9 +91,9 @@ BOOST_AUTO_TEST_CASE( testAerodynamicCoefficientGenerator )
= boost::make_shared< geometric_shapes::SphereSegment >( 1.0 );

// Set vehicle in analysis with 10,000 panels.
vector< int > numberOfLines( 1, 31 );
vector< int > numberOfPoints( 1, 31 );
vector< bool > invertOrder( 1, false );
std::vector< int > numberOfLines( 1, 31 );
std::vector< int > numberOfPoints( 1, 31 );
std::vector< bool > invertOrder( 1, false );

// Create analysis object.
std::vector< std::vector< double > > independentVariableDataPoints;
Expand Down Expand Up @@ -283,9 +282,9 @@ boost::shared_ptr< HypersonicLocalInclinationAnalysis > getApolloCoefficientInte
= boost::make_shared< geometric_shapes::Capsule >(
4.694, 1.956, 2.662, -1.0 * 33.0 * PI / 180.0, 0.196 );

vector< int > numberOfLines( 4 );
vector< int > numberOfPoints( 4 );
vector< bool > invertOrders( 4 );
std::vector< int > numberOfLines( 4 );
std::vector< int > numberOfPoints( 4 );
std::vector< bool > invertOrders( 4 );

// Set number of analysis points.
numberOfLines[ 0 ] = 31;
Expand Down
1 change: 0 additions & 1 deletion Tudat/Astrodynamics/Aerodynamics/aerodynamicAcceleration.h
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ class AerodynamicAcceleration : public basic_astrodynamics::AccelerationModel< E
return computeAerodynamicAcceleration(
0.5 * currentDensity_ * currentAirspeed_ * currentAirspeed_,
currentReferenceArea_, currentForceCoefficients_, currentMass_ );

}

//! Update member variables used by the aerodynamic acceleration model.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#ifndef TUDAT_AERODYNAMIC_COEFFICIENT_INTERFACE_H
#define TUDAT_AERODYNAMIC_COEFFICIENT_INTERFACE_H

#include <iostream>
#include <stdexcept>
#include <vector>

Expand Down
4 changes: 2 additions & 2 deletions Tudat/Astrodynamics/Aerodynamics/aerodynamicGuidance.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ class AerodynamicGuidance

};

}
} // namespace aerodynamics

}
} // namespace tudat

#endif // TUDAT_ENTRYGUIDANCE_H
1 change: 0 additions & 1 deletion Tudat/Astrodynamics/Aerodynamics/aerodynamics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,6 @@ double computeShockDeflectionAngle( double shockAngle, double machNumber,
return atan( tangentOfDeflectionAngle_ );
}


//! Function to compute the speed of sound in a gas
double computeSpeedOfSound( const double temperature, const double ratioOfSpecificHeats,
const double specificGasConstant )
Expand Down
24 changes: 21 additions & 3 deletions Tudat/Astrodynamics/Aerodynamics/flightConditions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* http://tudat.tudelft.nl/LICENSE.
*/

#include <iostream>

#include <boost/make_shared.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/bind.hpp>
Expand Down Expand Up @@ -183,6 +181,26 @@ void FlightConditions::updateAerodynamicCoefficientInput( )
}
}

//! Function to set the angle of attack to trimmed conditions.
boost::shared_ptr< TrimOrientationCalculator > setTrimmedConditions(
const boost::shared_ptr< FlightConditions > flightConditions )
{
// Create trim object.
boost::shared_ptr< TrimOrientationCalculator > trimOrientation =
boost::make_shared< TrimOrientationCalculator >(
flightConditions->getAerodynamicCoefficientInterface( ) );

// Create angle-of-attack function from trim object.
boost::function< std::vector< double >( ) > untrimmedIndependentVariablesFunction =
boost::bind( &FlightConditions::getAerodynamicCoefficientIndependentVariables,
flightConditions );
flightConditions->getAerodynamicAngleCalculator( )->setOrientationAngleFunctions(
boost::bind( &TrimOrientationCalculator::findTrimAngleOfAttackFromFunction, trimOrientation,
untrimmedIndependentVariablesFunction ) );

return trimOrientation;
}

}
} // namespace aerodynamics

} // namespace tudat
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,6 @@ namespace tudat
namespace aerodynamics
{

using std::string;
using std::endl;
using basic_mathematics::Vector6d;
using mathematical_constants::PI;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
#ifndef TUDAT_HYPERSONIC_LOCAL_INCLINATION_ANALYSIS_H
#define TUDAT_HYPERSONIC_LOCAL_INCLINATION_ANALYSIS_H

#include <iostream>
#include <map>
#include <string>
#include <vector>
Expand Down
1 change: 0 additions & 1 deletion Tudat/Astrodynamics/Aerodynamics/nrlmsise00Atmosphere.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
* a copy of the license with this file. If not, please or visit:
* http://tudat.tudelft.nl/LICENSE.
*/
#include <iostream>

#include "Tudat/Astrodynamics/Aerodynamics/nrlmsise00Atmosphere.h"
#include "Tudat/Mathematics/BasicMathematics/mathematicalConstants.h"
Expand Down
2 changes: 0 additions & 2 deletions Tudat/Astrodynamics/Aerodynamics/nrlmsise00InputFunctions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
* http://tudat.tudelft.nl/LICENSE.
*/

#include <iostream>

#include <boost/lexical_cast.hpp>

#include "Tudat/Astrodynamics/Aerodynamics/nrlmsise00Atmosphere.h"
Expand Down
4 changes: 2 additions & 2 deletions Tudat/Astrodynamics/Aerodynamics/trimOrientation.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ class TrimOrientationCalculator
int variableIndex_;
};

}
} // namespace aerodynamics

}
} // namespace tudat

#endif // TUDAT_TRIMORIENTATION_H
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ class AnotherDerivedAccelerationModel
TimeDataType time;
};

} // namespace tudat
} // namespace unit_tests
} // namespace tudat

#endif // TUDAT_TEST_ACCELERATION_MODELS_H
1 change: 1 addition & 0 deletions Tudat/Astrodynamics/BasicAstrodynamics/accelerationModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
#ifndef TUDAT_ACCELERATION_MODEL_H
#define TUDAT_ACCELERATION_MODEL_H

#include <vector>
#include <map>
#include <unordered_map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
*
*/

#include <vector>
#include <cmath>

#include "Tudat/Mathematics/BasicMathematics/coordinateConversions.h"
Expand Down
1 change: 0 additions & 1 deletion Tudat/Astrodynamics/BasicAstrodynamics/massRateModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

#include <map>
#include <vector>
#include <iostream>
#include <boost/function.hpp>
#include <boost/shared_ptr.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* http://tudat.tudelft.nl/LICENSE.
*/

#include <iostream>
#include <vector>
#include <boost/lexical_cast.hpp>

#include "Tudat/Mathematics/BasicMathematics/mathematicalConstants.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ basic_mathematics::Vector6d convertCartesianToSphericalOrbitalState(
basic_mathematics::Vector6d convertSphericalOrbitalToCartesianState(
const basic_mathematics::Vector6d& sphericalOrbitalState );

} // namespace tudat

} // namespace orbital_element_conversions

} // namespace tudat


#endif // TUDAT_SPHERICALSTATECONVERSIONS_H
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ basic_mathematics::Vector6d convertUnifiedStateModelToKeplerianElements(
const Eigen::Matrix< double, 7, 1 >& unifiedStateModelElements,
const double centralBodyGravitationalParameter );

} // close namespace orbital_element_conversion
} // namespace orbital_element_conversions

} // close tudat

Expand Down
1 change: 1 addition & 0 deletions Tudat/Astrodynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#
# Notes
#

# Define the main sub-directories.
set(AERODYNAMICSDIR "${ASTRODYNAMICSDIR}/Aerodynamics")
set(BASICASTRODYNAMICSDIR "${ASTRODYNAMICSDIR}/BasicAstrodynamics")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
*
*/

#include <vector>
#include <cmath>

#include "Tudat/Astrodynamics/BasicAstrodynamics/unitConversions.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,48 +93,47 @@ struct ApproximatePlanetPositionsDataContainer
ApproximatePlanetPositionsDataContainer&
approximatePlanetPositionsDataContainer )
{
using std::endl;

stream << "This is an ApproximatePlanetPositionsDataContainer object. " << endl;
stream << "This is an ApproximatePlanetPositionsDataContainer object. " << std::endl;
stream << "The data corresponds to the table entry for "
<< approximatePlanetPositionsDataContainer.planetName_ << endl;
<< approximatePlanetPositionsDataContainer.planetName_ << std::endl;
stream << "The semi-major axis in AU is set to: "
<< approximatePlanetPositionsDataContainer.semiMajorAxis_ << endl;
<< approximatePlanetPositionsDataContainer.semiMajorAxis_ << std::endl;
stream << "The eccentricity in radians is set to: "
<< approximatePlanetPositionsDataContainer.eccentricity_ << endl;
<< approximatePlanetPositionsDataContainer.eccentricity_ << std::endl;
stream << "The inclination in degrees is set to: "
<< approximatePlanetPositionsDataContainer.inclination_ << endl;
<< approximatePlanetPositionsDataContainer.inclination_ << std::endl;
stream << "The mean longitude in degrees is set to: "
<< approximatePlanetPositionsDataContainer.meanLongitude_ << endl;
<< approximatePlanetPositionsDataContainer.meanLongitude_ << std::endl;
stream << "The longitude of perihelion in degrees is set to: "
<< approximatePlanetPositionsDataContainer.longitudeOfPerihelion_ << endl;
<< approximatePlanetPositionsDataContainer.longitudeOfPerihelion_ << std::endl;
stream << "The longitude of the ascending node in degrees is set to: "
<< approximatePlanetPositionsDataContainer.longitudeOfAscendingNode_<< endl;
<< approximatePlanetPositionsDataContainer.longitudeOfAscendingNode_<< std::endl;
stream << "The rate of change of semi-major axis AU per century is set to: "
<< approximatePlanetPositionsDataContainer.rateOfChangeOfSemiMajorAxis_ << endl;
<< approximatePlanetPositionsDataContainer.rateOfChangeOfSemiMajorAxis_ << std::endl;
stream << "The rate of change of eccentricity in radians per century is set to: "
<< approximatePlanetPositionsDataContainer.rateOfChangeOfEccentricity_ << endl;
<< approximatePlanetPositionsDataContainer.rateOfChangeOfEccentricity_ << std::endl;
stream << "The rate of change of inclination in degrees per century is set to: "
<< approximatePlanetPositionsDataContainer.rateOfChangeOfInclination_ << endl;
<< approximatePlanetPositionsDataContainer.rateOfChangeOfInclination_ << std::endl;
stream << "The rate of change of mean longitude in degrees per century is set to: "
<< approximatePlanetPositionsDataContainer.rateOfChangeOfMeanLongitude_ << endl;
<< approximatePlanetPositionsDataContainer.rateOfChangeOfMeanLongitude_ << std::endl;
stream << "The rate of change of longitude of perihelion in degrees per century is set to: "
<< approximatePlanetPositionsDataContainer.rateOfChangeOfLongitudeOfPerihelion_ << endl;
<< approximatePlanetPositionsDataContainer.rateOfChangeOfLongitudeOfPerihelion_ << std::endl;
stream << "The rate of change of longitude of ascending node in degrees per century is set "
<< "to: " << approximatePlanetPositionsDataContainer
.rateOfChangeOfLongitudeOfAscendingNode_ << endl;
.rateOfChangeOfLongitudeOfAscendingNode_ << std::endl;

// Check if additional terms are defined for outer planets.
if ( approximatePlanetPositionsDataContainer.additionalTermB_ != -0.0 )
{
stream << "The additional term B is set to: "
<< approximatePlanetPositionsDataContainer.additionalTermB_ << endl;
<< approximatePlanetPositionsDataContainer.additionalTermB_ << std::endl;
stream << "The additional term C is set to: "
<< approximatePlanetPositionsDataContainer.additionalTermC_ << endl;
<< approximatePlanetPositionsDataContainer.additionalTermC_ << std::endl;
stream << "The additional term S is set to: "
<< approximatePlanetPositionsDataContainer.additionalTermS_ << endl;
<< approximatePlanetPositionsDataContainer.additionalTermS_ << std::endl;
stream << "The additional term F is set to: "
<< approximatePlanetPositionsDataContainer .additionalTermF_ << endl;
<< approximatePlanetPositionsDataContainer .additionalTermF_ << std::endl;
}

// Return stream.
Expand Down
3 changes: 0 additions & 3 deletions Tudat/Astrodynamics/Ephemerides/ephemeris.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
* a copy of the license with this file. If not, please or visit:
* http://tudat.tudelft.nl/LICENSE.
*/

#include <iostream>

#include "Tudat/Astrodynamics/Ephemerides/ephemeris.h"

namespace tudat
Expand Down
2 changes: 1 addition & 1 deletion Tudat/Astrodynamics/Ephemerides/rotationalEphemeris.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Eigen::Matrix< StateScalarType, 6, 1 > transformStateToGlobalFrame(

}

} // namespace tudat
} // namespace ephemerides
} // namespace tudat

#endif // TUDAT_ROTATIONAL_EPHEMERIS_H
4 changes: 2 additions & 2 deletions Tudat/Astrodynamics/Ephemerides/simpleRotationalEphemeris.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ class SimpleRotationalEphemeris : public RotationalEphemeris
* \return Rotation rate [rad/s].
*/
double getRotationRate( ) { return rotationRate_; }
\

//! Function to reset the rotation rate of the body.
/*!
* Function to reset the rotation rate of the body.
Expand Down Expand Up @@ -281,7 +281,7 @@ class SimpleRotationalEphemeris : public RotationalEphemeris
Eigen::Matrix3d auxiliaryMatrix_;
};

} // namespace tudat
} // namespace ephemerides
} // namespace tudat

#endif // TUDAT_SIMPLE_ROTATIONAL_EPHEMERIS_H
Loading

0 comments on commit a0e7252

Please sign in to comment.