I'm trying to calculate the initial launch angles and velocity of a projectile (atmosphere's effects can be neglected), assuming that I know the lat/lon coordinates of both the launch and the destination points. Can you recommend any software libraries or reading materials that could help? Thank you.
Answer
If you don't consider atmospheric drag and other dissipative effects, assuming that the Earth is non-rotating, and ignore general relativity (which is a lot of assumptions to make, and later I can try to edit this to comment on how they might be relaxed), a ballistic trajectory is just a segment of an orbit. So finding the launch parameters just entails finding an orbit that intersects both the launch point and the destination.
Orbital trajectories are given by the equation
ro=ρ1+ϵcosϕ
where ρ is a length parameter related to the size of the orbit and ϵ is the eccentricity. At the points where the orbit intersects the Earth's surface, you'll have ro equaling the radius of the Earth at that point; let's say ro=RL for the launch point and ro=RD for the destination. This gives you the following two equations,
RL=ρ1+ϵcosϕL
RD=ρ1+ϵcosϕD
along with the constraint that ϕD−ϕL (or vice-versa, depending on how you define coordinates) has to be equal to the angular separation Δ between the source and destination. That angular separation can be calculated using the law of haversines.
This system of equations can be solved for the orbital parameters as follows, assuming RD≠RL (see below for the other case),
ϵ=RL−RDRDcos(ϕL+Δ)−RLcosϕL
ρ=RDRL[cos(ϕL+Δ)−cosϕL]RDcos(ϕL+Δ)−RLcosϕL
Notice that they are dependent on ϕL; this is because only the difference ϕD−ϕL=Δ is physically relevant, so you're free to choose the actual values to be whatever you like. Your choice of ϕL will influence the shape of the trajectory.
Having calculated ϵ and ρ, you can determine the launch angle α above the horizon by calculating the slope of the orbit at the launch point:
tanα=1rodrodϕ|ϕL=ϵsinϕL1+ϵcosϕL=(RL−RD)sinϕLRD[cos(ϕL+Δ)−cosϕL]
To determine the speed, you can use the fact that (according to my notes) the total energy of the projectile is given by
E=GMm(ϵ2−1)2ρ
which is equal to the sum of kinetic and potential energies, 12mv2−GMmr. (m is the mass of the projectile, M is that of the Earth) Plugging in r=RL, I get
v=√2GMRL+GM(ϵ2−1)ρ
So the bottom line is that you plug RD, RL, Δ, and some choice of ϕL into the formulas for v and α to get the launch parameters.
I mentioned that the procedure above hits a snag if RD=RL. You'd wind up calculating ϵ=0, which on a spherical planet entails rolling your projectile along the ground ;-) which doesn't make sense.
If RD=RL, you can go back to the orbital equations and find that cosϕD=cosϕL. (Alternatively, this could come from the condition that the denominator of ϵ also be zero.) The only way to satisfy this is by setting ϕL=−ϕD=Δ/2. This gives you the condition
ρ=RL(1+ϵcosΔ2)
Again, you have a degree of freedom: you can choose any value of ϵ, and plugging into this equation will give you the corresponding value of ρ. Once you have those, you can use the same procedures to calculate the launch angle and speed:
tanα=1rodrodϕ|ϕL=ϵsinΔ21+ϵcosΔ2
v=√2GMRL+GM(ϵ2−1)RL(1+ϵcosΔ2)
No comments:
Post a Comment