import math


def calculateRangeBearingFromGridPosition(easting1, northing1, easting2, northing2):
	"""given 2 east, north, pairs, compute the range and bearing"""

	dx = easting2-easting1
	dy = northing2-northing1

	bearing = 90 - (180/math.pi)*math.atan2(northing2-northing1, easting2-easting1)
	return (math.sqrt((dx*dx)+(dy*dy)), bearing)