Transcript ENGR-25_Prob_2_41_AirCraft_Separation
Engineering 25
Prob 2.41
AirCraft
Separation
Bruce Mayer, PE Licensed Electrical & Mechanical Engineer [email protected]
Engineering-25: Computational Methods
1 Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
P2.41 MidAir Collision(?)
The position and velocity of two AirCraft, A & B, are shown as below
y y B v y D v x x A
AirCraft Position at 1pm
Engineering-25: Computational Methods
2 Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
x
P2.41 Close Miss
Goals for P2.41
a) Plot D vs. t until D reaches the MINIMUM VALUE b) Use the roots command to find t such D first = 30 mi
y y B v y D v x
3
x A
Engineering-25: Computational Methods
Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
x
P2.41 GamePlan
This is a PARAMETRIC Problem
TIME is the INDEPENDENT variable
• For each moment in time, x A and y B • Thus for every value of t we can calc x A and y B • Then us Pythagorus to find D min • Finally, use the roots the command to solve the Pythagorean Quadratic Eqn
Engineering-25: Computational Methods
4 Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
Time Difference
At Start 800 mi @ 320mph A ½-Hour Later
5
800 mi @ 320mph Engineering-25: Computational Methods
Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
6
MATLAB CODE
(May have BOBBY TRAPS) % Bruce Mayer, PE % ENGR25 * 04ep10 % AirCraft NearMiss * AirCraft_NearMiss_Prob2_41_1109.m
% % % Find tmax using given speeds & distances tmax = max(320/800, 160/410) % % divide guessed tmax in t0 500 pieces t = linspace(0, tmax, 500); % % Calx xA & yB based on t, the starting-positions and speeds xA = 800 - 320*t; yB = 410 - 160*t; % % Calc the corresponding 500 D values with pythagorus xsq = xA.^2; ysq = yB.^2; % sq xA & yB SumxA = sum(xsq); SumyB = sum(ysq); % sum the x & y values SumTot = SumxA + SumyB; % add the sums D = sqrt(xA.^2 + xA.^2); % % Now find value & index (address) for minimum D [Dmin, DminIndex] = min(D) % next the value of t that corresponds to Dmin tmin = t(DminIndex) % % Now Plot The Separation distance vs time plot(t,D, 'linewidth' , 3), xlabel( 'Hours after 1pm' );, ...
ylabel( 'AirCraft Separation Distance (mi)' ),grid % % PART B % must solve pythagorean eqn % => 30 = [xA^2 + yB^2] % subbing for t %=> 30 = [(500-320t)^2 + (410-160t)^2] % % Can use conv command to square polynomial PA = conv([-320 800], [-320,800]) PB = conv([-160 410], [-160,410]) Ptot = PA + PB % % Now subtract 900 from both sides then use roots D30 = roots(Ptot - [0 0 -900]) % % % % Now that we know the "close miss time is 2.4325 hrs Let "zoom in" on the % plot tz = linspace(2.4, 2.65, 500); % % Calx xA & yB based on t, the starting-positions and speeds xAz = 800 - 320*tz; yBz = 410 - 160*tz; % % Calc the corresponding 500 D values with pythagorus xsqz = xAz.^2; ysqz = yBz.^2; % sq xA & yB SumxAz = sum(xsqz); SumyBz = sum(ysqz); % sum the x & y values SumTotz = SumxAz + SumyBz; % add the sums Dz = sqrt(yBz.^2 + yBz.^2); % % Now find value & index (address) for minimum D [Dminz, DminIndexz] = min(Dz) % next the value of t that corresponds to Dmin tminz = tz(DminIndexz) % % disp( 'Getting ready to show ZOOMED plot"; Hit Any Key to continue' ) pause % % Now Plot The Separation distance vs time plot(tz,Dz, 'linewidth' , 3), xlabel( 'Hours after 1pm' );, ...
ylabel( 'AirCraft Separation Distance (mi)' ),grid Engineering-25: Computational Methods
Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
Engineering-25: Computational Methods
7 Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx
Engineering-25: Computational Methods
8 Bruce Mayer, PE E ENGR-25_Chp2_AirCraft_Separation_.pptx