Module: dragDynamicEffector¶
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-accelerated drag models.
-
struct
DragBaseData
¶ - #include <dragDynamicEffector.h>
Container for basic drag parameters - the spacecraft’s atmosphere-relative velocity, its projected area, and its drag coefficient.
-
class
DragDynamicEffector
: public SysModel, public DynamicEffector¶ Public Functions
-
DragDynamicEffector
()¶
-
~DragDynamicEffector
()¶ 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
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
cannonballDrag
()¶ This method implements a simple “cannnonball” (attitude-independent) drag model.
-
void
updateDragDir
()¶ This method updates the internal drag direction based on the spacecraft velocity vector.
-
void
setDensityMessage
(std::string newDensMessage)¶ This method is used to set the input density message produced by some atmospheric model.
- Return
void
Public Members
-
DragBaseData
coreParams
¶ Struct used to hold drag parameters
-
std::string
atmoDensInMsgName
¶ message used to read command inputs
message used to read spacecraft attitude
-
std::string
modelType
¶ String used to set the type of model used to compute drag
-