Module: dragDynamicEffector

Executive Summary

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.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.

Module I/O Messages

Msg Variable Name

Msg Type

Description

atmoDensInMsg

AtmoPropsMsgPayload

atmospheric density input message


struct DragBaseData
#include <dragDynamicEffector.h>

Container for basic drag parameters - the spacecraft’s atmosphere-relative velocity, its projected area, and its drag coefficient.

Public Members

double projectedArea

m^2 Area of spacecraft projected in velocity direction

double dragCoeff

&#8212; Nondimensional drag coefficient

Eigen::Vector3d comOffset

m distance from center of mass to center of projected area

class DragDynamicEffector : public SysModel, public DynamicEffector
#include <dragDynamicEffector.h>

drag dynamic effector

Public Functions

DragDynamicEffector()
~DragDynamicEffector()

The destructor.

void linkInStates(DynParamManager &states)

class method

This method is used to link the dragEffector to the hub attitude and velocity, which are required for calculating drag forces and torques.

Parameters

states – simulation states

Returns

void

void computeForceTorque(double integTime, double timeStep)

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 Reset(uint64_t CurrentSimNanos)

This method is used to reset the module.

Returns

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.

Parameters

CurrentSimNanos – The current simulation time in nanoseconds

Returns

void

void WriteOutputMessages(uint64_t CurrentClock)

The DragEffector does not write output messages to the rest of the sim.

Returns

void

bool ReadInputs()

This method is used to read the incoming density message and update the internal density/ atmospheric data.

Returns

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.

Public Members

DragBaseData coreParams

&#8212; Struct used to hold drag parameters

ReadFunctor<AtmoPropsMsgPayload> atmoDensInMsg

&#8212; message used to read density inputs

std::string modelType

&#8212; String used to set the type of model used to compute drag

StateData *hubSigma

&#8212; Hub/Inertial attitude represented by MRP

StateData *hubVelocity

m/s Hub inertial velocity vector

Eigen::Vector3d v_B

m/s local variable to hold the inertial velocity

Eigen::Vector3d v_hat_B

&#8212; Drag force direction in the inertial frame

BSKLogger bskLogger

&#8212; BSK Logging

Private Members

AtmoPropsMsgPayload atmoInData