Module: stateEffector
Abstract class that is used to implement an effector attached to the dynamicObject that has a state that needs to be integrated. For example: reaction wheels, flexing solar panels, fuel slosh etc
-
struct BackSubMatrices
- #include <stateEffector.h>
back substitution matrix structure
Public Members
-
Eigen::Matrix3d matrixA
Back-Substitution matrix A.
-
Eigen::Matrix3d matrixB
Back-Substitution matrix B.
-
Eigen::Matrix3d matrixC
Back-Substitution matrix C.
-
Eigen::Matrix3d matrixD
Back-Substitution matrix D.
-
Eigen::Vector3d vecTrans
Back-Substitution translation vector.
-
Eigen::Vector3d vecRot
Back-Substitution rotation vector.
-
Eigen::Matrix3d matrixA
-
struct EffectorMassProps
- #include <stateEffector.h>
Abstract class that is used to implement an effector attached to the dynamicObject that has a state that needs to be integrated. For example: reaction wheels, flexing solar panels, fuel slosh etc.
Public Members
-
double mEff
[kg] Mass of the effector
-
double mEffDot
[kg/s] Time derivate of mEff
-
Eigen::Matrix3d IEffPntB_B
[kg m^2] Inertia of effector relative to point B in B frame components
-
Eigen::Vector3d rEff_CB_B
[m] Center of mass of effector with respect to point B in B frame comp
-
Eigen::Vector3d rEffPrime_CB_B
[m/s] Time derivative with respect to the body of rEff_CB_B
-
Eigen::Matrix3d IEffPrimePntB_B
[kg m^2/s] Time derivative with respect to the body of IEffPntB_B
-
double mEff
-
class StateEffector
- #include <stateEffector.h>
state effector class
Subclassed by HubEffector
Public Functions
-
void setStateNameOfPosition(std::string value)
setter for
stateNameOfPosition
property
-
inline const std::string getStateNameOfPosition() const
getter for
stateNameOfPosition
property
-
void setStateNameOfVelocity(std::string value)
setter for
stateNameOfVelocity
property
-
inline const std::string getStateNameOfVelocity() const
getter for
stateNameOfVelocity
property
-
void setStateNameOfSigma(std::string value)
setter for
stateNameOfSigma
property
-
inline const std::string getStateNameOfSigma() const
getter for
stateNameOfSigma
property
-
void setStateNameOfOmega(std::string value)
setter for
stateNameOfOmega
property
-
inline const std::string getStateNameOfOmega() const
getter for
stateNameOfOmega
property
-
void setPropName_m_SC(std::string value)
setter for
propName_m_SC
property
-
inline const std::string getPropName_m_SC() const
getter for
propName_m_SC
property
-
void setPropName_mDot_SC(std::string value)
setter for
propName_mDot_SC
property
-
inline const std::string getPropName_mDot_SC() const
getter for
propName_mDot_SC
property
-
void setPropName_centerOfMassSC(std::string value)
setter for
propName_centerOfMassSC
property
-
inline const std::string getPropName_centerOfMassSC() const
getter for
propName_centerOfMassSC
property
-
void setPropName_inertiaSC(std::string value)
setter for
propName_inertiaSC
property
-
inline const std::string getPropName_inertiaSC() const
getter for
propName_inertiaSC
property
-
void setPropName_inertiaPrimeSC(std::string value)
setter for
propName_inertiaPrimeSC
property
-
inline const std::string getPropName_inertiaPrimeSC() const
getter for
propName_inertiaPrimeSC
property
-
void setPropName_centerOfMassPrimeSC(std::string value)
setter for
propName_centerOfMassPrimeSC
property
-
inline const std::string getPropName_centerOfMassPrimeSC() const
getter for
propName_centerOfMassPrimeSC
property
-
void setPropName_centerOfMassDotSC(std::string value)
setter for
propName_centerOfMassDotSC
property
-
inline const std::string getPropName_centerOfMassDotSC() const
getter for
propName_centerOfMassDotSC
property
-
void setPropName_inertialPosition(std::string value)
setter for
propName_inertialPosition
property
-
inline const std::string getPropName_inertialPosition() const
getter for
propName_inertialPosition
property
-
void setPropName_inertialVelocity(std::string value)
setter for
propName_inertialVelocity
property
-
inline const std::string getPropName_inertialVelocity() const
getter for
propName_inertialVelocity
property
-
void setPropName_vehicleGravity(std::string value)
setter for
propName_vehicleGravity
property
-
inline const std::string getPropName_vehicleGravity() const
getter for
propName_vehicleGravity
property
-
StateEffector()
Contructor.
This is the constructor, just setting the variables to zero
-
virtual ~StateEffector()
Destructor.
This is the destructor, nothing to report here
-
virtual void updateEffectorMassProps(double integTime)
Method for stateEffector to give mass contributions.
This method is for the state effector to provide its contributions of mass and mass rates to the dynamicObject. This allows for the dynamicObject to have access to the total mass, and inerita, mass and inertia rates
-
virtual 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 strictly for the back-substituion method for computing the dynamics of the spacecraft. The back-sub method first computes rDDot_BN_N and omegaDot_BN_B for the spacecraft using these contributions from the state effectors. Then computeDerivatives is called to compute the stateEffectors derivatives using rDDot_BN_N omegaDot_BN_B
-
virtual void updateEnergyMomContributions(double integTime, Eigen::Vector3d &rotAngMomPntCContr_B, double &rotEnergyContr, Eigen::Vector3d omega_BN_B)
Energy and momentum calculations.
This method allows for an individual stateEffector to add its energy and momentum calculations to the dynamicObject. The analytical devlopement of these contributions can be seen in Basilisk/simulation/dynamics/_Documentation/Basilisk-EnergyAndMomentum-20161219.pdf
-
virtual void modifyStates(double integTime)
Modify state values after integration.
This method allows for an individual stateEffector to modify their states after integration
-
virtual void calcForceTorqueOnBody(double integTime, Eigen::Vector3d omega_BN_B)
Force and torque on s/c due to stateEffector.
This method allows for an individual stateEffector to find the force and torque that the stateEffector is placing on to the body
-
virtual void writeOutputStateMessages(uint64_t integTimeNanos)
Write State Messages after integration.
This method ensures that all dynamics states have their messages written after integation
-
virtual void registerStates(DynParamManager &states) = 0
Method for stateEffectors to register states.
-
virtual void linkInStates(DynParamManager &states) = 0
Method for stateEffectors to get other states.
-
virtual void computeDerivatives(double integTime, Eigen::Vector3d rDDot_BN_N, Eigen::Vector3d omegaDot_BN_B, Eigen::Vector3d sigma_BN) = 0
Method for each stateEffector to calculate derivatives.
-
virtual void prependSpacecraftNameToStates()
This method ensures that stateEffectors can be implemented using the multi-spacecraft archticture
-
virtual void receiveMotherSpacecraftData(Eigen::Vector3d rSC_BP_P, Eigen::Matrix3d dcmSC_BP)
class method
Public Members
-
std::string nameOfSpacecraftAttachedTo = ""
class variable
-
std::string parentSpacecraftName = ""
name of the spacecraft the state effector is attached to
-
EffectorMassProps effProps
stateEffectors instantiation of effector mass props
-
Eigen::VectorXd stateDerivContribution
stateEffector contribution to another stateEffector to prevent double-counting
-
Eigen::Vector3d forceOnBody_B
[N] Force that the state effector applies to the s/c
-
Eigen::Vector3d torqueOnBodyPntB_B
[N] Torque that the state effector applies to the body about point B
-
Eigen::Vector3d torqueOnBodyPntC_B
[N] Torque that the state effector applies to the body about point B
-
Eigen::Vector3d r_BP_P
position vector of the spacecraft mody frame origin B relative to the primary spacecraft body frame P. This is used in the SpacecraftSystem module where multiple spacecraft hubs can be a single spacecraft
-
Eigen::Matrix3d dcm_BP
DCM of the spacecraft body frame B relative to primary spacecraft body frame P.
-
BSKLogger bskLogger
BSK Logging.
Protected Attributes
-
std::string stateNameOfPosition = ""
state engine name of the parent rigid body inertial position vector
-
std::string stateNameOfVelocity = ""
state engine name of the parent rigid body inertial velocity vector
-
std::string stateNameOfSigma = ""
state engine name of the parent rigid body inertial attitude
-
std::string stateNameOfOmega = ""
state engine name of the parent rigid body inertial angular velocity vector
-
std::string propName_m_SC = ""
property name of m_SC
-
std::string propName_mDot_SC = ""
property name of mDot_SC
-
std::string propName_centerOfMassSC = ""
property name of centerOfMassSC
-
std::string propName_inertiaSC = ""
property name of inertiaSC
-
std::string propName_inertiaPrimeSC = ""
property name of inertiaPrimeSC
-
std::string propName_centerOfMassPrimeSC = ""
property name of centerOfMassPrimeSC
-
std::string propName_centerOfMassDotSC = ""
property name of centerOfMassDotSC
-
std::string propName_inertialPosition = ""
property name of inertialPosition
-
std::string propName_inertialVelocity = ""
property name of inertialVelocity
-
std::string propName_vehicleGravity = ""
property name of vehicleGravity
-
void setStateNameOfPosition(std::string value)