Tudat/Astrodynamics/Propagators/stateTransitionMatrixInterface.cpp
//! Function to get the concatenated state transition and sensitivity matrix at a given time.
Function to get the concatenated state transition and sensitivity matrix at a given time.
Function to get the concatenated state transition and sensitivity matrix at a given time .
Eigen::MatrixXd HybridArcCombinedStateTransitionAndSensitivityMatrixInterface::getCombinedStateTransitionAndSensitivityMatrix(
        const double evaluationTime )
{
    std::pair< int, double >  currentArc = multiArcInterface_->getCurrentArc( evaluationTime );
    Eigen::MatrixXd combinedStateTransitionMatrix = Eigen::MatrixXd::Zero(
                stateTransitionMatrixSize_, stateTransitionMatrixSize_ + sensitivityMatrixSize_ );
    Eigen::MatrixXd singleArcStateTransition = singleArcInterface_->getCombinedStateTransitionAndSensitivityMatrix(
                evaluationTime );
     at current arc start
    Eigen::MatrixXd singleArcStateTransitionAtArcStart = singleArcInterface_->getCombinedStateTransitionAndSensitivityMatrix(
                currentArc.second );
    Eigen::MatrixXd multiArcStateTransition = multiArcInterface_->getCombinedStateTransitionAndSensitivityMatrix(
                evaluationTime );
    combinedStateTransitionMatrix.block( 0, 0, singleArcStateSize_, singleArcStateSize_ ) =
            singleArcStateTransition.block( 0, 0, singleArcStateSize_, singleArcStateSize_ );
    combinedStateTransitionMatrix.block(
                singleArcStateSize_, singleArcStateSize_, originalMultiArcStateSize_,
                originalMultiArcStateSize_ ) =
            multiArcStateTransition.block(
                singleArcStateSize_, singleArcStateSize_, originalMultiArcStateSize_,
                originalMultiArcStateSize_ );
    combinedStateTransitionMatrix.block(
                singleArcStateSize_, 0, originalMultiArcStateSize_,
                singleArcStateSize_ ) =
            multiArcStateTransition.block(
                singleArcStateSize_, 0, originalMultiArcStateSize_,
                singleArcStateSize_ ) * singleArcStateTransitionAtArcStart.block(
                0, 0, singleArcStateSize_, singleArcStateSize_ );
    combinedStateTransitionMatrix.block( 0, multiArcStateSize_, singleArcStateSize_, sensitivityMatrixSize_ ) =
            singleArcStateTransition.block( 0, singleArcStateSize_, singleArcStateSize_, sensitivityMatrixSize_ );
    combinedStateTransitionMatrix.block(
                singleArcStateSize_, multiArcStateSize_, originalMultiArcStateSize_, sensitivityMatrixSize_ ) =
            multiArcStateTransition.block(
                singleArcStateSize_, multiArcStateSize_, originalMultiArcStateSize_, sensitivityMatrixSize_ );
    return combinedStateTransitionMatrix;
}
Eigen :: MatrixXd HybridArcCombinedStateTransitionAndSensitivityMatrixInterface :: getCombinedStateTransitionAndSensitivityMatrix ( const double evaluationTime ) { std :: pair < int , double > currentArc = multiArcInterface_ -> getCurrentArc ( evaluationTime ) ; Eigen :: MatrixXd combinedStateTransitionMatrix = Eigen :: MatrixXd :: Zero ( stateTransitionMatrixSize_ , stateTransitionMatrixSize_ + sensitivityMatrixSize_ ) ; Eigen :: MatrixXd singleArcStateTransition = singleArcInterface_ -> getCombinedStateTransitionAndSensitivityMatrix ( evaluationTime ) ; Eigen :: MatrixXd singleArcStateTransitionAtArcStart = singleArcInterface_ -> getCombinedStateTransitionAndSensitivityMatrix ( currentArc . second ) ; Eigen :: MatrixXd multiArcStateTransition = multiArcInterface_ -> getCombinedStateTransitionAndSensitivityMatrix ( evaluationTime ) ; combinedStateTransitionMatrix . block ( 0 , 0 , singleArcStateSize_ , singleArcStateSize_ ) = singleArcStateTransition . block ( 0 , 0 , singleArcStateSize_ , singleArcStateSize_ ) ; combinedStateTransitionMatrix . block ( singleArcStateSize_ , singleArcStateSize_ , originalMultiArcStateSize_ , originalMultiArcStateSize_ ) = multiArcStateTransition . block ( singleArcStateSize_ , singleArcStateSize_ , originalMultiArcStateSize_ , originalMultiArcStateSize_ ) ; combinedStateTransitionMatrix . block ( singleArcStateSize_ , 0 , originalMultiArcStateSize_ , singleArcStateSize_ ) = multiArcStateTransition . block ( singleArcStateSize_ , 0 , originalMultiArcStateSize_ , singleArcStateSize_ ) * singleArcStateTransitionAtArcStart . block ( 0 , 0 , singleArcStateSize_ , singleArcStateSize_ ) ; combinedStateTransitionMatrix . block ( 0 , multiArcStateSize_ , singleArcStateSize_ , sensitivityMatrixSize_ ) = singleArcStateTransition . block ( 0 , singleArcStateSize_ , singleArcStateSize_ , sensitivityMatrixSize_ ) ; combinedStateTransitionMatrix . block ( singleArcStateSize_ , multiArcStateSize_ , originalMultiArcStateSize_ , sensitivityMatrixSize_ ) = multiArcStateTransition . block ( singleArcStateSize_ , multiArcStateSize_ , originalMultiArcStateSize_ , sensitivityMatrixSize_ ) ; return combinedStateTransitionMatrix ; }
Function to get the concatenated state transition and sensitivity matrix at a given time.
Function to get the concatenated state transition and sensitivity matrix at a given time .
// Get single-arc matrices // Get single-arc matrices at current arc start // Get multi-arc matrices // Set single-arc block // Set multi-arc block // Set coupled block // Set sensitivity block