HW4_solution

HW4_solution - % Small script to solve HW3, Pb3 % = % Some...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 4
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 6
% Small script to solve HW3, Pb3 % ============================== % Some conversion factors d2r = pi/180.0; % degrees to radians r2d = 180.0/pi; % radians to degree m2d = 1.0/60.0; % minutes to degree % Some constants (units of km, kg, s) Re = 6372; W = pi/(12*60*60); h = 0.003; lat = (35+28.0*m2d)*d2r; lon = (-80+32*m2d)*d2r; % Initial conditions % ------------------ m0 = 60000.0; % Inertial space: X = [position, velocity, mass]; Pos0 = (Re+h)*[ cos(lon)*cos(lat); sin(lon)*cos(lat); sin(lat) ]; Vel0 = W*[ -Pos0(2); Pos0(1); 0.0 ]; X0 = [Pos0; Vel0; m0]; % Local frame: x = [position, velocity, mass]; pos0 = [ 0.0; 0.0; 0.0]; vel0 = [ 0.0; 0.0; 0.0]; x0 = [pos0; vel0; m0]; % Time span m_fuel = 50000.0; dmdt = -300.0; Tspan = [0.0; -m_fuel/dmdt]; % Trajectory integration % ---------------------- [T,X] = ode45(@Pb3_Finertial, Tspan, X0); [t,x] = ode45(@Pb3_Flocal, Tspan, x0); % Altitude and flight path angle % ------------------------------ % in the inertial frame [Ni,Mi] = size(X); alt_i = zeros(Ni,1); fpa_i = zeros(Ni,1);
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/10/2009 for the course MAE 146 taught by Professor Villac during the Spring '08 term at UC Irvine.

Page1 / 14

HW4_solution - % Small script to solve HW3, Pb3 % = % Some...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online