Spacecraft Models Package 2.0
Spacecraft Models for DSim
Public Member Functions | List of all members
multi_body_hub Class Reference

Rigid body with multiple reaction wheels. More...

#include <multi_body_central_hub.h>

Inherits dsim_model.

Public Member Functions

void initialize_data ()
 Initialize outlets and output variables.
 
void initialization_complete ()
 Finish initialization.
 
void initialize_timestep ()
 Computation done prior to numerical integration.
 
void rhs (double t, double jd)
 Computation done during numerical integration. More...
 
void complete_timestep ()
 Computation done after numerical integration.
 
dsim_value handle_message (const std::string &sender_path, const std::string &message_name, const dsim_value &argument)
 Handle force and torque messages. More...
 

Protected Attributes

Integrated States
dsim_variable position_dsim
 object position
 
dsim_variable velocity_dsim
 object velocity
 
dsim_variable quaternion_dsim
 attitude quaternion ([scalar;x;y;z])
 
dsim_variable bodyRate_dsim
 body rotational rates (rad/s)
 
Parameters
dsim_variable spacecraft_name_dsim
 Spacecraft name.
 
dsim_variable spacecraft_type_dsim
 Spacecraft type.
 
dsim_variable inertiaAppendage_dsim
 Spacecraft type.
 
dsim_variable rhoAppendage_dsim
 Appendage vector from the gimbal to the appendage center of mass.
 
dsim_variable lambdaAppendage_dsim
 Appendage gimbal offset from the reference.
 
dsim_variable unitVectorAppendage_dsim
 Appendage unit vector.
 
dsim_variable massAppendage_dsim
 Appendage mass.
 
dsim_variable mass_dsim
 dry mass (kg)
 
dsim_variable centerOfMass_dsim
 object center of mass
 
dsim_variable inertia_dsim
 rigid body inertia
 
dsim_variable frame_dsim
 frame for initial conditions
 
dsim_variable numberRWA_dsim
 Number of reaction wheels.
 
dsim_variable indexRWA_dsim
 Index for the reaction wheels.
 
dsim_variable indexGimbal_dsim
 Indices for the gimbals.
 
dsim_variable state_dsim
 Rotation dynamics and kinematics state.
 
dsim_variable angle_appendage_dsim
 Rotation dynamics and kinematics state.
 
dsim_variable rate_appendage_dsim
 Rotation dynamics and kinematics state.
 
dsim_variable rWARate_dsim
 Rotation dynamics and kinematics state.
 

Outputs

dsim_variable totalMass_dsim
 total mass, including mass of children
 
dsim_variable ang_momentum_dsim
 Angular momentum.
 
dsim_variable acceleration_dsim
 object linear acceleration in body frame
 
dsim_variable angular_acceleration_dsim
 Angular acceleration.
 

Detailed Description

Rigid body with multiple reaction wheels.

Models a spacecraft with a set of identical reaction wheels. The default wheel set is orthogonal + skew (4 wheels). The torque must be provide by a child model. The model accepts apply_force, apply_torque, and apply_rwa_torque messages during rhs().

Member Function Documentation

◆ rhs()

void multi_body_hub::rhs ( double  t,
double  jd 
)

Computation done during numerical integration.

Quaternion kinematics and orbit derivative with wheels dynamics.

Uses qi_to_b_dot from the SCControl framework. Overwrites rigid_body's rhs without calling it.

References acceleration_dsim, angular_acceleration_dsim, position_dsim, state_dsim, totalMass_dsim, and velocity_dsim.

◆ handle_message()

dsim_value multi_body_hub::handle_message ( const std::string &  sender_path,
const std::string &  message_name,
const dsim_value &  argument 
)

Handle force and torque messages.

Handles these message:

  • "apply_force"
  • "apply_torque"
  • "apply_rwa_torque"

The documentation for this class was generated from the following files: