Module: facetDragDynamicEffector¶
Drag dynamics class used to compute drag effects on spacecraft bodies
This class is used to implement drag dynamic effects on spacecraft using a variety of simple or complex models, which will include
cannonball (attitude-independent) drag, single flat-plate drag, faceted drag models, and an interface to full-CAD GPU-accellerated
drag models.
For more information see the
PDF Description.
-
struct
SpacecraftGeometryData¶
-
class
FacetDragDynamicEffector: public SysModel, public DynamicEffector¶ Public Functions
-
FacetDragDynamicEffector()¶
-
~FacetDragDynamicEffector()¶ The destructor.
-
void
linkInStates(DynParamManager &states)¶ This method is used to link the dragEffector to the hub attitude and velocity, which are required for calculating drag forces and torques.
- Return
void
- Parameters
currentTime: The current simulation time converted to a double
-
void
computeForceTorque(double integTime)¶ This method computes the body forces and torques for the dragEffector in a simulation loop, selecting the model type based on the settable attribute “modelType.”
-
void
SelfInit()¶ This method currently does very little.
- Return
void
-
void
CrossInit()¶ This method is used to connect the input density message to the drag effector. It sets the message ID based on what it finds for the input string.
- Return
void
-
void
Reset(uint64_t CurrentSimNanos)¶
-
void
UpdateState(uint64_t CurrentSimNanos)¶ This method is called to update the local atmospheric conditions at each timestep. Naturally, this means that conditions are held piecewise-constant over an integration step.
- Return
void
- Parameters
CurrentSimNanos: The current simulation time in nanoseconds
-
void
WriteOutputMessages(uint64_t CurrentClock)¶ The DragEffector does not write output messages to the rest of the sim.
- Return
void
-
bool
ReadInputs()¶ This method is used to read the incoming density message and update the internal density/ atmospheric data.
- Return
void
-
void
setDensityMessage(std::string newDensMessage)¶ This method is used to set the input density message produced by some atmospheric model.
- Return
void
Public Members
-
uint64_t
numFacets¶
-
std::string
atmoDensInMsgName¶ message used to read command inputs
message used to read command inputs
Private Functions
-
void
plateDrag()¶ This method WILL implement a more complex flat-plate aerodynamics model with attitude dependence and lift forces.
-
void
updateDragDir()¶ This method updates the internal drag direction based on the spacecraft velocity vector.
Private Members
-
int64_t
densInMsgId¶ Message ID for incoming data
-
AtmoPropsSimMsg
atmoInData¶
-
SpacecraftGeometryData
scGeometry¶ Struct to hold spacecraft facet data
-