def gcd(self, lon1, lat1, lon2, lat2):
<EOL>lon1, lat1, lon2, lat2 = map(math.radians, [lon1, lat1, lon2, lat2])<EOL>dlon = lon2 - lon1<EOL>dlat = lat2 - lat1<EOL>a = math.sin(dlat / <NUM_LIT:2>) ** <NUM_LIT:2> + math.cos(lat1) * math.cos(lat2) * math.sin(dlon / <NUM_LIT:2>) ** <NUM_LIT:2><EOL>c = <NUM_LIT:2> * math.asin(math.sqrt(a))<EOL>dis = E.R * c<EOL>return dis<EOL>
Calculate the great circle distance between two points
on the earth (specified in decimal degrees)