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

Rigid body with multiple reaction wheels. More...

#include <multi_body_central_hub_with_rwa.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)
 
dsim_variable state_dsim
 Rotation dynamics and kinematics state.
 
dsim_variable angle_appendage_dsim
 Appendage angles.
 
dsim_variable omega_appendage_dsim
 Appendage rates.
 
dsim_variable rWARate_dsim
 Reaction wheel angular rate.
 
Parameters
dsim_variable spacecraft_name_dsim
 Spacecraft name.
 
dsim_variable spacecraft_type_dsim
 Spacecraft type.
 
dsim_variable inertia_appendage_dsim
 Spacecraft type.
 
dsim_variable rho_appendage_dsim
 Appendage vector from the gimbal to the appendage center of mass.
 
dsim_variable lambda_appendage_dsim
 Appendage gimbal offset from the reference point.
 
dsim_variable u_appendage_dsim
 Appendage unit vector.
 
dsim_variable mass_appendage_dsim
 Appendage mass.
 
dsim_variable mass_core_dsim
 Core mass including reaction wheels (kg)
 
dsim_variable center_of_mass_dsim
 object center of mass
 
dsim_variable inertia_dsim
 rigid body inertia
 
dsim_variable frame_dsim
 frame for initial conditions
 
dsim_variable inertia_rwa_dsim
 RWA polar inertia.
 
dsim_variable u_rwa_dsim
 RWA unit vectors.
 

Outputs

dsim_variable mass_total_dsim
 total mass, including mass of children
 
dsim_variable angular_momentum_dsim
 Angular momentum.
 
dsim_variable acceleration_dsim
 object linear acceleration in body frame
 
dsim_variable angular_acceleration_dsim
 Angular acceleration.
 
dsim_variable angle_appendage_scaled_dsim
 Angled scaled to between 0 and 1.
 

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_with_rwa::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, and velocity_dsim.

◆ handle_message()

dsim_value multi_body_hub_with_rwa::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_hinge_torque"
  • "apply_rwa_torque"

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