Module: radiation_pressure

Radiation pressure dynamics class used to compute

The module PDF Description contains further information on this module’s function, how to run it, as well as testing.


Enums

enum srpModel_t

Values:

enumerator SRP_CANNONBALL_MODEL
enumerator SRP_FACETED_CPU_MODEL
class RadiationPressure : public SysModel, public DynamicEffector

Public Functions

RadiationPressure()

This is the constructor. It sets some default initializers that can be overriden by the user.

~RadiationPressure()

The destructor. Nothing of note is performed here

void SelfInit()

This method is used to create any messages published by this module.

Return

void

void CrossInit()

This method is used to subscribe to systems message from this module. It sets the message ID based on what it finds for the input string. If the message is not successfully linked, it will warn the user.

Return

void

void UpdateState(uint64_t CurrentSimNanos)

Update model state by reading in new message data

Return

void

Parameters
  • CurrentSimNanos: current simulation time in nanoseconds

void linkInStates(DynParamManager &statesIn)

This method retrieves pointers to parameters/data stored in the dynamic parameter manager

Return

void

Parameters
  • statesIn: Dynamic parameter manager

void readInputMessages()

This method is used to read the incoming ephmeris and spacecraft state messages. The data is stored in the associated buffer structure.

Return

void

void computeForceTorque(double integTime)

This method computes the dynamic effect due to solar raidation pressure. It is an inherited method from the DynamicEffector class and is designed to be called by the simulation dynamics engine.

Return

void

Parameters
  • integTime: Current simulation integration time

void setUseCannonballModel()

Sets the model to the cannonball model in computing the solar radiation force

Return

void

void setUseFacetedCPUModel()

Sets the model to the faceted table-lookup model, evaluted on the CPU, in computing the solar radiation force

Return

void

void addForceLookupBEntry(Eigen::Vector3d vec)

Add force vector in the body frame to lookup table.

Return

void

Parameters
  • vec: (N) Force vector for particular attitude in lookup table

void addTorqueLookupBEntry(Eigen::Vector3d vec)

Add torque vector to lookup table.

Return

void

Parameters
  • vec: (Nm) Torque vector for particular attitude in lookup table

void addSHatLookupBEntry(Eigen::Vector3d vec)

Add sun unit direction vector in body frame to lookup table.

Return

void

Parameters
  • vec: sun unit direction vector in body frame

Public Members

double area

m^2 Body surface area

double coefficientReflection

Factor grouping surface optical properties

std::string sunEphmInMsgName

Message name for the sun state

std::string stateInMsgName

Message name for the S/C state

std::string sunEclipseInMsgName

[-] Message name for sun eclipse state message

std::vector<Eigen::Vector3d> lookupForce_B

Force on S/C at 1 AU from sun

std::vector<Eigen::Vector3d> lookupTorque_B

Torque on S/C

std::vector<Eigen::Vector3d> lookupSHat_B

S/C to sun unit vector defined in the body frame.

BSKLogger bskLogger

BSK Logging

Private Functions

void computeCannonballModel(Eigen::Vector3d rSunB_B)

Computes the solar radiation force vector based on cross-sectional Area and mass of the spacecraft and the position vector of the spacecraft to the sun. The solar radiation pressure decreases quadratically with distance from sun (in AU)

Solar Radiation Equations obtained from Earth Space and Planets Journal Vol. 51, 1999 pp. 979-986

Return

void

Parameters
  • s_N: (m) Position vector to the Sun relative to the inertial frame

void computeLookupModel(Eigen::Vector3d rSunB_B)

Computes the solar radiation force vector using a lookup table given the current spacecraft attitude and the position vector of the spacecraft to the sun. It is assumed that the lookup table has been generated with a solar flux at 1AU. Force and torque values are scaled.

Return

void

Parameters
  • s_B: (m) Position vector of the Sun relative to the body frame

Private Members

srpModel_t srpModel

specifies which SRP model to use

int64_t sunEphmInMsgId

Message ID for incoming sun ephemeris data

int64_t sunEclipseInMsgId

[-] Connect to input sun eclipse message

SpicePlanetStateSimMsg sunEphmInBuffer

Buffer for incoming ephemeris message data

int64_t stateInMsgId

Message ID for incoming SC state data

bool stateRead

Indicates a succesful read of incoming SC state message data

SCPlusStatesSimMsg stateInBuffer

Buffer for incoming state message data

EclipseSimMsg sunVisibilityFactor

[-] scaling parameter from 0 (fully obscured) to 1 (fully visible)