-3

I want to know, If There is a possibility to get a reverse haversine functions.

With that, I want to say that If I have a distance between two cities, how can I get latitude and longitude.

Thank you very much.

  • 3
    So let me get this straight. You only know the distance between two points, along the surface of a sphere. And you're asking if it's possible to uniquely determine the locations of these two points? Try to imagine how this would look like ... – Matti P. Jan 30 '20 at 10:42
  • You can also think about it this way: Let's say that the distance is $1~000$ km. You are in a point on a sphere. Are there more than one point on the sphere that are exactly $1~000$ km away from you? (Let's say that the radius of the sphere is much larger than $\frac{1000}{\pi}$ kilometers) – Matti P. Jan 30 '20 at 10:45

1 Answers1

2

There is an inverse of the haversine function

$$\operatorname{hav}(\theta) = \sin^2\left(\frac{\theta}{2}\right) = \frac{1 - \cos(\theta)}{2}$$

$$\implies \operatorname{hav}^{-1}(x) = 2 \sin^{-1}\left(\sqrt{x}\right) = \cos^{-1} \left(1-2x\right)$$

and there are the usual issues, as with other trigonometric inverses, of domain and image.

There is not an inverse of the haversine formula

$$\operatorname{hav}\left(\Theta\right) = \operatorname{hav}\left(\varphi_2 - \varphi_1\right) + \cos\left(\varphi_1\right)\cos\left(\varphi_2\right)\operatorname{hav}\left(\lambda_2 - \lambda_1\right)$$

since a single angle (or distance) cannot be converted uniquely back to the longitudes and latitudes.

Henry
  • 157,058