Tudat/Astrodynamics/Gravitation/unitConversionsCircularRestrictedThreeBodyProblem.cpp
//! Convert dimensionless Cartesian state to dimensional units.

Convert dimensionless Cartesian state to dimensional units.
Convert dimensionless Cartesian state to dimensional units .
Eigen::VectorXd convertDimensionlessCartesianStateToDimensionalUnits(
        const Eigen::Vector6d &dimensionlessCartesianState,
        const double gravitationalParameterOfPrimaryBody,
        const double gravitationalParameterOfSecondaryBody,
        const double distanceBetweenPrimaries )
{
    Eigen::Vector6d dimensionalCartesianState;
    dimensionalCartesianState.segment( 0, 3 )
            = dimensionlessCartesianState.segment( 0, 3 ) * distanceBetweenPrimaries;
    dimensionalCartesianState.segment( 3, 3 )
            = dimensionlessCartesianState.segment( 3, 3 )
            * std::sqrt( ( gravitationalParameterOfPrimaryBody
                           + gravitationalParameterOfSecondaryBody ) / distanceBetweenPrimaries );
    return dimensionalCartesianState;
}
Eigen :: VectorXd convertDimensionlessCartesianStateToDimensionalUnits ( const Eigen :: Vector6d & dimensionlessCartesianState , const double gravitationalParameterOfPrimaryBody , const double gravitationalParameterOfSecondaryBody , const double distanceBetweenPrimaries ) { Eigen :: Vector6d dimensionalCartesianState ; dimensionalCartesianState . segment ( 0 , 3 ) = dimensionlessCartesianState . segment ( 0 , 3 ) * distanceBetweenPrimaries ; dimensionalCartesianState . segment ( 3 , 3 ) = dimensionlessCartesianState . segment ( 3 , 3 ) * std :: sqrt ( ( gravitationalParameterOfPrimaryBody + gravitationalParameterOfSecondaryBody ) / distanceBetweenPrimaries ) ; return dimensionalCartesianState ; }
Convert dimensionless Cartesian state to dimensional units.
Convert dimensionless Cartesian state to dimensional units .
// Declare dimensional Cartesian state.
 // Convert position to dimensional units.
 // Convert velocity to dimensional units.
 // Return state in dimensional units.
