Converting lat long & altitude into a line of sight target? I want to design a long-range ADS-B receiver with a directional antenna (like a Yagi), but in order to maximize its range, I'll need to orient the antenna towards a target (plane) based on existing data from external sources like FR24. I can easily find latitude longitude and altitude data for planes, but how do I convert these values into polar and azimuth angles that I can orient my antenna towards? Essentially, I need to calculate the line of sight my antenna needs to point at in order to make contact with the plane with the antenna's main radiation lobe. Does anyone know I could go about doing this?
Here's javascript source code with a detailed explanation, too long to paste into a standalone answer, but by the time this goes offline certainly a dozen more will appear if they haven't already.
https://github.com/cosinekitty/geocalc/blob/master/compass.html

Online calculator for the same:
https://doncross.net/geocalc/compass.html