Module: msmForceTorque

Executive Summary

This module uses the Multi-Sphere-Method (MSM) to evaluate the mutual electrostatic force and torque interactions between a series of spacecraft object. The charging is specified through a voltage where the object is assumed to have a constant voltage across the surface. The MSM model for each space object is given through a list of body-fixed sphere locations and sphere radii. See Multi-Sphere Method for Modeling Electrostatic Forces and Torques for more information on the MSM method. The goal of this module is to simulate charged astrodynamics and include the influence of charging on relative motion.

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.

../../../../_images/moduleMsmForceTorque.svg

Figure 1: msmForceTorque() Module I/O Illustration

Module I/O Messages

Msg Variable Name

Msg Type

Description

scStateInMsgs

SCStatesMsgPayload

vector of spacecraft state input messages

voltInMsgs

VoltMsgPayload

vector of voltage input messages

eTorqueOutMsgs

CmdTorqueBodyMsgPayload

vector of E-torques in body frame components

eForceOutMsgs

CmdForceInertialMsgPayload

vector of E-forces in inertial frame components

chargeMsmOutMsgs

ChargeMsmMsgPayload

vector of MSM charge messages

Module Assumptions and Limitations

This module assumes the electrostatic torques and forces are constant during the integration step.

User Guide

The electrostatic force and torque module is created using:

1module = msmForceTorque.MsmForceTorque()
2module.ModelTag = "msmForceTorqueTag"
3unitTestSim.AddModelToTask(unitTaskName, module)

To add a spacecraft, along with the associated list of MSM sphere body-fixed locations and radii, use:

module.addSpacecraftToModel(scStateMsg,
                            , messaging.DoubleVector(radii_List)
                            , unitTestSupport.npList2EigenXdVector(r_SB_B_List)
                            )

where radii_list is a list of sphere radii, and r_SB_B_List is a list of body-fixed MSM sphere locations. This command creates the corresponding output messages in the message vectors eTorqueOutMsgs and eForceOutMsgs. Thus, the e-force of the first space object is accessed through module.eForceOutMsgs[0], etc.

The addSpacecraftToModel also creates a corresponding voltage input message in module.voltInMsgs[i] where i is the number in which the spacecraft object was added.

Note

If MSM spheres of one spacecraft become too close to spheres of another spacecraft (i.e. center-to-center distance less than the sphere radius), then a warning statement is provided. In such situations the MSM accuracy is beginning to break down.


class MsmForceTorque : public SysModel
#include <msmForceTorque.h>

This module uses the Multi-Sphere-Method (MSM) to evaluate the mutual electrostatic force and torque interactions between a series of spacecraft object. The charging is specified through a voltage where the object is assumed to have aconstant voltaged across the surface. The MSM model for each space object is given through a list of body-fixed sphere locations and sphere radii. See Multi-Sphere Method for Modeling Electrostatic Forces and Torques < >__ for more information on the MSM method.

Public Functions

MsmForceTorque()

This is the constructor for the module class. It sets default variable values and initializes the various parts of the model

~MsmForceTorque()

Module Destructor

void Reset(uint64_t CurrentSimNanos)

This method is used to reset the module and checks that required input messages are connect.

Returns

void

void UpdateState(uint64_t CurrentSimNanos)

This is the main method that gets called every time the module is updated. Provide an appropriate description.

Returns

void

void addSpacecraftToModel(Message<SCStatesMsgPayload> *tmpScMsg, std::vector<double> radii, std::vector<Eigen::Vector3d> r_SB_B)

Subscribe to the spacecraft state message and store the corresponding MSM radii and sphere positions

Public Members

std::vector<ReadFunctor<SCStatesMsgPayload>> scStateInMsgs

vector of spacecraft state input messages

std::vector<ReadFunctor<VoltMsgPayload>> voltInMsgs

vector of voltage input messages

std::vector<Message<CmdTorqueBodyMsgPayload>*> eTorqueOutMsgs

vector of E-torques in body frame components

std::vector<Message<CmdForceInertialMsgPayload>*> eForceOutMsgs

vector of E-forces in inertial frame components

std::vector<Message<ChargeMsmMsgPayload>*> chargeMsmOutMsgs

vector of spacecraft MSM charge values

BSKLogger bskLogger

&#8212; BSK Logging

Private Functions

void readMessages()

Read in the input messages

Private Members

std::vector<std::vector<double>> radiiList

vector of MSM sphere radii

std::vector<std::vector<Eigen::Vector3d>> r_SB_BList

vector of body-fixed MSM sphere locations

unsigned int numSat

number of satellites

unsigned int numSpheres

numer of spheres being modeled

std::vector<double> volt

[V] input voltage for each spacecrat object

std::vector<Eigen::Vector3d> r_BN_NList

[m] list of inertial satellite position vectors

std::vector<Eigen::MRPd> sigma_BNList

[m] list of satellite MRP orientations