[Math] Given an airplane’s latitude, longitude, altitude, course, dive angle and speed, how do you find the new latitude, longitude, and altitude

calculusgeometrymultivariable-calculus

I have a model for an airplane that includes the aforementioned information. I want to be able to watch this model fly around on a map over time. Finding distance traveled is easy (distance = speed * timeElapsed), but I'm not sure how to find the new position when taking altitude and dive angle into account.

If I ignored altitude and dive angle, I've found I could use Haversine's formula, but as we all know, airplanes usually don't stay at a constant altitude. I want to be able to watch this airplane ascend and descend based on the dive angle.

It's been a long time since I've taken vector calculus, but it seems like altitude, latitude, and longitude are (closely related to) spherical coordinates. If that's true, I'm sure there's some way to get the new position based on the information provided using something like kinematics in spherical coordinates. I want the new position to be as accurate as it can be.

Best Answer

Let's denote positions using latitude $\phi$, longitude $\lambda$ (positive means east) and altitude $a$. Let's furthermore denote direction using course $\alpha$ ($90°$ being east) and dive angle $\delta$ (positive means up). Suppose your aircraft travels a distance $d=vt$, which I'll assume for now to be pretty small.

Then your height will increase by $d\sin\delta$, whereas your position in the (approximate) plane will change by $d\cos\delta$. If your course is $0°$, you want to increase latitude only, whereas for a course of $90°$ you'll increase longitude only. In between, your latitude increases proportional to $\cos\alpha$ and your longitude proportional to $\sin\alpha$. By how much it increases depends on the radius of the circle along which these angles are measured. For latitude, that circle is a great circle, its radius $R$ is that of earth's equator. So to turn a distance (approximately an arc length) into an angle (measured in radians), you divide by that radius. For longitude, the circle is the corresponding parallel. You can obtain its radius by multiplying earth's radius by $\cos\phi$. Taken together:

\begin{align*} a_2 &= a_1 + d\,\sin\delta \\ \phi_2 &= \phi_1 + \frac dR\,\cos\alpha\,\cos\delta \\ \lambda_2 &= \lambda_1 + \frac{d}{R\,\cos\phi_1}\,\sin\alpha\,\cos\delta \end{align*}

This computation makes a lot of assumptions which will reduce its accuracy.

  • We assume $d\ll R$ since we linearize the whole problem, instead of integrating
  • We assume $a\ll R$ since otherwise the current altitude would have to be taken into account for all radius-dependent computations
  • We treat earth as a sphere, instead of some ellipsoid or more complicated model
  • We disregard any difference between magnetic north, true north and so on

Most of these can be fixed, but doing so will make your formulas a lot more complicated.

If you go from short to long distance, and from sphere to ellipsoid, then the problem becomes what the Wikipedia article Geodesics on an ellipsoid calls the “direct geodesic problem”. They quote Über die Berechnung der geographischen Längen und Breiten aus geodätischen Vermessungen (The calculation of longitude and latitude from geodesic measurements) by Bessel (1825) as a full solution to that problem.