0
$\begingroup$

I need to convert Cartesian coordinates to lat/long coordinates or to be more specific: I have a point $P(\phi_1|\lambda_1)$ (lat/long), a heading $\theta$ (like compass heading, north is $0^{\circ}$) and a distance $d$ (from which you can calculate $\delta=d/r$). I found some formulae for this and their derivation here. However, I can't find (out) how the equation

\begin{equation}\tag{1} \cos(\delta) = \sin(\varphi_1)\sin(\varphi_2) + \cos(\varphi_1)\cos(\varphi_2)\cos(\Delta\lambda) \end{equation}

is built from the spherical law of cosines as the spherical law of cosines only gives

\begin{equation} \cos(a) = \cos(b)\cos(c) + \sin(b)\sin(c)\cos(A) \end{equation}

and their cyclic permutations for $\cos(b)$ and $\cos(c)$.

$\endgroup$
0
$\begingroup$

The spherical triangle you are interested in has a vertex at the north pole. The angular distance to the other two vertices is $90$ degrees minus their latitude, hence $\sin$ gets swapped with $\cos$.

$\endgroup$
  • $\begingroup$ Wow, thanks a lot. I actually already had the same problem when trying to understand how eq. 2 was built (see link) but didn't think that would be the solution for this one as it was the first equation written in the derivation. I stand corrected. $\endgroup$ – Emil S. Dec 17 '17 at 16:32
  • $\begingroup$ You are welcome. Sometimes the obvious escapes one. $\endgroup$ – Somos Dec 17 '17 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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