# Projectile motion

1. Nov 20, 2007

### booboo123

1. The problem statement, all variables and given/known data

Hi Guys,
First post, so please take it easy on the noob

The problem is designing a matlab program for a rocket that has the user enter the following;

1) Launch angle
2) Launch velocity (ft. per sec)
3) Distance to target
4) How high the target location is above or below the launch site
5) The allowable range they will accept their rocket hitting from the target (for example their target could be 300ft away and it is acceptable for their rocket to miss the target by 10ft in either direction).

The program needs to calculate the following;
1) Time rocket is airborne
2) The distance away the rocket will land
3) How far away the rocket lands from its target (including whether or not the target was undershot or overshot).

2. Relevant equations

Im given the following;

1)landing distance = Vo*(cos (launch angle))*time
2)altitude of landing site = vo(sin(launch angle))*time - 16.1* t^2

3. The attempt at a solution

I know how to calculate the distance the rocket travels and the time it travels if the landing site is the same height as the launch site. What is really throwing me is, how I take into account the changing height of the landing site? Can you guys please shed some light on this, or at least point me in the right direction? Thanks in advance!
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Nov 20, 2007

### rl.bhat

Changing the sign of the altitude of landing site you can decide whether the landing site is above or below the launching site. +ve for above and -ve for below.