Tudat/Astrodynamics/OrbitDetermination/RotationalDynamicsPartials/secondDegreeGravitationalTorquePartial.cpp
//! Update partial model to current time

Update partial model to current time
Update partial model to current time
void SecondDegreeGravitationalTorquePartial::update( const double currentTime )
{
    if( !( currentTime_ == currentTime ) )
    {
        torqueModel_->updateMembers( currentTime );
        currentQuaternionVector_ = linear_algebra::convertQuaternionToVectorFormat(
                    ( torqueModel_->getCurrentRotationToBodyFixedFrame( ) ).inverse( ) );
        linear_algebra::computePartialDerivativeOfRotationMatrixWrtQuaternion(
                    currentQuaternionVector_,  currentRotationMatrixDerivativesWrtQuaternion_ );
        currentBodyFixedRelativePosition_ = torqueModel_->getCurrentRelativeBodyFixedPositionOfBodySubjectToTorque( );
        currentCoefficientPartialPremultiplier_ = torqueModel_->getCurrentTorqueMagnitudePremultiplier( ) *
                linear_algebra::getCrossProductMatrix( currentBodyFixedRelativePosition_ );
        currentPartialDerivativeWrtQuaternion_ = getPartialDerivativeOfSecondDegreeGravitationalTorqueWrtQuaternion(
                    torqueModel_->getCurrentTorqueMagnitudePremultiplier( ),
                    torqueModel_->getCurrentInertiaTensorOfRotatingBody( ),
                    torqueModel_->getCurrentRelativeBodyFixedPositionOfBodySubjectToTorque(),
                    torqueModel_->getCurrentRelativePositionOfBodySubjectToTorque( ),
                    currentRotationMatrixDerivativesWrtQuaternion_ );
    }
}
void SecondDegreeGravitationalTorquePartial :: update ( const double currentTime ) { if ( ! ( currentTime_ == currentTime ) ) { torqueModel_ -> updateMembers ( currentTime ) ; currentQuaternionVector_ = linear_algebra :: convertQuaternionToVectorFormat ( ( torqueModel_ -> getCurrentRotationToBodyFixedFrame ( ) ) . inverse ( ) ) ; linear_algebra :: computePartialDerivativeOfRotationMatrixWrtQuaternion ( currentQuaternionVector_ , currentRotationMatrixDerivativesWrtQuaternion_ ) ; currentBodyFixedRelativePosition_ = torqueModel_ -> getCurrentRelativeBodyFixedPositionOfBodySubjectToTorque ( ) ; currentCoefficientPartialPremultiplier_ = torqueModel_ -> getCurrentTorqueMagnitudePremultiplier ( ) * linear_algebra :: getCrossProductMatrix ( currentBodyFixedRelativePosition_ ) ; currentPartialDerivativeWrtQuaternion_ = getPartialDerivativeOfSecondDegreeGravitationalTorqueWrtQuaternion ( torqueModel_ -> getCurrentTorqueMagnitudePremultiplier ( ) , torqueModel_ -> getCurrentInertiaTensorOfRotatingBody ( ) , torqueModel_ -> getCurrentRelativeBodyFixedPositionOfBodySubjectToTorque ( ) , torqueModel_ -> getCurrentRelativePositionOfBodySubjectToTorque ( ) , currentRotationMatrixDerivativesWrtQuaternion_ ) ; } }
Update partial model to current time
Update partial model to current time