2
$\begingroup$

I have used the formula which is available on a website to calculate the destination longitude and latitude based-on current long/lat, distance to destination and bearing. For example,long/lat of a point on earth is given and the goal is calculating long/lat of a point which is located 1km away from start point. Here is the formula:

φ2 = asin( sin φ1 ⋅ cos δ + cos φ1 ⋅ sin δ ⋅ cos θ )

λ2 = λ1 + atan2( sin θ ⋅ sin δ ⋅ cos φ1, cos δ − sin φ1 ⋅ sin φ2 )

I implemented the formula with my desired programming language and the formula works with no problem, but I need the reference for this formula. In other words, I want to understand how this formula is derived analytically. I already sent the writer an email to ask about the reference but no reply yet. I'm wondering anyone knows the reference for this formula or any similar formula? Thanks

$\endgroup$

1 Answer 1

0
$\begingroup$

Knowns: start point $(\varphi_1$, $\lambda_1)$, heading $\theta$, radius $r$, distance $d$.

By the law of spherical cosines, we know that: \begin{equation}\tag{1} \cos(\delta) = \sin(\varphi_1)\sin(\varphi_2) + \cos(\varphi_1)\cos(\varphi_2)\cos(\Delta\lambda) \end{equation} defines the angular distance, which means the arclength formula on a sphere gives $\delta = d/r $, which is easily computed.

Next, comes a tougher part. (see here). Consider the spherical triangle generated between the two points and the north pole. Let $\psi_1$ and $\psi_2$ be the angles between the north pole (with which the heading is defined) and the points. The law of spherical cosines then gives: $$ \cos(\psi_2) = \cos(\psi_1)\cos(\delta)+\sin(\psi_1)\sin(\delta)\cos(\theta) $$ $$ \therefore\; \cos(\theta) = \frac{\cos(\psi_2) - \cos(\psi_1)\cos(\delta)}{\sin(\psi_1)\sin(\delta)} $$ But then using $\psi_i = \pi/2 - \varphi_i$, we get: $$\tag{2} \cos(\theta) = \frac{\sin(\varphi_2) - \sin(\varphi_1)\cos(\delta)}{\cos(\varphi_1)\sin(\delta)} $$ This lets us solve for $\varphi_2$ as: $$\tag{$\ast$} \varphi_2 = \arcsin\left( \cos(\varphi_1)\sin(\delta)\cos(\theta) + \sin(\varphi_1)\cos(\delta) \right) $$ Note it is also possible to express $\theta$ without the angular distance via: $$ \tag{3}\tan(\theta) = \frac{\sin(\Delta\lambda)\cos(\varphi_2)}{\cos(\varphi_1)\sin(\varphi_2)-\sin(\varphi_1)\cos(\varphi_2)\cos(\Delta\lambda)} $$

Now for $\lambda_2$. The first equation we wrote tells us that: $$\tag{4} \cos(\Delta\lambda) = \frac{\cos(\delta) - \sin(\varphi_1)\sin(\varphi_2)}{ \cos(\varphi_1)\cos(\varphi_2)} $$ Furthermore, using the expression for $\tan(\theta)$ (eq 3) we can get $\sin(\Delta\lambda)$ as follows: \begin{align} \sin(\theta)\left[ \cos(\varphi_1)\sin(\varphi_2) - \sin(\varphi_1)\cos(\varphi_2)\cos(\Delta\lambda)\right] &= \sin(\Delta\lambda)\cos(\varphi_2)\cos(\theta) \end{align} Next, substitute in eqs 2 and 4, to get: $$ \sin(\Delta\lambda) = \frac{\sin(\theta)\sin(\delta)}{\cos(\varphi_2)} $$ Thus, we get a formula for the tangent via: $$ \tan(\Delta\lambda) = \frac{\sin(\Delta\lambda)}{\cos(\Delta\lambda)} = \frac{\cos(\varphi_1)\sin(\theta)\sin(\delta)}{\cos(\delta) - \sin(\varphi_1)\sin(\varphi_2)} $$ Solving for $\lambda_2$ gives us: $$\tag{$\dagger$} \lambda_2 = \lambda_1 + \arctan\left(\frac{\cos(\varphi_1)\sin(\theta)\sin(\delta)}{\cos(\delta) - \sin(\varphi_1)\sin(\varphi_2)}\right) $$ The formulas we wished to derive are exactly those seen in eqs $\ast$ and $\dagger$.

$\endgroup$
2
  • $\begingroup$ Thank you so much for your time. $\endgroup$ Commented Jul 20, 2017 at 18:23
  • $\begingroup$ @user8296976 You're welcome :) $\endgroup$ Commented Jul 20, 2017 at 20:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .