atmosphereBase#

Executive Summary#

General atmosphere base class used to calculate neutral density/temperature using arbitrary models The Atmosphere class is used to calculate the neutral density and temperature above a body using arbitrary models. Each atmosphere is attached to a specific planet, but provides support for multiple spacecraft through addSpacecraftToModel().

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

scStateInMsgs

SCStatesMsgPayload

vector of spacecraft state input messages

envOutMsgs

AtmoPropsMsgPayload

vector of atmospheric density output messages

planetPosInMsg

SpicePlanetStateMsgPayload

(optional) planet state input message. If not provided the planet state is zero information.

epochInMsg

EpochMsgPayload

(optional) epoch date/time input message

class AtmosphereBase : public SysModel#

atmospheric density base class

Subclassed by ExponentialAtmosphere, MsisAtmosphere, TabularAtmosphere

Public Functions

AtmosphereBase()#

This method initializes some basic parameters for the module.

Returns:

void

~AtmosphereBase()#

Destructor.

Returns:

void

void reset(uint64_t currentSimNanos)#

This method is used to reset the module.

Returns:

void

void addSpacecraftToModel(Message<SCStatesMsgPayload> *tmpScMsg)#

Adds the spacecraft message to a vector of sc messages and automatically creates the corresponding output message.

Parameters:

tmpScMsg – A spacecraft state message name.

Returns:

void

void updateState(uint64_t currentSimNanos)#

Computes the current local magnetic field for each spacecraft and writes their respective messages.

Parameters:

currentSimNanos – The current simulation time in nanoseconds

Returns:

void

Public Members

std::vector<ReadFunctor<SCStatesMsgPayload>> scStateInMsgs#

Vector of the spacecraft position/velocity input message.

std::vector<Message<AtmoPropsMsgPayload>*> envOutMsgs#

Vector of message names to be written out by the environment.

ReadFunctor<SpicePlanetStateMsgPayload> planetPosInMsg#

Message name for the planet’s SPICE position message.

ReadFunctor<EpochMsgPayload> epochInMsg#

(optional) epoch date/time input message

double envMinReach#

[m] Minimum planet-relative position needed for the environment to work, default is off (neg. value)

double envMaxReach#

[m] Maximum distance at which the environment will be calculated, default is off (neg. value)

double planetRadius#

[m] Radius of the planet

BSKLogger bskLogger#

— BSK Logging