1

Sorry guys, I don't know how to be more specific in the question without writing a way too long question...

Anyway my problem:

I have this formula to calculate the distance between two points on the earth. $$d=\operatorname{arcos}\left(\sin\theta_1\ \sin\theta_2+\cos\theta_1\ \cos\theta_2\ \cos(\phi_2-\phi_1)\right)$$

Now I need to calculate $\phi_2$.

I tried to change the formula myself but I failed to do it right. Now I am asking you guys to help me. It would be nice if someone could show me how he resolves it.

Thanks in advance

A.P.
  • 9,906
Andreas
  • 11
  • Welcome to math.SE: please note that your question has probably already been answered here. – A.P. May 08 '13 at 07:42
  • @A.P. well as i see it he wants to know the distance between two points, my problem is i know the distance but i dont know how o get the value at the end of the given distance – Andreas May 08 '13 at 07:56
  • I took the liberty of trying to improve the readability of your question using Tex. I hope this is fine with you. – A.P. May 08 '13 at 08:36

1 Answers1

1

This basically amounts to some algebraic manipulation.
You have a formula of the form $$d=\operatorname{arcos}\left(\sin\theta_1\ \sin\theta_2+\cos\theta_1\ \cos\theta_2\ \cos(\phi_2-\phi_1)\right)$$ Now recall that $\operatorname{arcos}(x)$ is the inverse function of $\cos(\theta)$; therefore applying $\cos$ to both sides of the equation gives you the formula from the question I linked $$\cos d=\sin\theta_1\ \sin\theta_2+\cos\theta_1\ \cos\theta_2\ \cos(\phi_2-\phi_1)$$ But you actually want to know $\phi_2$ so we start by taking $\cos(\phi_2-\phi_1)$ to one side of the equality and leaving the rest on the other side $$\cos(\phi_2-\phi_1)=\frac{\cos d-\sin\theta_1\ \sin\theta_2}{\cos\theta_1\ \cos\theta_2}$$ Finally, we apply $\operatorname{arcos}$ to both sides of the equation and add $\phi_1$ $$ \begin{align} \phi_2-\phi_1&=\operatorname{arcos}\left(\frac{\cos d-\sin\theta_1\ \sin\theta_2}{\cos\theta_1\ \cos\theta_2}\right)\\ \phi_2&=\operatorname{arcos}\left(\frac{\cos d-\sin\theta_1\ \sin\theta_2}{\cos\theta_1\ \cos\theta_2}\right)+\phi_1\\ \end{align} $$

A.P.
  • 9,906
  • It won't work like that when i try with my code. Does d need to be a radiant value too? Tried both but none gives me the right answer... – Andreas May 08 '13 at 11:21
  • Everything should be in radians, yes. Could you please give me the example you tried? How did you check that it doesn't give you the right answer? – A.P. May 08 '13 at 17:23
  • Found the mistake: you have to divide d with the radius of the earth before getting the cos(d): cos(d/6370) – Andreas May 14 '13 at 13:45
  • Yes, @Andreas, that's exactly what it means for it to be in radians. ^_^ – A.P. May 15 '13 at 09:40