Module: simpleMassProps
Executive Summary
This module simulates a spacecraft mass sensor. It receives the mass properties from a spacecraft object using a simulation
type message, and converts it into a FSW
type message to be used in flight software modules.
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.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
scMassPropsInMsg |
Spacecraft mass properties input message. It contains the mass, inertia and center of mass of the spacecraft in a |
|
vehicleConfigOutMsg |
Vehicle configuration output message. It contains the mass, inertia and center of mass of the spacecraft in a |
Detailed Module Description
The module copies the contents from a SCMassPropsMsgPayload to a VehicleConfigMsgPayload message.
Model Assumptions and Limitations
This code makes the following assumptions:
Sensor is perfect: The sensor measures the exact spacecraft mass properties without noise or any other interference.
User Guide
This section contains conceptual overviews of the code and clear examples for the prospective user.
Module Setup
The module is created in python using:
1scMassPropsModule = simpleMassProps.SimpleMassProps()
2scMassPropsModule.ModelTag = "scMassPropsModule"
-
class SimpleMassProps : public SysModel
- #include <simpleMassProps.h>
FSW mass properties converter module class.
Public Functions
-
SimpleMassProps()
This is the constructor for the module class.
-
~SimpleMassProps()
Module Destructor.
-
void Reset(uint64_t CurrentSimNanos)
This method is used to reset the module.
- Returns:
void
-
void readInputMessages()
This method reads the spacecraft mass properties state input message
-
void writeOutputMessages(uint64_t CurrentClock)
This method writes the vehicle configuration output message.
- Parameters:
CurrentClock – The clock time associated with the model call
- Returns:
void
-
void computeMassProperties()
This method transfers the spacecraft mass propertiies information to a FSW format
-
void UpdateState(uint64_t CurrentSimNanos)
This is the main method that gets called every time the module is updated. It reads the simulation message, transfers its contents and writes to an output FSW message.
- Returns:
void
Public Members
-
ReadFunctor<SCMassPropsMsgPayload> scMassPropsInMsg
sc mass properties input msg
-
Message<VehicleConfigMsgPayload> vehicleConfigOutMsg
vehicle configuration output msg
-
BSKLogger bskLogger
— BSK Logging
Private Members
-
SCMassPropsMsgPayload scMassPropsMsgBuffer
-
VehicleConfigMsgPayload vehicleConfigMsgBuffer
buffer for the mass properties message
-
SimpleMassProps()