Slew attitude into and out of maneuvers

« Go Back

Information

 
Requirements and Setup
Instructions
User-added image

Have a scenario open with a maneuvering satellite.
Configure the inputs in the Matlab script and then click Run.
 
%% Inputs
% Which Satellite
satelliteName = 'Satellite1';

% Alignment and Constrained Definition
bodyAligned = [0,0,1]; % [x,y,z] components for the body aligned vector
bodyConstrainedDir = [1,0,0]; % [x,y,z] components for the body constrained vector

% Where to point when thrusting
onScheduleAlignedVector = ['Satellite/',satelliteName,' TotalThrust'];
onScheduleConstrainedVector = ['CentralBody/Earth EclipticNormal'];

% Where to point when not thrusting
offScheduleAlignedVector  = ['Satellite/',satelliteName,' Nadir(Detic)'];
offScheduleConstrainedVector = ['Satellite/',satelliteName,' Sun'];

% Other options
slewDuration = 10; % [s]
thrustingThreshold = 1e-6; % [N] Minimum thrust threshold. (Don't enter 0 or else numerical issues may cause problems)
runMCS = true; % Run the MCS? Sometimes needed to clear any attitude stored from previous maneuvers.

%% Code
...

 
Download File