sphericalPendulum#

Executive Summary#

This class in an instantiation of the state effector class and implements an effector representing spherical pendulum.

The module PDF Description contains further information on this module’s function, how to run it, as well as testing.

Message Connection Descriptions#

This state effector does not have any input or output messages

Class SphericalPendulum#

class SphericalPendulum : public StateEffector, public SysModel, public FuelSlosh#

spherical pendulum state effector model

Public Functions

SphericalPendulum()#

— Contructor

This is the constructor, setting variables to default values

~SphericalPendulum()#

— Destructor

This is the destructor, nothing to report here

void registerStates(DynParamManager &states)#

— Method for FSP to register its states

This is the method for the spherical pendulum to register its states: l and lDot

void linkInStates(DynParamManager &states)#

— Method for FSP to get access of other states

Method for spherical pendulum to access the states that it needs. It needs gravity and the hub states

void updateEffectorMassProps(double integTime)#

— Method for FSP to add its contributions to mass props

This is the method for the FSP to add its contributions to the mass props and mass prop rates of the vehicle

void modifyStates(double integTime)#

— Method to force states modification during integration

void retrieveMassValue(double integTime)#

This is method is used to pass mass properties information to the fuelTank

void updateContributions(double integTime, BackSubMatrices &backSubContr, Eigen::Vector3d sigma_BN, Eigen::Vector3d omega_BN_B, Eigen::Vector3d g_N)#

— Back-sub contributions

This method is for the FSP to add its contributions to the back-sub method

void updateEnergyMomContributions(double integTime, Eigen::Vector3d &rotAngMomPntCContr_B, double &rotEnergyContr, Eigen::Vector3d omega_BN_B)#

— Energy and momentum calculations

This method is for the FSP to add its contributions to energy and momentum

void computeDerivatives(double integTime, Eigen::Vector3d rDDot_BN_N, Eigen::Vector3d omegaDot_BN_B, Eigen::Vector3d sigma_BN)#

— Method for each stateEffector to calculate derivatives

This method is used to define the derivatives of the FSP. One is the trivial kinematic derivative and the other is derived using the back-sub method

Public Members

double pendulumRadius#

[m] distance between the center of the tank and the spherical pendulum mass

Eigen::Matrix3d D#

[N*s/m] linear damping matrix for spherical pendulum

double phiDotInit#

[rad/s] Initial value for spherical pendulum pendulum offset derivative

double thetaDotInit#

[rad/s] Initial value for spherical pendulum pendulum offset derivative

double massInit#

[m] Initial value for spherical pendulum pendulum mass

std::string nameOfPhiState#

[-] Identifier for the phi state data container

std::string nameOfThetaState#

[-] Identifier for the theta state data container

std::string nameOfPhiDotState#

[-] Identifier for the phiDot state data container

std::string nameOfThetaDotState#

[-] Identifier for the thetaDot state data container

std::string nameOfMassState#

[-] Identifier for the mass state data container

Eigen::Vector3d d#

[m] position vector from B point to tank center , T, in body frame

StateData *massState#

— state data for the pendulums mass

Eigen::Vector3d pHat_01#

— first vector of the P0 frame in B frame components

Eigen::Vector3d pHat_02#

— second vector of the P0 frame in B frame components

Eigen::Vector3d pHat_03#

— third vector of the P0 frame in B frame components

BSKLogger bskLogger#

— BSK Logging