Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am new to working with coordinate data and figured out the equation I am looking for is the Rhumb Line. I went to go research it and found a lot of equations and I still have no idea where to start.

The data I DO have is my heading, my distance, and my starting coordinate pair. How would I use this equation to find my new coordinate pair?

share|improve this question
How you would use it, or whether you would use it at all, depends on what you're trying to achieve. What is it? –  Henning Makholm Sep 22 '11 at 16:12
I considered rhumb lines in this question. In there the only parameter is the heading (expressed as an angle). Could you give an example of what you're expecting to see? –  J. M. Sep 22 '11 at 16:13
I am looking for my new coordinates. Not in the crazy clock format, just the decimal (I would assume that's how it works to begin with?) –  Kyle Hotchkiss Sep 22 '11 at 17:34
Your comment does not make much more sense than the original question. Take a deep breath and start over and, explain from the beginning what you are trying to do. Keep in mind that we don't already know what your problem is. –  Henning Makholm Sep 22 '11 at 17:58
Alright. I have a some starting coordinates to some point on earth. I want to travel a known distance on a known heading. What are my new coordinates after traveling? I thought the Rhumb line might be the right equation for this, but I'm not sure. –  Kyle Hotchkiss Sep 22 '11 at 18:08

2 Answers 2

I'll use spherical coordinates ($\theta =$ longitude, $\phi =$ latitude, all angles measured in radians) on a sphere of radius $R$. Mercator projection maps $(\theta, \phi)$ to $\theta, \ln(\tan(\phi/2 + \pi/4))$, and a rhumb line on the sphere corresponds to a straight line on the Mercator projection. Thus the rhumb line through $(\theta_0, \phi_0)$ at heading $\alpha$ (measured clockwise from north) is given parametrically by $\theta = \theta_0 - t \sin(\alpha)$, $\ln(\tan(\phi/2 + \pi/4)) = \ln(\tan(\phi_0/2 + \pi/4)) + t \cos(\alpha)$ or $\phi = 2 \arctan \left( e^{t \cos(\alpha)} \tan(\phi_0/2 + \pi/4) \right)$. Now the distance between two points $(\theta_0, \phi_0)$ and $\theta_1, \phi_1)$ along the rhumb line is $R \sec(\alpha) (\phi_1 - \phi_0)$. So if that distance is $d$, $\phi_1 = \phi_0 + \frac{d}{R} \cos(\alpha)$, corresponding to $t = \sec(\alpha) \ln \left( \frac{\tan(\phi_1/2 + \pi/4)}{\tan(\phi_0/2 + \pi/4)}\right)$, and $\theta_1 = \theta_0 - \tan(\alpha) \ln \left( \frac{\tan(\phi_1/2 + \pi/4)}{\tan(\phi_0/2 + \pi/4)}\right)$.

share|improve this answer
Could I see a source on this please? –  Kyle Hotchkiss Sep 24 '11 at 17:26
Do you assume positive latitude changes to point west? Your choice of sign in $\theta=\theta_0-t\sin\alpha$ for $\alpha$ measured clockwise from north seems to indicate as much. And I though the convention was using positive for east. Apart from this, my own answer arrives at the same result, without knowledge about Mercator projections, but with more work instead. I hope these two answers will complement one another. –  MvG Sep 3 '13 at 21:47

Suppose you travel an infinitesimal distance $\mathrm ds$ in direction $\alpha$, where $\alpha=0°$ is north and $\alpha=90°$ is east. Then in a tangential coordinate system, you will travel a distance $\mathrm ds\cdot\sin\alpha$ in the eastward-pointing $x$ direction, and a distance $\mathrm ds\cdot\cos\alpha$ in the northward-pointing $y$ direction. Written together:

$$\begin{pmatrix}\mathrm dx\\\mathrm dy\end{pmatrix} = \mathrm ds\cdot\begin{pmatrix}\sin\alpha\\\cos\alpha\end{pmatrix}$$

Now we want to relate this into changes in latitude $\phi$ and longitude $\lambda$. Multiplying latitude, measured in radians, by $R$, the radius of the sphere and hence the radius of a great circle, you obtain the displacement in $y$ direction. For longitude, you also have to multiply by $\cos\phi$ to obtain the radius of the parallel at latitude $\phi$. So you get

$$\begin{pmatrix}\mathrm dx\\\mathrm dy\end{pmatrix} = \mathrm ds\cdot\begin{pmatrix}\sin\alpha\\\cos\alpha\end{pmatrix} = R\cdot\begin{pmatrix} \cos\phi\cdot\mathrm d\lambda \\ \mathrm d\phi \end{pmatrix}$$

Now you can start to integrate these infinitesimal steps. Integrating latitudes is easy, since the integrand does not depend on the current position:

$$\phi(t) = \phi_0+\int_0^t\frac{\cos\alpha}R\,\mathrm ds = \phi_0 + \frac tR\cos\alpha$$

Doing the same for longitudes is more tricky, but since you can plug in this expression for $\phi$, it is possible:

$$\lambda(t) = \lambda_0 + \int_0^t\frac{\sin\alpha}{R\cdot\cos\big(\phi(s)\big)}\,\mathrm ds = \lambda_0 + \int_0^t\frac{\sin\alpha}{R\cdot\cos\big(\phi_0+\frac sR\cos\alpha\big)}\,\mathrm ds$$

Now you can use e.g. Wolfram Alpha to integrate this. The result it produced for me was this:

$$\int\frac{\sin(\alpha)}{R\,\cos\left(\phi_0+\frac{s\,\cos(\alpha)}{R}\right)}\,\mathrm ds =\\ \tan(\alpha)\left(\log\left(\cos\left(\frac{R\,\phi_0+s\,\cos(\alpha)}{2\,R}\right)+\sin\left(\frac{R\,\phi_0+s\,\cos(\alpha)}{2\,R}\right)\right)\\-\log\left(\cos\left(\frac{R\,\phi_0+s\,\cos(\alpha)}{2\,R}\right)-\sin\left(\frac{R\,\phi_0+s\,\cos(\alpha)}{2\,R}\right)\right)\right)+C$$

This is somewhat ugly, but if you take a closer look at the expression, you will notice that the same angle occurs in several places. Let's call this angle


and you get the expression

$$ \tan\alpha\cdot\log\frac{\cos\beta+\sin\beta}{\cos\beta-\sin\beta}+C $$

Now you can again ask Wolfram Alpha about this. It doesn't provide a simpler formula, but looking at the plot you might recognize a shifted tangens function. Or you could look at Robert's answer and see that a shifted tangens plays a role there. So you could conjecture

$$ \frac{\cos\beta+\sin\beta}{\cos\beta-\sin\beta} = \tan\left(\beta+\frac\pi4\right) $$

and use Wolfram Alpha to verify this. So now you know this indefinite integral to be


With this you have

\begin{align*} \lambda(s) &= \lambda_0 + \tan\alpha\cdot\log\left(\tan\left(\frac{\phi(s)}{2}+\frac\pi4\right)\right) - \tan\alpha\cdot\log\left(\tan\left(\frac{\phi(0)}{2}+\frac\pi4\right)\right) \\ &= \lambda_0 + \tan\alpha\cdot\log\frac{\tan\left(\frac{\phi(s)}{2}+\frac\pi4\right)}{\tan\left(\frac{\phi(0)}{2}+\frac\pi4\right)} \\ &= \lambda_0 + \tan\alpha\cdot\log\frac{\tan\left(\frac{R\,\phi_0 + s\,\cos\alpha}{2\,R}+\frac\pi4\right)}{\tan\left(\frac{\phi_0}{2}+\frac\pi4\right)} \end{align*}

This is the same result Robert Israel gave in his answer, except for the sign of the change. To check that, consider $\alpha=45°$, i.e. you are going northeast. Then your latitude will increase, so the numerator will be greater than the denominator, so the fraction will be greater than one, so the logarithm will be positive, and with $\tan\alpha=1$ you get a positive increase in longitude as well.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.