AerospacePackage 1.0
|
Rigid body dynamical model applying both force and torque to the spacecraft. More...
#include <rigid_body_staging.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 | complete_timestep () |
Computation done after numerical integration. | |
void | rhs (double t, double jd) |
Computation done during numerical integration. More... | |
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 Member Functions | |
double | get_adj_mass () |
Check for changed mass of children and recompute new adjusted mass. More... | |
ml_matrix | get_adj_center_of_mass () |
Check for changed mass of children and recompute new adjusted center of mass. | |
ml_matrix | get_adj_inertia () |
Check for changed mass of children and recompute new adjusted inertia. More... | |
double | get_adj_mass_derivative () |
Check for changed mass of children and recompute new adjusted mass derivative. More... | |
ml_matrix | get_adj_center_of_mass_derivative () |
Check for changed mass of children and recompute new adjusted center of mass derivative. More... | |
ml_matrix | get_adj_inertia_derivative () |
Check for changed mass of children and recompute new adjusted inertia derivative. More... | |
Rigid body dynamical model applying both force and torque to the spacecraft.
Integrates the position, velocity, quaternion, and body rates. Allows the mass of the spacecraft to change. Children can use the apply_torque, apply_force, or mass_changed messages. Ignores any effect of or changes in center of mass. Does not add up or compute changes in inertia. Assumes all torques are about the center of mass.
void rigid_body_staging::rhs | ( | double | t, |
double | jd | ||
) |
Computation done during numerical integration.
Quaternion kinematics and orbit derivative.
Uses qi_to_b_dot from the SCControl framework.
dsim_value rigid_body_staging::handle_message | ( | const std::string & | sender_path, |
const std::string & | message_name, | ||
const dsim_value & | argument | ||
) |
Handle force and torque messages.
Handle the apply_force and apply_torque messages.
The units should be N and Nm. Force should be in the ECI frame and torque should be in the body frame.
|
protected |
Check for changed mass of children and recompute new adjusted mass.
Add up the mass of any children that have a mass variable.
Store the new mass and reset the changed mass flag.
|
protected |
Check for changed mass of children and recompute new adjusted inertia.
If the child has an inertia matrix, rotate and translate and add to parent inertia If the child has a mass value, but not inertia, treat as a point mass and add to parent inertia if a center_mass value is available.
|
protected |
Check for changed mass of children and recompute new adjusted mass derivative.
Add up the mass of this object and any children that have a mass variable.
|
protected |
Check for changed mass of children and recompute new adjusted center of mass derivative.
Determine the center of mass derivaitve of this object and any children that have a mass variable.
|
protected |
Check for changed mass of children and recompute new adjusted inertia derivative.
Determine the time derivative of the inertia matrix.