import math


def gc_distance(point1, point2):
	"""returns distance between point1 and point2 using great circle equation"""
	lon1, lat1 = point1[0], point1[1]
	lon2, lat2 = point2[0], point2[1]
	lat1, lat2, lon1, lon2 = map(math.radians, [lat1, lat2, lon1, lon2])
	radius = 6378 # WGS84 equatorial radius in km

	trig = math.sin(lat1) * math.sin(lat2) + math.cos(lat1)\
				 * math.cos(lat2) * math.cos(lon1 - lon2)

	if trig >= 1:
		distance = 0
	else:
		distance = radius * math.acos(trig)

	return distance