Path: SCPro/DynamicalModels
% Computes the right hand side for a spacecraft with reaction wheels. Uses RHSReactionWheel for the spacecraft attitude dynamic. Allows for only 3 reaction wheels. Assumes a point mass gravity model. Includes gyros. -------------------------------------------------------------------------- Form: d = RHSReactionWheelWithOrbit; % To get the data structure [xDot,hECI] = RHSReactionWheelWithOrbit x, t, d ) -------------------------------------------------------------------------- ------ Inputs ------ x (22,1) State vector [r;v;q;omega;omegaRWA;imuAng;imuBias] t (1,1) Time (unused) d (.) Data structure .inr (3,3) Body inertia matrix .m (1,1) Spacecraft mass .mu (1,1) Gravitational constant .force (3,1) External force in the ECI frame (kN) .torque (3,1) External torque in the body frame .inrRWA (n,1) Polar inertia of each wheel .torqueRWA (n,1) Torques on each wheel .uRWA (3,n) Unit vectors for the RWA .friction (.) Friction data structure ------- Outputs ------- xDot (22,1) State vector derivative d[r;v;q;omega;omegaRWA]/dt hECI (3,1) Inertial angular momentum --------------------------------------------------------------------------
SCPro: DynamicalModels/RHSReactionWheel Math: Linear/Mag
Back to the SCPro Module page