azimuth calculation in the python (without geolocation lib)

424 Views Asked by At

How can I calculate azimuth without importing Geodesic? (or any other kind of lib)

I want to able to have the same below azi1 and azi2 results giving two geolocations as shown.

>>> from geographiclib.geodesic import Geodesic
>>> # The geodesic inverse problem
... Geodesic.WGS84.Inverse(-41.32, 174.81, 40.96, -5.50)
{'lat1': -41.32,
 'a12': 179.6197069334283,
 's12': 19959679.26735382,
 'lat2': 40.96,
 'azi2': 18.825195123248392,
 'azi1': 161.06766998615882,
 'lon1': 174.81,
 'lon2': -5.5}

BASICALLY I'M JUST ASKING BASIC IMPLEMENTATION OF AZIMUTH IN PYTHON.

1

There are 1 best solutions below

1
Pappo On

You should have a look at the Geodesic lib source code and implement your own version inside your code. Or implement the algorithm from scratch.