Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propagators #25

Merged
merged 98 commits into from
Jun 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
3873602
Beta version of time-dependent sh gravity, without unit test
DominicDirkx Jan 22, 2016
9ed8fcc
Adding missing files
DominicDirkx Jan 22, 2016
9d4352f
First version of simulation setup, going to merge aerodynamics update…
DominicDirkx Jan 22, 2016
ceec142
Merge branch 'AerodynamicCoefficientInterface' into SimulationSetup
DominicDirkx Jan 22, 2016
aab8b47
Merged with updated atmosphere models
DominicDirkx Jan 22, 2016
f359f8a
With preliminary flight conditions code from old setup
DominicDirkx Jan 22, 2016
8631441
Merge branch 'SimulationSetup' into FlightConditions
DominicDirkx Jan 22, 2016
855d6e9
Merge branch 'ShapeModels' into InterfaceSetup
DominicDirkx Jan 22, 2016
f5b104d
Merge branch 'RadiationPressureUpdate' into InterfaceSetup
DominicDirkx Jan 22, 2016
2f98922
Intermediate commit for simulation setup
DominicDirkx Jan 22, 2016
2565cea
With extra setup functions
DominicDirkx Jan 22, 2016
64a6863
Merge branch 'FlightConditions' into InterfaceSetup
DominicDirkx Jan 23, 2016
d3df473
With extra acceleration model setup functions
DominicDirkx Jan 23, 2016
f03381e
With minor modifications
DominicDirkx Jan 23, 2016
90d68a3
Some mroe progress on automatic setup of non-conservative forces
DominicDirkx Jan 29, 2016
8d536bc
Comments update
DominicDirkx Feb 3, 2016
65e4054
Update createAccelerationModels.h
DominicDirkx Feb 3, 2016
f341da7
Working on unit tests
DominicDirkx Feb 3, 2016
b8ca1ee
First part of unit test running
DominicDirkx Feb 3, 2016
c7dc01c
Further modifications to interface setup
DominicDirkx Mar 1, 2016
f1f8224
With extra comments and unit tests
DominicDirkx Mar 1, 2016
bfb5fd1
Updated unit tests
DominicDirkx Mar 2, 2016
ccd2464
Merge remote-tracking branch 'origin' into SimulationSetup
DominicDirkx Mar 2, 2016
3129027
Merge branch 'SimulationSetup' of https://github.com/DominicDirkx/tud…
DominicDirkx Mar 2, 2016
3f4df4b
Merge remote-tracking branch 'SimulationSetup' into InterfaceSetup
DominicDirkx Mar 2, 2016
c643c52
Merge branch 'AerodynamicCoefficientInterface' into InterfaceSetup
DominicDirkx Mar 2, 2016
09f5d1a
Merge branch 'RadiationPressureUpdate' into InterfaceSetup
DominicDirkx Mar 2, 2016
49e19d0
Merge branch 'ShapeModels' into InterfaceSetup
DominicDirkx Mar 2, 2016
82d2afd
Merged with existing branches
DominicDirkx Mar 2, 2016
7c632a1
Merge remote-tracking branch 'origin' into TimDepSh
DominicDirkx Mar 2, 2016
43eec5d
With files from personal code
DominicDirkx Mar 3, 2016
16511c7
Merge branch 'InterfaceSetup' into Propagators
DominicDirkx Mar 3, 2016
7cbd966
Working on modifications
DominicDirkx Mar 3, 2016
aa5f423
With some restructuring
DominicDirkx Mar 3, 2016
f21d145
Merge branch 'InterfaceSetup' into Propagators
DominicDirkx Mar 3, 2016
fb53b6f
More modifications and additions
DominicDirkx Mar 3, 2016
b1a6b25
Compiling, but failing
DominicDirkx Mar 3, 2016
c734b37
Cowell unit tests working. Much documentation still lacking
DominicDirkx Mar 3, 2016
02e9340
Removed state derivative model dependency
DominicDirkx Mar 3, 2016
ee9a661
With rotation now in SphericalHarmonicAcceleration
DominicDirkx Mar 3, 2016
9fcc880
Merge branch 'InterfaceSetup' into Propagators
DominicDirkx Mar 3, 2016
b789a52
With added comments
DominicDirkx Mar 3, 2016
96aa794
Merge branch 'TimDepSh' into Propagators
DominicDirkx Mar 3, 2016
e519073
More comments
DominicDirkx Mar 4, 2016
a4df4e4
More comments; minor modifications
DominicDirkx Mar 6, 2016
4fcf721
More comments; minor modifications
DominicDirkx Mar 7, 2016
99e3a5c
First commenting iteration of Propagators folder
DominicDirkx Mar 8, 2016
90e6fad
Added unitTestCompositeEphemeris with new setup
DominicDirkx Mar 8, 2016
8d1e27c
Expanded acceleration model unit tests
DominicDirkx Mar 8, 2016
e298fc0
Synced with KeplerEphemeris branch
DominicDirkx Mar 8, 2016
339bdc1
Updated unit tests and comments
DominicDirkx Mar 9, 2016
24937fc
Body object now fully commented
DominicDirkx Mar 9, 2016
8042693
First iteration of Propagators and related functionality commented etc.
DominicDirkx Mar 9, 2016
9a50585
Added personal version of createGravityFieldVariations and related code
DominicDirkx Mar 9, 2016
d497ccd
With setup and test of gravity field variations (but few comments)
DominicDirkx Mar 10, 2016
770b84c
Commented gravity field variation tests (and some minor modifications)
DominicDirkx Mar 11, 2016
c02419e
With first version of environment model updater.
DominicDirkx Mar 18, 2016
bccdf30
Added start of unit test for environment updater
DominicDirkx Mar 18, 2016
5dcd047
Finalized unit test of environment updater
DominicDirkx Mar 19, 2016
71f0eca
With aerodynamic coefficient update
DominicDirkx Jan 22, 2016
0d7cb6e
First version of simulation setup, going to merge aerodynamics update…
DominicDirkx Jan 22, 2016
9d28f59
Merged with updated atmosphere models
DominicDirkx Jan 22, 2016
1cbb738
Update createAccelerationModels.h
DominicDirkx Feb 3, 2016
202389b
Updated unit tests
DominicDirkx Mar 2, 2016
43d375b
Merge branch 'SimulationSetup' of https://github.com/DominicDirkx/tud…
DominicDirkx Apr 7, 2016
b8c8778
Synced with master
DominicDirkx Apr 7, 2016
c105ce6
Synced with master
DominicDirkx Apr 7, 2016
446ad83
Merge branch 'master' into TimDepSh
DominicDirkx Apr 7, 2016
e604df3
Added new file header to Propagators folder
DominicDirkx Apr 8, 2016
e107567
Updated file headers in new files
DominicDirkx Apr 8, 2016
b73c549
Fixed merge conflict
DominicDirkx Apr 8, 2016
5fac5ad
Synced with SimulationSetup; updated files headers and documentation
DominicDirkx Apr 8, 2016
efb07c4
Fixed bug in Spherical Harmonic acceleration
DominicDirkx Apr 10, 2016
5f465e1
Added file headers
DominicDirkx Apr 12, 2016
8e04e9a
Merge branch 'TimDepSh' into Propagators
DominicDirkx Apr 12, 2016
7964b37
Update orbitalElementConversions.h
DominicDirkx Apr 26, 2016
2c10a26
Modification for consistency with applications
DominicDirkx May 11, 2016
a4af3b7
Synced With SimulationSetup
DominicDirkx May 11, 2016
eda8afb
Fix building without SPICE
magnific0 May 12, 2016
802ad22
Remove SPICE function from subtest, was unused.
magnific0 May 12, 2016
cccd95d
Rename mass to gravParam, less confusing
magnific0 May 12, 2016
0534821
Fixed namespace end comments.
magnific0 May 12, 2016
366aa20
FixFix gravParam Doxygen comment.
magnific0 May 12, 2016
d385796
Type and doxygen fixes mostly.
magnific0 May 12, 2016
d43509a
Removed spurious variable in Body class
DominicDirkx May 12, 2016
87c6c1d
Merge branch 'DominicDirkx-SimulationSetup'
DominicDirkx May 12, 2016
39eee3f
Branch now consistent with new master
DominicDirkx May 12, 2016
b36a608
Added USE_CSPICE macro
DominicDirkx May 12, 2016
8b3f832
Minor modifications for consistency with applications
DominicDirkx May 18, 2016
a991226
Minor correction to error handling
DominicDirkx May 18, 2016
1657769
Bug fix in aerodynamics computations
DominicDirkx May 18, 2016
fc0c6d1
Added possibility for custom-defined aerodynamic coefficient dependen…
DominicDirkx May 25, 2016
6a88a46
With default spherical harmonic fields
DominicDirkx May 27, 2016
e8d93c3
Unit test fix
DominicDirkx May 27, 2016
0146e53
Streamlining of propagator settings (removed requirement for redundan…
DominicDirkx May 27, 2016
5967a59
Bring back state derivative models (for now).
magnific0 May 13, 2016
2efd462
With code check modifications from Jacco
DominicDirkx Jun 1, 2016
233c130
Merge branch 'magnific0-Propagators' into Propagators
DominicDirkx Jun 1, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Tudat/Astrodynamics/Aerodynamics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ set(AERODYNAMICS_SOURCES
"${SRCROOT}${AERODYNAMICSDIR}/hypersonicLocalInclinationAnalysis.cpp"
"${SRCROOT}${AERODYNAMICSDIR}/tabulatedAtmosphere.cpp"
"${SRCROOT}${AERODYNAMICSDIR}/customAerodynamicCoefficientInterface.cpp"
"${SRCROOT}${AERODYNAMICSDIR}/flightConditions.cpp"
)

# Set the header files.
Expand All @@ -61,6 +62,8 @@ set(AERODYNAMICS_HEADERS
"${SRCROOT}${AERODYNAMICSDIR}/tabulatedAtmosphere.h"
"${SRCROOT}${AERODYNAMICSDIR}/standardAtmosphere.h"
"${SRCROOT}${AERODYNAMICSDIR}/customAerodynamicCoefficientInterface.h"
"${SRCROOT}${AERODYNAMICSDIR}/flightConditions.h"
"${SRCROOT}${AERODYNAMICSDIR}//UnitTests/testApolloCapsuleCoefficients.h"
)

if(USE_NRLMSISE00)
Expand All @@ -77,7 +80,7 @@ setup_tudat_library_target(tudat_aerodynamics "${SRCROOT}{AERODYNAMICSDIR}")
# Add unit tests.
add_executable(test_AerodynamicMomentAndAerodynamicForce "${SRCROOT}${AERODYNAMICSDIR}/UnitTests/unitTestAerodynamicMomentAndAerodynamicForce.cpp")
setup_custom_test_program(test_AerodynamicMomentAndAerodynamicForce "${SRCROOT}${AERODYNAMICSDIR}")
target_link_libraries(test_AerodynamicMomentAndAerodynamicForce tudat_aerodynamics ${Boost_LIBRARIES})
target_link_libraries(test_AerodynamicMomentAndAerodynamicForce tudat_simulation_setup tudat_aerodynamics tudat_reference_frames tudat_ephemerides tudat_basic_mathematics ${Boost_LIBRARIES})

add_executable(test_AerodynamicsNamespace "${SRCROOT}${AERODYNAMICSDIR}/UnitTests/unitTestAerodynamicsNamespace.cpp")
setup_custom_test_program(test_AerodynamicsNamespace "${SRCROOT}${AERODYNAMICSDIR}")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#ifndef TUDAT_TESTAPOLLOCAPSULECOEFFICIENTS_H
#define TUDAT_TESTAPOLLOCAPSULECOEFFICIENTS_H

#include "Tudat/Mathematics/BasicMathematics/mathematicalConstants.h"
#include "Tudat/Astrodynamics/Aerodynamics/hypersonicLocalInclinationAnalysis.h"
#include "Tudat/Mathematics/GeometricShapes/capsule.h"

namespace tudat
{
namespace unit_tests
{

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

boost::shared_ptr< HypersonicLocalInclinationAnalysis > getApolloCoefficientInterface( )
{

// Create test capsule.
boost::shared_ptr< geometric_shapes::Capsule > capsule
= 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;
numberOfLines.resize( 4 );
numberOfPoints.resize( 4 );
invertOrders.resize( 4 );

// Set number of analysis points.
numberOfLines[ 0 ] = 31;
numberOfPoints[ 0 ] = 31;
numberOfLines[ 1 ] = 31;
numberOfPoints[ 1 ] = 31;
numberOfLines[ 2 ] = 31;
numberOfPoints[ 2 ] = 10;
numberOfLines[ 3 ] = 11;
numberOfPoints[ 3 ] = 11;
invertOrders[ 0 ] = 0;
invertOrders[ 1 ] = 0;
invertOrders[ 2 ] = 0;
invertOrders[ 3 ] = 0;

Eigen::Vector3d momentReference;
momentReference( 0 ) = -0.6624;
momentReference( 1 ) = 0.0;
momentReference( 2 ) = -0.1369;

std::vector< std::vector< double > > independentVariableDataPoints;
independentVariableDataPoints.resize( 3 );
independentVariableDataPoints[ 0 ] = getDefaultHypersonicLocalInclinationMachPoints( "Full" );
std::vector< double > angleOfAttackPoints;
angleOfAttackPoints.resize( 7 );

for ( int i = 0; i < 7; i++ )
{
angleOfAttackPoints[ i ] = static_cast< double >( i - 6 ) * 5.0 * PI / 180.0;
}

independentVariableDataPoints[ 1 ] = angleOfAttackPoints;
independentVariableDataPoints[ 2 ] =
getDefaultHypersonicLocalInclinationAngleOfSideslipPoints( );
std::vector< std::vector< int > > selectedMethods;
selectedMethods.resize( 2 );
selectedMethods[ 0 ].resize( 4 );
selectedMethods[ 1 ].resize( 4 );

selectedMethods[ 0 ][ 0 ] = 1;
selectedMethods[ 0 ][ 1 ] = 5;
selectedMethods[ 0 ][ 2 ] = 5;
selectedMethods[ 0 ][ 3 ] = 1;
selectedMethods[ 1 ][ 0 ] = 6;
selectedMethods[ 1 ][ 1 ] = 3;
selectedMethods[ 1 ][ 2 ] = 3;
selectedMethods[ 1 ][ 3 ] = 3;

// Create analysis object and capsule database.
return boost::make_shared< HypersonicLocalInclinationAnalysis >(
independentVariableDataPoints, capsule, numberOfLines, numberOfPoints,
invertOrders, selectedMethods, PI * pow( capsule->getMiddleRadius( ), 2.0 ),
3.9116, momentReference );
}

}

}
#endif // TUDAT_TESTAPOLLOCAPSULECOEFFICIENTS_H
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
#include "Tudat/Astrodynamics/Aerodynamics/customAerodynamicCoefficientInterface.h"
#include "Tudat/Astrodynamics/Aerodynamics/aerodynamicAcceleration.h"
#include "Tudat/Astrodynamics/Aerodynamics/aerodynamicRotationalAcceleration.h"
#include "Tudat/SimulationSetup/createFlightConditions.h"

namespace tudat
{
Expand All @@ -76,6 +77,7 @@ namespace unit_tests
BOOST_AUTO_TEST_SUITE( test_aerodynamic_acceleration_force_moment_models )

using namespace aerodynamics;
using namespace simulation_setup;

//! Test implementation of aerodynamic force and acceleration models.
BOOST_AUTO_TEST_CASE( testAerodynamicForceAndAcceleration )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,14 @@
#include <Eigen/Core>

#include "Tudat/Mathematics/BasicMathematics/mathematicalConstants.h"

#include "Tudat/Astrodynamics/Aerodynamics/hypersonicLocalInclinationAnalysis.h"
#include "Tudat/Astrodynamics/Aerodynamics/customAerodynamicCoefficientInterface.h"
#include "Tudat/Mathematics/BasicMathematics/linearAlgebraTypes.h"
#include "Tudat/Mathematics/GeometricShapes/capsule.h"
#include "Tudat/Mathematics/GeometricShapes/sphereSegment.h"

#include "Tudat/Astrodynamics/Aerodynamics/UnitTests/testApolloCapsuleCoefficients.h"

namespace tudat
{
namespace unit_tests
Expand Down Expand Up @@ -274,20 +275,8 @@ BOOST_AUTO_TEST_CASE( testAerodynamicCoefficientGenerator )
}
}

//! Apollo capsule test case.
BOOST_AUTO_TEST_CASE( testApolloCapsule )
boost::shared_ptr< HypersonicLocalInclinationAnalysis > getApolloCoefficientInterface( )
{
// Set units of coefficients.
const double expectedValueOfAerodynamicCoefficients0 = -1.51;
const double expectedValueOfAerodynamicCoefficients4 = -0.052;

// Tolerance in absolute units.
const double toleranceAerodynamicCoefficients0 = 0.1;
const double toleranceAerodynamicCoefficients1 = std::numeric_limits< double >::epsilon( );
const double toleranceAerodynamicCoefficients2 = std::numeric_limits< double >::epsilon( );
const double toleranceAerodynamicCoefficients3 = std::numeric_limits< double >::epsilon( );
const double toleranceAerodynamicCoefficients4 = 0.05;
const double toleranceAerodynamicCoefficients5 = std::numeric_limits< double >::epsilon( );

// Create test capsule.
boost::shared_ptr< geometric_shapes::Capsule > capsule
Expand Down Expand Up @@ -341,11 +330,28 @@ BOOST_AUTO_TEST_CASE( testApolloCapsule )
selectedMethods[ 1 ][ 3 ] = 3;

// Create analysis object and capsule database.
boost::shared_ptr< HypersonicLocalInclinationAnalysis > coefficientInterface =
boost::make_shared< HypersonicLocalInclinationAnalysis >(
return boost::make_shared< HypersonicLocalInclinationAnalysis >(
independentVariableDataPoints, capsule, numberOfLines, numberOfPoints,
invertOrders, selectedMethods, PI * pow( capsule->getMiddleRadius( ), 2.0 ),
3.9116, momentReference );
}
//! Apollo capsule test case.
BOOST_AUTO_TEST_CASE( testApolloCapsule )
{
// Set units of coefficients.
const double expectedValueOfAerodynamicCoefficients0 = -1.51;
const double expectedValueOfAerodynamicCoefficients4 = -0.052;

// Tolerance in absolute units.
const double toleranceAerodynamicCoefficients0 = 0.1;
const double toleranceAerodynamicCoefficients1 = std::numeric_limits< double >::epsilon( );
const double toleranceAerodynamicCoefficients2 = std::numeric_limits< double >::epsilon( );
const double toleranceAerodynamicCoefficients3 = std::numeric_limits< double >::epsilon( );
const double toleranceAerodynamicCoefficients4 = 0.05;
const double toleranceAerodynamicCoefficients5 = std::numeric_limits< double >::epsilon( );

// Create aerodynamic coefficients.
boost::shared_ptr< HypersonicLocalInclinationAnalysis > coefficientInterface = getApolloCoefficientInterface( );

// Retrieve coefficients at zero angle of attack for comparison.
boost::array< int, 3 > independentVariables;
Expand Down
18 changes: 12 additions & 6 deletions Tudat/Astrodynamics/Aerodynamics/aerodynamicAcceleration.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#ifndef TUDAT_AERODYNAMIC_ACCELERATION_H
#define TUDAT_AERODYNAMIC_ACCELERATION_H

#include <iostream>

#include <boost/function.hpp>
#include <boost/lambda/lambda.hpp>
#include <boost/shared_ptr.hpp>
Expand Down Expand Up @@ -190,14 +192,18 @@ class AerodynamicAcceleration : public basic_astrodynamics::AccelerationModel< E
* Function pointers to retrieve the current values of quantities from which the
* acceleration is to be calculated are set by constructor. This function calls
* them to update the associated variables to their current state.
* \param currentTime Time at which acceleration model is to be updated.
*/
void updateMembers( )
void updateMembers( const double currentTime = TUDAT_NAN )
{
currentForceCoefficients_ = coefficientMultiplier_ * this->coefficientFunction_( );
currentDensity_ = this->densityFunction_( );
currentMass_ = this->massFunction_( );
currentAirspeed_ = this->airSpeedFunction_( );
currentReferenceArea_ = this->referenceAreaFunction_( );
if( !( this->currentTime_ == currentTime ) )
{
currentForceCoefficients_ = coefficientMultiplier_ * this->coefficientFunction_( );
currentDensity_ = this->densityFunction_( );
currentMass_ = this->massFunction_( );
currentAirspeed_ = this->airSpeedFunction_( );
currentReferenceArea_ = this->referenceAreaFunction_( );
}
}

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace aerodynamics
* Enum defining a list of independent variables on which the aerodynamic coefficients can depend.
* Note that for a custom coefficient interface with other variables, you may use the
* undefined_independent_variable variable type, but at the expense of being able to use the
* FlightConditions class to automatically update the aerodynamic coefficients during propagation.
* FlightConditions class to automatically updates the aerodynamic coefficients during propagation.
*/
enum AerodynamicCoefficientsIndependentVariables
{
Expand Down Expand Up @@ -241,7 +241,27 @@ class AerodynamicCoefficientInterface
return numberOfIndependentVariables_;
}

//! Function that returns whether the coefficients are given in aerodynamic frame.
/*!
* Function that returns whether the coefficients are given in aerodynamic frame (given in body)
* frame if false.
* \return Boolean whether coefficients are in aerodynamic frame
*/
bool getAreCoefficientsInAerodynamicFrame( )
{
return areCoefficientsInAerodynamicFrame_;
}

//! Function that returns whether the coefficients are positive in positive axes directions.
/*!
* Function that returns whether the coefficients are positive in positive axes directions, i.e.
* if positive force (in given frame) gives positive coefficients.
* \return Boolean whether coefficients are in positive direction.
*/
bool getAreCoefficientsInNegativeAxisDirection( )
{
return areCoefficientsInNegativeAxisDirection_;
}

protected:

Expand Down
10 changes: 10 additions & 0 deletions Tudat/Astrodynamics/Aerodynamics/aerodynamicForce.cpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
/* Copyright (c) 2010-2016, Delft University of Technology
* All rigths reserved
*
* This file is part of the Tudat. Redistribution and use in source and
* binary forms, with or without modification, are permitted exclusively
* under the terms of the Modified BSD license. You should have received
* a copy of the license with this file. If not, please or visit:
* http://tudat.tudelft.nl/LICENSE.
*/

#include "Tudat/Astrodynamics/Aerodynamics/aerodynamicForce.h"

namespace tudat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,66 +0,0 @@
/* Copyright (c) 2010-2015, Delft University of Technology
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
* - Neither the name of the Delft University of Technology nor the names of its contributors
* may be used to endorse or promote products derived from this software without specific
* prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
* Changelog
* YYMMDD Author Comment
* 150416 D. Dirkx File created.
*
*/

#include <boost/lambda/lambda.hpp>

#include "Tudat/Astrodynamics/Aerodynamics/customAerodynamicCoefficientInterface.h"

namespace tudat
{
namespace aerodynamics
{

//! Function to create an aerodynamic coefficient interface containing constant coefficients.
boost::shared_ptr< AerodynamicCoefficientInterface >
createConstantCoefficientAerodynamicCoefficientInterface(
const Eigen::Vector3d constantForceCoefficient,
const Eigen::Vector3d constantMomentCoefficient,
const double referenceLength,
const double referenceArea,
const double lateralReferenceLength,
const Eigen::Vector3d& momentReferencePoint,
const bool areCoefficientsInAerodynamicFrame,
const bool areCoefficientsInNegativeAxisDirection )
{
// Create coefficient interface
boost::shared_ptr< AerodynamicCoefficientInterface > coefficientInterface =
boost::make_shared< CustomAerodynamicCoefficientInterface >(
boost::lambda::constant( constantForceCoefficient ),
boost::lambda::constant( constantMomentCoefficient ),
referenceLength, referenceArea, lateralReferenceLength, momentReferencePoint,
std::vector< AerodynamicCoefficientsIndependentVariables >( ),
areCoefficientsInAerodynamicFrame, areCoefficientsInNegativeAxisDirection );
coefficientInterface->updateCurrentCoefficients( std::vector< double >( ) );

return coefficientInterface;
}

} // namespace aerodynamics
} // namespace tudat
Loading