kristianmandrup / haversine

Calculates the haversine distance between two locations using longitude and latitude
MIT License
89 stars 12 forks source link

Inverse haversine? Convert from feet/meters to degrees given a geographic location #4

Open ddd1600 opened 9 years ago

ddd1600 commented 9 years ago

Could somebody add this method? I don't know how to do it

kristianmandrup commented 9 years ago

Perhaps try implementing this:

http://math.stackexchange.com/questions/474602/reverse-use-of-haversine-formula

d= 2 *r * (sin ^ −1) * (sqrt (haversin(ϕ2−ϕ1) + cos(ϕ1) * cos(ϕ2) * haversin(λ2−λ1) )

Doesn't exactly look trivial: http://mathworld.wolfram.com/InverseHaversine.html