Question: Write a MATLAB function that solves the equations for the missile trajectory from a given set of initial conditions. Use t = 0.005 s. The

Write a MATLAB function that solves the equations for the missile trajectory from a given set of initial conditions. Use t = 0.005 s. The function should have the following header: function [T, X, Y, Z, U, V, W] = missile(X0, Y0, Z0, m0, mf, Thmag0, theta, phi, Tburn) where the inputs are the initial position, initial and landing mass, initial thrust magnitude, launch angles and burn time of the missile. All inputs are scalars while all outputs are vectors. You need to simulate until the missile lands on the terrain. You might want to consider MATLAB built-in function interp2 to identify the landing location. The terrain demo.m includes an example of how interp2 works.

Write a MATLAB function that solves the equations for the missile trajectory

Th-an pA U2 V2 W V2 At Un Un din n+1 2mm man Th yn. pA V, U2 V2 W2 At din n+1 2m. man Th 2n pA g At W, d.ns n+1 2mn man At Xn U, n+1 n+1 At n+1 n-+1 Zn Zn Wnti At n+1 (2) where subscript n denotes variables at current time, subscript n variables at time that is At ahead. Note that Th-an, Th-yn and Th-zn on the right-hand-side are the three components of the thrust at the nth time step. Th-an pA U2 V2 W V2 At Un Un din n+1 2mm man Th yn. pA V, U2 V2 W2 At din n+1 2m. man Th 2n pA g At W, d.ns n+1 2mn man At Xn U, n+1 n+1 At n+1 n-+1 Zn Zn Wnti At n+1 (2) where subscript n denotes variables at current time, subscript n variables at time that is At ahead. Note that Th-an, Th-yn and Th-zn on the right-hand-side are the three components of the thrust at the nth time step

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!