Tudat/Astrodynamics/Gravitation/basicSolidBodyTideGravityFieldVariations.cpp
//! Sets current properties (mass state) of body involved in tidal deformation.

Sets current properties (mass state) of body involved in tidal deformation.
Sets current properties ( mass state ) of body involved in tidal deformation .
void BasicSolidBodyTideGravityFieldVariations::setBodyGeometryParameters(
        const int bodyIndex, const double evaluationTime )
{
    if( bodyIndex == 0 )
    {
        deformedBodyPosition = std::move( deformedBodyStateFunction_( evaluationTime ) ).segment( 0, 3 );
        toDeformedBodyFrameRotation = deformedBodyOrientationFunction_( evaluationTime );
    }
    Eigen::Vector3d relativeDeformingBodyPosition = toDeformedBodyFrameRotation * (
                std::move( deformingBodyStateFunctions_[ bodyIndex ]( evaluationTime ) ).segment( 0, 3 ) -
            deformedBodyPosition );
    Eigen::Vector3d  relativeDeformingBodySphericalPosition =coordinate_conversions::
            convertCartesianToSpherical( relativeDeformingBodyPosition );
    radiusRatio = deformedBodyReferenceRadius_ / relativeDeformingBodySphericalPosition.x( );
    iLongitude = mathematical_constants::COMPLEX_I * relativeDeformingBodySphericalPosition.z( );
    sineOfLatitude = std::sin( mathematical_constants::PI / 2.0 -
                               relativeDeformingBodySphericalPosition.y( ) );
}
void BasicSolidBodyTideGravityFieldVariations :: setBodyGeometryParameters ( const int bodyIndex , const double evaluationTime ) { if ( bodyIndex == 0 ) { deformedBodyPosition = std :: move ( deformedBodyStateFunction_ ( evaluationTime ) ) . segment ( 0 , 3 ) ; toDeformedBodyFrameRotation = deformedBodyOrientationFunction_ ( evaluationTime ) ; } Eigen :: Vector3d relativeDeformingBodyPosition = toDeformedBodyFrameRotation * ( std :: move ( deformingBodyStateFunctions_ [ bodyIndex ] ( evaluationTime ) ) . segment ( 0 , 3 ) - deformedBodyPosition ) ; Eigen :: Vector3d relativeDeformingBodySphericalPosition = coordinate_conversions :: convertCartesianToSpherical ( relativeDeformingBodyPosition ) ; radiusRatio = deformedBodyReferenceRadius_ / relativeDeformingBodySphericalPosition . x ( ) ; iLongitude = mathematical_constants :: COMPLEX_I * relativeDeformingBodySphericalPosition . z ( ) ; sineOfLatitude = std :: sin ( mathematical_constants :: PI / 2.0 - relativeDeformingBodySphericalPosition . y ( ) ) ; }
Sets current properties (mass state) of body involved in tidal deformation.
Sets current properties ( mass state ) of body involved in tidal deformation .
// Calculate current state and orientation of deformed body.
 // Calculate current state of body causing deformation.
 // Set geometric parameters of body causing deformation.
