Tudat/Astrodynamics/OrbitDetermination/AccelerationPartials/sphericalHarmonicAccelerationPartial.cpp
//! Function to create a function returning the current partial w.r.t. a gravitational parameter.
Function to create a function returning the current partial w.r.t. a gravitational parameter.
Function to create a function returning the current partial w . r . t . a gravitational parameter .
std::pair< std::function< void( Eigen::MatrixXd& ) >, int >
SphericalHarmonicsGravityPartial::getGravitationalParameterPartialFunction(
        const estimatable_parameters::EstimatebleParameterIdentifier& parameterId )
{
    std::function< void( Eigen::MatrixXd& ) > partialFunction;
    int numberOfColumns = 0;
    if( parameterId.first ==  estimatable_parameters::gravitational_parameter )
    {
        if( parameterId.second.first == acceleratingBody_ )
        {
            partialFunction = std::bind( &SphericalHarmonicsGravityPartial::wrtGravitationalParameterOfCentralBody,
                                           this, std::placeholders::_1, 0 );
            numberOfColumns = 1;
        }
        if( parameterId.second.first == acceleratedBody_ )
        {
            if( accelerationUsesMutualAttraction_ )
            {
                partialFunction = std::bind( &SphericalHarmonicsGravityPartial::wrtGravitationalParameterOfCentralBody,
                                               this, std::placeholders::_1, 0 );
                numberOfColumns = 1;
            }
        }
    }
    return std::make_pair( partialFunction, numberOfColumns );
}
std :: pair < std :: function < void ( Eigen :: MatrixXd & ) > , int > SphericalHarmonicsGravityPartial :: getGravitationalParameterPartialFunction ( const estimatable_parameters :: EstimatebleParameterIdentifier & parameterId ) { std :: function < void ( Eigen :: MatrixXd & ) > partialFunction ; int numberOfColumns = 0 ; if ( parameterId . first == estimatable_parameters :: gravitational_parameter ) { if ( parameterId . second . first == acceleratingBody_ ) { partialFunction = std :: bind ( & SphericalHarmonicsGravityPartial :: wrtGravitationalParameterOfCentralBody , this , std :: placeholders :: _1 , 0 ) ; numberOfColumns = 1 ; } if ( parameterId . second . first == acceleratedBody_ ) { if ( accelerationUsesMutualAttraction_ ) { partialFunction = std :: bind ( & SphericalHarmonicsGravityPartial :: wrtGravitationalParameterOfCentralBody , this , std :: placeholders :: _1 , 0 ) ; numberOfColumns = 1 ; } } } return std :: make_pair ( partialFunction , numberOfColumns ) ; }
Function to create a function returning the current partial w.r.t.
Function to create a function returning the current partial w . r . t .
// Check for dependency