Hey I have this simple code for a Haversine Formula (without radial conversion), but it keeps giving me the error of invalid syntax.
I looked everywhere but cant find any solution. It should work!
import math
def distance(lat1, lat2, lon1, lon2)
a1= (math.sin(lat2 - lat1 / 2 ))
a2= (math.cos(lat1) * math.cos(lat2) * (math.sin(lon2 - lon1 / 2) **2 ))
a ** 2 = a1 + a2
b ** 2 = 1 - (a **2)
d= 2 * math.atan2(a, b)
return d