Tudat/Astrodynamics/Aerodynamics/flightConditions.cpp
//! Constructor, sets objects and functions from which relevant environment and state variables are retrieved.
Constructor, sets objects and functions from which relevant environment and state variables are retrieved.
Constructor sets objects and functions from which relevant environment and state variables are retrieved .
FlightConditions::FlightConditions( const std::shared_ptr< basic_astrodynamics::BodyShapeModel > shapeModel,
                  const std::shared_ptr< reference_frames::AerodynamicAngleCalculator >
                  aerodynamicAngleCalculator ):
    shapeModel_( shapeModel ),
    aerodynamicAngleCalculator_( aerodynamicAngleCalculator ),
    currentTime_( TUDAT_NAN )
{
    bodyCenteredPseudoBodyFixedStateFunction_ = std::bind(
                &reference_frames::AerodynamicAngleCalculator::getCurrentAirspeedBasedBodyFixedState, aerodynamicAngleCalculator_ );
    if( std::dynamic_pointer_cast< basic_astrodynamics::OblateSpheroidBodyShapeModel >( shapeModel ) != nullptr )
    {
        geodeticLatitudeFunction_ = std::bind(
                    &basic_astrodynamics::OblateSpheroidBodyShapeModel::getGeodeticLatitude,
                    std::dynamic_pointer_cast< basic_astrodynamics::OblateSpheroidBodyShapeModel >( shapeModel ),
                    std::placeholders::_1, 1.0E-4 );
    }
}
FlightConditions :: FlightConditions ( const std :: shared_ptr < basic_astrodynamics :: BodyShapeModel > shapeModel , const std :: shared_ptr < reference_frames :: AerodynamicAngleCalculator > aerodynamicAngleCalculator ) : shapeModel_ ( shapeModel ) , aerodynamicAngleCalculator_ ( aerodynamicAngleCalculator ) , currentTime_ ( TUDAT_NAN ) { bodyCenteredPseudoBodyFixedStateFunction_ = std :: bind ( & reference_frames :: AerodynamicAngleCalculator :: getCurrentAirspeedBasedBodyFixedState , aerodynamicAngleCalculator_ ) ; if ( std :: dynamic_pointer_cast < basic_astrodynamics :: OblateSpheroidBodyShapeModel > ( shapeModel ) != nullptr ) { geodeticLatitudeFunction_ = std :: bind ( & basic_astrodynamics :: OblateSpheroidBodyShapeModel :: getGeodeticLatitude , std :: dynamic_pointer_cast < basic_astrodynamics :: OblateSpheroidBodyShapeModel > ( shapeModel ) , std :: placeholders :: _1 , 1.0E-4 ) ; } }
Constructor, sets objects and functions from which relevant environment and state variables are retrieved.
Constructor sets objects and functions from which relevant environment and state variables are retrieved .
// Link body-state function. // Check if given body shape is an oblate spheroid and set geodetic latitude function if so