Tudat/External/SpiceInterface/spiceRotationalEphemeris.cpp
//! Function to calculate the full rotational state at given time

Function to calculate the full rotational state at given time
Function to calculate the full rotational state at given time
void SpiceRotationalEphemeris::getFullRotationalQuantitiesToTargetFrame(
        Eigen::Quaterniond& currentRotationToLocalFrame,
        Eigen::Matrix3d& currentRotationToLocalFrameDerivative,
        Eigen::Vector3d& currentAngularVelocityVectorInGlobalFrame,
        const double secondsSinceEpoch)
{
    std::pair< Eigen::Quaterniond, Eigen::Matrix3d > fullRotation =
            spice_interface::computeRotationQuaternionAndRotationMatrixDerivativeBetweenFrames(
                baseFrameOrientation_, targetFrameOrientation_, secondsSinceEpoch + referenceDayOffSet_ );
    currentRotationToLocalFrame = fullRotation.first;
    currentRotationToLocalFrameDerivative = fullRotation.second;
    currentAngularVelocityVectorInGlobalFrame = getRotationalVelocityVectorInBaseFrameFromMatrices(
                Eigen::Matrix3d( currentRotationToLocalFrame ), currentRotationToLocalFrameDerivative.transpose( ) );
}
void SpiceRotationalEphemeris :: getFullRotationalQuantitiesToTargetFrame ( Eigen :: Quaterniond & currentRotationToLocalFrame , Eigen :: Matrix3d & currentRotationToLocalFrameDerivative , Eigen :: Vector3d & currentAngularVelocityVectorInGlobalFrame , const double secondsSinceEpoch ) { std :: pair < Eigen :: Quaterniond , Eigen :: Matrix3d > fullRotation = spice_interface :: computeRotationQuaternionAndRotationMatrixDerivativeBetweenFrames ( baseFrameOrientation_ , targetFrameOrientation_ , secondsSinceEpoch + referenceDayOffSet_ ) ; currentRotationToLocalFrame = fullRotation . first ; currentRotationToLocalFrameDerivative = fullRotation . second ; currentAngularVelocityVectorInGlobalFrame = getRotationalVelocityVectorInBaseFrameFromMatrices ( Eigen :: Matrix3d ( currentRotationToLocalFrame ) , currentRotationToLocalFrameDerivative . transpose ( ) ) ; }
Function to calculate the full rotational state at given time
Function to calculate the full rotational state at given time
// Calculate rotation (and its time derivative) directly from spice.
 // Calculate angular velocity vector.
