code: def get_bearing(aLocation1, aLocation2):
      	
      off_x = aLocation2.lon - aLocation1.lon
      off_y = aLocation2.lat - aLocation1.lat
      bearing = 90.00 + math.atan2(-off_y, off_x) * 57.2957795
      if bearing < 0:
          bearing += 360.00
      return bearing;
docs: Returns the bearing between the two LocationGlobal objects passed as parameters.
  
      This method is an approximation, and may not be accurate over large distances and close to the 
      earth's poles. It comes from the ArduPilot test code: 
      https://github.com/diydrones/ardupilot/blob/master/Tools/autotest/common.py