# How to get new coordinates after a certain distance was travelled (while accounting for altitude)?

Suppose you start at a location identified by a set of coordinates (latitude, longitude) on Earth, then move a given distance in a given direction. What is the equation that gives you the coordinates where you end up? I know that at higher altitudes, a distance corresponds to a smaller angle; I would like an equation that works for different altitudes, not just on the Earth's surface.

I have looked at haversine and great circle equations, but I don't think those are the right way to go. The distance traveled in the equation I'd like wouldn't be that big (a mile or two at the most), and this distance is a straight line.

-
What do you mean "account for altitude"? It's not at all clear to me what physical situation you're describing. – David Z Sep 19 '11 at 16:28
Coordinates need more resolution with more altitude – Kyle Hotchkiss Sep 19 '11 at 16:44
Sorry, that doesn't help clarify things. What are you even trying to calculate? – David Z Sep 19 '11 at 16:46
OK, so after your edit... if I understand correctly, you start at a location specified by coordinates (latitude,longitude), and you travel a given distance (in a given direction?), and you want to find the coordinates of the location where you end up? And you'd like some way to compute this that works not only on the Earth's surface, but also at a fixed height above the surface? – David Z Sep 19 '11 at 17:13
Yes sir. Sorry for the lack of clarification, I have a hard time describing this kinda stuff sometimes. – Kyle Hotchkiss Sep 19 '11 at 17:21

I read your question as "How does one calculate the path length of a curve parallel to the surface of a sphere given the distance between that path and the sphere is $a$, called altitude." Correct me if this is wrong.

You can read about the math here. While there are elegent mathematical descriptions that would allow you to calculate this value for a variety of paths, based on the language used in your question, a simpler approach is likely suitable.

For a "straight" path parallel to the surface of a sphere with radius $r$, at a given altitude $a$, the arc length (and thus distance traveled) is

$$s = \Delta\theta\cdot (r + a)$$

where $\Delta\theta$ is the angle (in radians) subtended by the path.

In the event that you are confused how to represent the angle $\theta$, please refer to this article on the spherical coordinate system.

-
Given the clarification provided by David, it appears that my answer no longer reflects your question directly. Nonetheless, the formula still holds, you just know different variables. Look at the spherical coordinate system, learn how to convert coordinates back and forth, and then find the change in $\theta$ given $s$, $r$, and $a$. – AdamRedwine Sep 20 '11 at 11:37