Tudat/Astrodynamics/BasicAstrodynamics/unifiedStateModelModifiedRodriguesParameterElementConversions.cpp
//! Convert unified state model elements with modified Rodrigues parameters to Cartesian elements.
Convert unified state model elements with modified Rodrigues parameters to Cartesian elements.
Convert unified state model elements with modified Rodrigues parameters to Cartesian elements .
Eigen::Vector6d convertUnifiedStateModelModifiedRodriguesParametersToCartesianElements(
        const Eigen::Vector7d& unifiedStateModelModifiedRodriguesParametersElements,
        const double centralBodyGravitationalParameter )
{
    Eigen::Vector7d unifiedStateModelQuaternionElements;
    unifiedStateModelQuaternionElements.segment( CHodographUSM7Index, 3 ) =
            unifiedStateModelModifiedRodriguesParametersElements.segment( CHodographUSMEMIndex, 3 );
    unifiedStateModelQuaternionElements.segment( etaUSM7Index, 4 ) =
            convertModifiedRodriguesParametersToQuaternionElements(
                unifiedStateModelModifiedRodriguesParametersElements.segment( sigma1USM6Index, 4 ) );
    return convertUnifiedStateModelQuaternionsToCartesianElements( unifiedStateModelQuaternionElements,
                                                                   centralBodyGravitationalParameter );
}
Eigen :: Vector6d convertUnifiedStateModelModifiedRodriguesParametersToCartesianElements ( const Eigen :: Vector7d & unifiedStateModelModifiedRodriguesParametersElements , const double centralBodyGravitationalParameter ) { Eigen :: Vector7d unifiedStateModelQuaternionElements ; unifiedStateModelQuaternionElements . segment ( CHodographUSM7Index , 3 ) = unifiedStateModelModifiedRodriguesParametersElements . segment ( CHodographUSMEMIndex , 3 ) ; unifiedStateModelQuaternionElements . segment ( etaUSM7Index , 4 ) = convertModifiedRodriguesParametersToQuaternionElements ( unifiedStateModelModifiedRodriguesParametersElements . segment ( sigma1USM6Index , 4 ) ) ; return convertUnifiedStateModelQuaternionsToCartesianElements ( unifiedStateModelQuaternionElements , centralBodyGravitationalParameter ) ; }
Convert unified state model elements with modified Rodrigues parameters to Cartesian elements.
Convert unified state model elements with modified Rodrigues parameters to Cartesian elements .
// Create USM7 vector and add velocity hodograph elements // Add quaternions to USM7 vector // Give back result