Module: hubEffector

This class is an instantiation of the stateEffector abstract class and is for the hub of the s/c. The hub has 4 states: r_BN_N, rDot_BN_N, sigma_BN and omega_BN_B. The hub utilizes the back-substitution method for calculating its derivatives using contributions from Module: stateEffector and Module: dynamicEffector.


class HubEffector : public StateEffector

Public Functions

HubEffector()

Contructor

This is the constructor, setting variables to default values

~HubEffector()

Destructor

This is the destructor, nothing to report here

void linkInStates(DynParamManager &statesIn)

Method to give the hub access to states

This method allows the hub access to gravity and also gets access to the properties in the dyn Manager because uses these values in the computeDerivatives method call

void registerStates(DynParamManager &states)

Method for the hub to register some states

This method allows the hub to register its states: r_BN_N, v_BN_N, sigma_BN and omega_BN_B

void updateEffectorMassProps(double integTime)

Method for the hub to update its mass props for the s/c

This method allows the hub to give its mass properties to the spacecraft

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

Method for the hub to compute it’s derivatives

This method is for computing the derivatives of the hub: rDDot_BN_N and omegaDot_BN_B, along with the kinematic derivatives

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

Add contributions to energy and momentum

This method is for computing the energy and momentum contributions from the hub

void modifyStates(double integTime)

Method to switch MRPs

This method is for switching the MRPs

void prependSpacecraftNameToStates()

Public Members

double mHub

[kg] mass of the hub

uint64_t MRPSwitchCount

Count on times we’ve shadowed

std::string nameOfHubPosition

Identifier for hub position states

std::string nameOfHubVelocity

Identifier for hub velocity states

std::string nameOfHubSigma

Identifier for hub sigmaBN states

std::string nameOfHubOmega

Identifier for hub omegaBN_B states

Eigen::Vector3d r_BcB_B

[m] vector from point B to CoM of hub in B frame components

Eigen::Matrix3d IHubPntBc_B

[kg m^2] Inertia of hub about point Bc in B frame components

BackSubMatrices hubBackSubMatrices
Eigen::Vector3d r_CN_NInit

[m] Initial position of the spacecraft wrt to base

Eigen::Vector3d v_CN_NInit

[m/s Initial velocity of the spacecraft wrt base

Eigen::Vector3d sigma_BNInit

Initial attitude of the spacecraft wrt base

Eigen::Vector3d omega_BN_BInit

[r/s] Initial attitude rate of the spacecraf wrt base

BSKLogger bskLogger

BSK Logging

Private Members

Eigen::Vector3d r_BcP_P

[m] vector from point B to CoM of hub in B frame components

Eigen::Matrix3d IHubPntBc_P

[kg m^2] Inertia of hub about point Bc in B frame components

StateData *posState

[-] State data container for hub position

StateData *velocityState

[-] State data container for hub velocity

StateData *sigmaState

[-] State data container for hub sigma_BN

StateData *omegaState

[-] State data container for hub omegaBN_B