Designing a MATLAB Program for Rocket Launch

AI Thread Summary
The discussion focuses on designing a MATLAB program for simulating a rocket launch, requiring user inputs for launch angle, velocity, target distance, height difference, and acceptable miss range. The program aims to calculate the time the rocket is airborne, landing distance, and deviation from the target. The user has a solid understanding of basic calculations for equal launch and landing heights but struggles with incorporating varying landing site elevations. A suggested approach is to adjust the altitude equation by changing the sign based on whether the landing site is above or below the launch site. This adjustment will help accurately model the rocket's trajectory and landing position.
booboo123
Messages
1
Reaction score
0

Homework Statement



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).

Homework 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

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!
 
Physics news on Phys.org
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.
 
TL;DR Summary: I came across this question from a Sri Lankan A-level textbook. Question - An ice cube with a length of 10 cm is immersed in water at 0 °C. An observer observes the ice cube from the water, and it seems to be 7.75 cm long. If the refractive index of water is 4/3, find the height of the ice cube immersed in the water. I could not understand how the apparent height of the ice cube in the water depends on the height of the ice cube immersed in the water. Does anyone have an...
Thread 'Variable mass system : water sprayed into a moving container'
Starting with the mass considerations #m(t)# is mass of water #M_{c}# mass of container and #M(t)# mass of total system $$M(t) = M_{C} + m(t)$$ $$\Rightarrow \frac{dM(t)}{dt} = \frac{dm(t)}{dt}$$ $$P_i = Mv + u \, dm$$ $$P_f = (M + dm)(v + dv)$$ $$\Delta P = M \, dv + (v - u) \, dm$$ $$F = \frac{dP}{dt} = M \frac{dv}{dt} + (v - u) \frac{dm}{dt}$$ $$F = u \frac{dm}{dt} = \rho A u^2$$ from conservation of momentum , the cannon recoils with the same force which it applies. $$\quad \frac{dm}{dt}...
Back
Top