Module: radiationPressure

Executive Summary

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.

Message Connection Descriptions

The following table lists all the module input and output messages. The module msg variable name 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

sunEphmInMsg

SpicePlanetStateMsgPayload

sun state input message

sunEclipseInMsg

EclipseMsgPayload

(optional) sun eclipse input message


Enums

enum srpModel_t

Values:

enumerator SRP_CANNONBALL_MODEL
enumerator SRP_FACETED_CPU_MODEL
class RadiationPressure : public SysModel, public DynamicEffector
#include <radiationPressure.h>

solar radiation pressure dynamic effector

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

Reset the module to origina configuration values.

Returns:

void

void UpdateState(uint64_t CurrentSimNanos)

Update model state by reading in new message data

Parameters:

CurrentSimNanos – current simulation time in nanoseconds

Returns:

void

void linkInStates(DynParamManager &statesIn)

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

Parameters:

states – Dynamic parameter manager

Returns:

void

void readInputMessages()

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

Returns:

void

void computeForceTorque(double integTime, double timeStep)

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.

Parameters:
  • integTime – Current simulation integration time

  • timeStep – Current integration time step used

Returns:

void

void setUseCannonballModel()

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

Returns:

void

void setUseFacetedCPUModel()

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

Returns:

void

void addForceLookupBEntry(Eigen::Vector3d vec)

Add force vector in the body frame to lookup table.

Parameters:

vec – (N) Force vector for particular attitude in lookup table

Returns:

void

void addTorqueLookupBEntry(Eigen::Vector3d vec)

Add torque vector to lookup table.

Parameters:

vec – (Nm) Torque vector for particular attitude in lookup table

Returns:

void

void addSHatLookupBEntry(Eigen::Vector3d vec)

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

Parameters:

vec – sun unit direction vector in body frame

Returns:

void

Public Members

double area

m^2 Body surface area

double coefficientReflection

&#8212; Factor grouping surface optical properties

ReadFunctor<SpicePlanetStateMsgPayload> sunEphmInMsg

&#8212; sun state input message

ReadFunctor<EclipseMsgPayload> sunEclipseInMsg

&#8212; (optional) sun eclipse input message

std::vector<Eigen::Vector3d> lookupForce_B

&#8212; Force on S/C at 1 AU from sun

std::vector<Eigen::Vector3d> lookupTorque_B

&#8212; Torque on S/C

std::vector<Eigen::Vector3d> lookupSHat_B

&#8212; S/C to sun unit vector defined in the body frame.

BSKLogger bskLogger

&#8212; 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

Parameters:

s_N – (m) Position vector to the Sun relative to the inertial frame

Returns:

void

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.

Parameters:

s_B – (m) Position vector of the Sun relative to the body frame

Returns:

void

Private Members

srpModel_t srpModel

&#8212; specifies which SRP model to use

SpicePlanetStateMsgPayload sunEphmInBuffer

&#8212; Buffer for incoming ephemeris message data

bool stateRead

&#8212; Indicates a succesful read of incoming SC state message data

EclipseMsgPayload sunVisibilityFactor

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

StateData *hubR_N

&#8212; State data accesss to inertial position for the hub

StateData *hubSigma

&#8212; Hub/Inertial attitude represented by MRP