Has anybody done this in Python or Arcade?
Solved! Go to Solution.
found on this stackoverflow thread:
import numpy import math def get_bearing(lat1, long1, lat2, long2): dLon = (long2 - long1) x = math.cos(math.radians(lat2)) * math.sin(math.radians(dLon)) y = math.cos(math.radians(lat1)) * math.sin(math.radians(lat2)) - math.sin(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.cos(math.radians(dLon)) brng = numpy.arctan2(x,y) brng = numpy.degrees(brng) return brng
found on this stackoverflow thread:
import numpy import math def get_bearing(lat1, long1, lat2, long2): dLon = (long2 - long1) x = math.cos(math.radians(lat2)) * math.sin(math.radians(dLon)) y = math.cos(math.radians(lat1)) * math.sin(math.radians(lat2)) - math.sin(math.radians(lat1)) * math.cos(math.radians(lat2)) * math.cos(math.radians(dLon)) brng = numpy.arctan2(x,y) brng = numpy.degrees(brng) return brng
@Dale_Honeycutt Thank you. This worked like a charm!
That's good to hear b/c that was some scary math.