bearing3
This commit is contained in:
@ -85,7 +85,7 @@ def haver_dist(coord1, coord2):
|
|||||||
dlati = lati2 - lati1
|
dlati = lati2 - lati1
|
||||||
a = (
|
a = (
|
||||||
math.sin(dlati / 2) ** 2
|
math.sin(dlati / 2) ** 2
|
||||||
+ math.cos(lati1) * math.cos(lati2) * math.sin(dlon / 2) ** 2
|
+ math.cos(lati1) * math.cos(lati2) * math.sin(dlong / 2) ** 2
|
||||||
)
|
)
|
||||||
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
|
c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a))
|
||||||
distance = R * c
|
distance = R * c
|
||||||
|
|||||||
Reference in New Issue
Block a user