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
#include <hubEffector.h>

spaecraft hub effector class

Public Functions

HubEffector()

&#8212; Contructor

This is the constructor, setting variables to default values

~HubEffector()

&#8212; Destructor

This is the destructor, nothing to report here

virtual void linkInStates(DynParamManager &statesIn)

&#8212; 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

virtual void registerStates(DynParamManager &states)

&#8212; 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

virtual void updateEffectorMassProps(double integTime)

&#8212; 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

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

&#8212; 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

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

&#8212; Add contributions to energy and momentum

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

virtual void modifyStates(double integTime)

&#8212; Method to switch MRPs

This method is for switching the MRPs

virtual void prependSpacecraftNameToStates()

class method

void matchGravitytoVelocityState(Eigen::Vector3d v_CN_N)

method to set the gravity velocity to base velocity

This method is used to set the gravitational velocity state equal to the base velocity state

Public Members

double mHub

[kg] mass of the hub

uint64_t MRPSwitchCount

&#8212; Count on times we’ve shadowed

std::string nameOfHubPosition

&#8212; Identifier for hub position states

std::string nameOfHubVelocity

&#8212; Identifier for hub velocity states

std::string nameOfHubSigma

&#8212; Identifier for hub sigmaBN states

std::string nameOfHubOmega

&#8212; Identifier for hub omegaBN_B states

std::string nameOfHubGravVelocity

&#8212; Identified for hub gravitational DV state

std::string nameOfBcGravVelocity

&#8212; Identified for point Bc gravitational DV state

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

class method

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

&#8212; Initial attitude of the spacecraft wrt base

Eigen::Vector3d omega_BN_BInit

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

BSKLogger bskLogger

&#8212; 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

Eigen::MatrixXd *g_N

[m/s^2] Gravitational acceleration in N 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

StateData *gravVelocityState

[-] State data container for hub gravitational velocity

StateData *gravVelocityBcState

[-] State data container for point Bc gravitational velocity