User S Guide to Running the Trajectory Code Using AAE450 Trajectory Run.M(And AAE450 Trajectory

User S Guide to Running the Trajectory Code Using AAE450 Trajectory Run.M(And AAE450 Trajectory

User’s Guide to Running the Trajectory Code Using AAE450_Trajectory_run.m(and AAE450_Trajectory_run_distribute.m) Input/Output modules.

Revision 1.4

Written by Elizabeth Harkness

18 February 2008

Description:

The function AAE450_Trajectory_run.m is used to interface between the output of the structures and propulsion codes and the input of the trajectory code.

The function AAE450_Trajectory_run_distribute.m is used to interface between the output of the structures and propulsion codes and the input of the trajectory code which uses AAE450_Trajectory_D2MP.mor AAE450_Trajectory_D2MP_ac.mto optimise steering angles (for ground/balloon or aircraft respectively).

This document describes how AAE450_Trajectory_run.mand AAE450_Trajectory_run_distribute.m function, the required inputs and the expected outputs.

Input Section:

To get the inputs from the propulsion/structures code, the main_loop.m(MAT) code needs to be run with the following call line:

[ID,Trajectory_Input]= main_loop

Propulsion/Structures Inputs:

To make the input file for the AAE450_Trajectory_Main.m code, AAE450_Trajectory_run.m and AAE450_Trajectory_run_distribute.m need to be called with the call line:

>AAE450_Trajectory_run(ID,Trajectory_Input)

or

>AAE450_Trajectory_run_distribute(ID,Trajectory_Input)

All of the variables that are passed into the function from the propulsion/structures codes are described below:

Variable Name / Description
ID / Run Identifier. This is the code for each case being run.
E.g. ‘XX-XX-XX’
type / If the case is running an air launch or ground launch.
E.g. Ground: 1, Balloon: 2, Aircraft: 3.
N / Number of stages. E.g 1, 2, 3
payload_mass / Mass of Payload [kg] E.g. 0.2, 1, 5
m1 / Mass of the 1st Stage [kg]
m2 / Mass of the 2nd Stage [kg]
m3 / Mass of the 3rd Stage [kg]
T1 / Average Thrust of first stage. [N]
T2 / Average Thrust of second stage. [N]
T3 / Average Thrust of third stage. [N]
t_vertical / Time of vertical flight [s]
t_burn_1 / First stage burn time. [s]
t_burn_2 / Second stage burn time. [s]
t_burn_3 / Third stage burn time. [s]
m_dot_1 / Mass flow rate of 1st Stage. [kg/s]
m_dot_2 / Mass flow rate of 2nd Stage. [kg/s]
m_dot_3 / Mass flow rate of 3rd Stage. [kg/s]
diam_1 / Diameter of first stage. [m]
diam_2 / Diameter of second stage. [m]
diam_3 / Diameter of third stage. [m]
diam_4 / Diameter of fourth (payload) stage. [m]
Pe_1 / Exit pressure of 1st stage engine. [Pa]
Pe_2 / Exit pressure of 2nd stage engine. [Pa]
Pe_3 / Exit pressure of 3rd stage engine. [Pa]
Ae_1 / Exit area of 1st stage engine. [m^2]
Ae_2 / Exit area of 2nd stage engine. [m^2]
Ae_3 / Exit area of 3rd stage engine. [m^2]

User Inputs:

AAE450_Trajectory_run.m

For Ground and Balloon Launch

After the propulsion/structures data has been loaded, the function will then prompt the user to input the steering angles:

Variable Name / Description
psi1_0 / Angle at the end of 1st stage vertical [deg]
psi1_1 / Starting angle for end of first stage variation [deg]
psi1_2 / Final angle for end of first stage variation [deg]
psi_increment / Number of increments between psi1_1 and psi1_2
psi2 / Angle at the end of 2nd stage [deg]
psi3 / Angle at the end of 3rd stage [deg]

Note: To only run one steering angle, make psi1_1 equal to psi1_2 and set psi_increment to one. E.g. psi1_1 = 10, psi1_2 = 10, psi_increment = 1.

For Aircraft Launch

After the propulsion/structures data has been loaded, the function will then prompt the user to input the steering angles:

Variable Name / Description
angle_tclimb / Steering angle at the end of climb [deg]
tb2sec1_percent_tb2 / Percent of first steering law for stage two [s]
psi2 / Angle at the end of 2nd stage [deg]
psi3 / Angle at the end of 3rd stage [deg]

AAE450_Trajectory_run_distribute.m

For All Launch Types

There are no user inputs for AAE450_Trajectory_run_distribute.m, the steering angles are all varied by the programme AAE450_Trajectory_D2MP.m(or AAE450_Trajectory_D2MP_ac.m for an aircraft launch).
Internal Inputs:

The following inputs are defined internally in AAE450_Trajectory_run.mand AAE450_Trajectory_run_distribute.m. These are values that should not need to be altered by the casual user (if ever). They include all initial conditions (these are set to vary with the type of launch), as well as some placeholder variables (labelled 4) for the orbit propagation stage.

h_i / Initial altitude [m]
psi1_0 / ***Initial launch angle [deg]
r_dot_i_1 / Initial radial velocity [m/s]
theta_dot_i_1 / Initial tangential velocity [rad/s]
launch_lat / Launch latitude [deg]
launch_long / Launch longitude [deg]
phi_dot_i_1 / Initial phi velocity [rad/sec]
b_1 / Coefficient of angle at the end of 1st vertical stage.
R_Earth / Radius of the Earth [m]
t_vertical / Time of vertical flight to clear launch tower. [sec]

*** Note: For AAE450_Trajectory_run_distribute.m only.

The values for these variables are shown below:

%% User non-variable inputs.

R_Earth = 6376*1000;

launch_lat = 28; %[deg]

launch_long = -80;

t_vertical = 10; %[sec]

(psi1_0 = 88;)

......

% Set initial conditions for different launches

if type == 1 % Ground

h_i = 0;

r_i_1=R_Earth+h_i; % [m]

r_dot_i_1 = 0; % [m/sec]

theta_i_1=launch_long*pi/180; % [rad]

theta_dot_i_1 = 0; % [rad]

phi_i_1=(90-launch_lat)*pi/180; % [rad]

phi_dot_i_1=0; % [rad/s]

b_1=tan(psi1_0*pi/180);

end

if type == 2 % Balloon

h_i = 30000;

r_i_1=R_Earth+h_i; % [m]

r_dot_i_1 = 0; % [m/sec]

theta_i_1=launch_long*pi/180; % [rad]

theta_dot_i_1 = 0; % [rad]

phi_i_1=(90-launch_lat)*pi/180; % [rad]

phi_dot_i_1=0; % [rad/s]

b_1=tan(psi1_0*pi/180);

end

if type == 3 % Airplane

h_i = 15000; % Launch Altitude (from MSL) [m] {Pegasus deployment Altitude}

r_i_1=R_Earth+h_i;

r_dot_i_1 = 0; % [m/sec]

theta_i_1=launch_long*pi/180;

theta_dot_i_1=59.72/r_i_1; % [rad/s]

phi_i_1=(90-launch_lat)*pi/180;

phi_dot_i_1=0;

b_1=tan(angle_tclimb*pi/180);

end

% Coasting Orbit Propagation Parameters

m4=0;

T4 = 0; % Zero thrust for coasting.

t_burn_4=9*60^2; % [s] for orbit trajectory

m_dot_4=0; % Mass flow rate of coasting Stage [kg/s]

Pe_4=0; % Exit pressure, 4th stage engine [Pa]

Ae_4=0; % Exit area, 4th stage engine [m^2]

diam_4=0;

......

if N==2

t_burn_3=0;

m_dot_3=0;

T3 = 0;

end

Output Section:

The functions will then create an input file called AAE450_Trajectory_Inputs.m this is the input file that AAE450_Trajectory_Main.mwill use. After the input file has been written, the main trajectory code needs to be run. The call line for that is simply:

AAE450_Trajectory_Main

for AAE450_Trajectory_run.m and

AAE450_run_traj_distribute

for AAE450_Trajectory_run_distribute.m. Or, for an aircraft launch,

>AAE450_run_traj_distribute_ac

Note: Before running AAE450_Trajectory_Main.m, make sure that the script AAE450_Get_Inputs.m has the script AAE450_Trajectory_Inputs as the only uncommented line. Otherwise, AAE450_Trajectory_Main.m will not load the correct inputs.

Once AAE450_Trajectory_Main.mhas been run, an output file will be written. This output file is a copy of what has been printed to the MATLAB Command Window and is named with the Case ID number that was assigned to it. (E.g. MG-CA-DS-DC)

Sample Output:

(This is a sample in form only. The numbers do not reflect a feasible orbit.)

***************************************

Output from AAE450_Trajectory_outputs.m

***************************************

Case ID: MA-CA-DA.txt

Orbital Parameters

Period: 4684.7680 [s]

Semi-major axis: 6051.34 [km]

eccentricity: 0.9906

periapsis: -6319.41 [km](from the surface of the Earth)

apoapsis: 5670.08 [km](from the surface of the Earth)

Flight Path Angle = -89.6 [deg].

at t=0[s]:

Altitude: h=15000 [m] (Initial Condition)

Radial(Vertical) Speed: Vr=0 [m/s] (Initial Condition)

Payload Mass= 1 [kg]

GLOW= 2524.9902 [kg]

Thrust

1st stage: 5.807 [kN]

2nd stage: 0.247 [kN]

3rd stage: 0.000 [kN]

Max Acceleration

Max a= 294.15 [m/s^2]

Max a= 30.00 G

Burn Times

1st Stage: 1241[s]

(first 10.00 [s] is vertical flight)

2nd Stage: 1051.81[s]

3rd Stage: 0.00[s]

Times at the end of each stage

End of first stage: 54.00[s]

End of second stage: 54.00[s]

End of third stage: 54.00[s]

Constant Mass Flow Rates

1st Stage: 1.558[kg/s]

2nd Stage: 0.084[kg/s]

3rd Stage: 0.000[kg/s]

Constant Exit Pressures

1st Stage: 56.05[kPa]

2nd Stage: 2.20[kPa]

3rd Stage: 0.00[kPa]

Altitudes

at the end of the vertical part of flight: 15000.02[m]

at t= 4702 [s] : 30.89[km]

at the end of the first stage: 0.09[km]

at the end of the second stage: 0.09[km]

at the end of the third stage: 0.09[km]

from AAE450_Delta_V.m

Delta_V_Leo= 7671 [m/s]

Delta_V_Grav= 522 [m/s]

DeltaV_drag= 7353 [m/s]

Delta_V_Earth_assist= 410 [m/s]

Delta_V_Total= 15136 [m/s]

Delta V required to circularize: 10974 [m/s]

************************************************************

Note: it takes approximately 20[s] to produce all the plots.

Please wait until you get the three figures of 3-D plots.

There are six plots that are output:

Figure 1: Distance from the ground versus time

Figure 3: Radial speed versus time

Figure 5: Tangential speed versus time

Figure 6: Three views of the 3D orbit and trajectory

Figure 7: One view of the orbit (with wireframe Earth)

Figure 8: One view of the orbit (with solid sphere Earth)

1