Spacecraft Control Framework 1.0
Spacecraft Control Library
sc_multi_body_central_hub_with_rwa.h
Go to the documentation of this file.
1
3
4#ifndef __MULTI_BODY_CENTRAL_HUB_WITH_RWA__
5#define __MULTI_BODY_CENTRAL_HUB_WITH_RWA__
6
7#ifdef AS_OS_WINDOWS
8 #include "matrixlib.h"
9#else
10 #include <MatrixLib/MatrixLib.h>
11#endif
12
21{
22
23 private:
25 ml_matrix inr_core;
27 ml_matrix inr_app;
29 ml_matrix inr_0;
31 double inr_rwa;
33 ml_matrix mass_app;
35 double mass_0;
37 double mass_total;
39 ml_matrix lambda;
41 ml_matrix u_app;
43 ml_matrix u_rwa;
45 ml_matrix rho;
47 ml_matrix x;
49 ml_matrix x_dot;
51 int n;
53 ml_matrix h;
55 ml_matrix torque_0;
57 ml_matrix torque_rwa;
59 ml_matrix torque_hinge;
61 int momentum_only;
62
63 public:
64
68 void add_central_body( const ml_matrix& inr, double m );
70 void add_reaction_wheels( double inr, const ml_matrix& u );
72 void add_appendage( const ml_matrix& inr, double m, const ml_matrix& lambda, const ml_matrix& rho, const ml_matrix& u );
74 void initialize_state( const ml_matrix& x );
76 ml_matrix state_derivative( const ml_matrix& x);
78 ml_matrix get_inertial_angular_momentum( void ){return h;};
80 ml_matrix get_inertia( void ){return inr_core;};
82 double get_mass( void ){return mass_total;};
84 int get_number_of_bodies( void ){return n;};
86 void set_core_torque( const ml_matrix& torque ){torque_0 = torque;};
88 void set_rwa_torque( const ml_matrix& torque ){torque_rwa = torque;};
90 void set_hinge_torque( const ml_matrix& torque ){torque_hinge = torque;};
92 void set_compute_momentum_only( void ){momentum_only = 1;};
94 void set_compute_rhs( void ){momentum_only = 0;};
95};
96
97
98#endif
A multi-body spacecraft model with a central hub and reaction wheels.
Definition: sc_multi_body_central_hub_with_rwa.h:21
void set_core_torque(const ml_matrix &torque)
Core torque.
Definition: sc_multi_body_central_hub_with_rwa.h:86
void add_reaction_wheels(double inr, const ml_matrix &u)
Initialize the reaction wheels.
Definition: sc_multi_body_central_hub_with_rwa.cc:52
void set_compute_rhs(void)
Momentum only.
Definition: sc_multi_body_central_hub_with_rwa.h:94
void set_rwa_torque(const ml_matrix &torque)
RWA torque.
Definition: sc_multi_body_central_hub_with_rwa.h:88
void initialize_state(const ml_matrix &x)
Initialize state matrix.
Definition: sc_multi_body_central_hub_with_rwa.cc:59
ml_matrix get_inertial_angular_momentum(void)
Angular momentum.
Definition: sc_multi_body_central_hub_with_rwa.h:78
ml_matrix state_derivative(const ml_matrix &x)
Update the state.
Definition: sc_multi_body_central_hub_with_rwa.cc:66
void set_hinge_torque(const ml_matrix &torque)
Core torque.
Definition: sc_multi_body_central_hub_with_rwa.h:90
void add_central_body(const ml_matrix &inr, double m)
Initialize all state matrices.
Definition: sc_multi_body_central_hub_with_rwa.cc:17
void add_appendage(const ml_matrix &inr, double m, const ml_matrix &lambda, const ml_matrix &rho, const ml_matrix &u)
Initialize all state matrices.
Definition: sc_multi_body_central_hub_with_rwa.cc:27
int get_number_of_bodies(void)
Number of bodies.
Definition: sc_multi_body_central_hub_with_rwa.h:84
ml_matrix get_inertia(void)
Total inertia.
Definition: sc_multi_body_central_hub_with_rwa.h:80
void set_compute_momentum_only(void)
Momentum only.
Definition: sc_multi_body_central_hub_with_rwa.h:92
double get_mass(void)
Total mass.
Definition: sc_multi_body_central_hub_with_rwa.h:82
multi_body_central_hub_with_rwa(void)
Constructor.
Definition: sc_multi_body_central_hub_with_rwa.cc:10