|
Spacecraft Models Package 2.0
Spacecraft Models for DSim
|
Rigid body with multiple reaction wheels. More...
#include <rigid_body_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... | |
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. | |
| double | get_adj_mass () |
| Add up the mass of any children that have a mass variable. More... | |
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().
| void rigid_body_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, bodyRate_dsim, get_adj_mass(), position_dsim, quaternion_dsim, rWARate_dsim, totalMass_dsim, and velocity_dsim.
| dsim_value rigid_body_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:
|
protected |
Add up the mass of any children that have a mass variable.
Store the new mass and reset the changed mass flag.