Using a Pan-Tilt HAT to Track & Point at airplanes captured by FlightAware

I live in San Francisco — near both SFO and OAK airports. I have a raspberry Pi and am currently running FlightAware. My stats are at /wasauce#stats-106041

I am interested in building a tracking system that will identify the closest airplane and then point at it using two servos and the Pan-Tilt system (Pan-Tilt HAT - Pimoroni). I’m planning on attaching a stick to point at and follow along as planes land and depart — following a plane until it is out of range, and then finding a new one to track.

I feel comfortable extracting data from FlightAware (I already have a script capturing the JSON data). And I feel generally comfortable controlling the servos.

QUESTIONS:

  1. In FlightAware (see attached), what is the “heading”? Is that the heading of the airplane or the heading from my location to the airplane (i.e. where I would need to look?
  2. What is the reference point for the heading — i.e.7° degrees off what?
  3. What the other methods might you recommend for determining how to point the Pan-Tilt at the plane and track it as it departs or comes in for a landing?
    1. I’ve thought about trying to calculate the bearing between the two lat/long pairs (my location and the airplane)
      1. google maps - Calculate bearing between two decimal GPS coordinates - Geographic Information Systems Stack Exchange.

Thank you for any guidance you can provide!