FlightAware Discussions

Finding altitude, azimuth of flight for telescope

I’m interested in using FA for astronomy purposes. My primary goal would be to know (or predict) if a flight was coming through the field of view of my telescope while it was taking a photo, which can have exposures of 10 min or more. Capturing a plane flying across the image is not a happy situation.

My goal would be to find all flight traffic in a rectangular field of view radiating out from the telescope’s position. I think I see how to get lat/long/alt data from the API, but I’m interested in getting this as Alt/Az/distance information.

Since this has to work in remote locations, I would like to extract this from my dedicated Pi, not the network.

Any thoughts? Pointers?




That’s an interesting application that I can appreciate. If you’re able to predict a clear area of sky for the exposure time of your photo, that will be of real help to astro photographers and something I’d use.

I was taking some long exposures of the ISS last year. I got a nice silhouette shot configured and ready, only to notice a plane going right across the field of view after it was too late to change the config. If I’d known it was on its way I’d have set up facing the opposite way!

You may want to just start simple and build an ADS-B receiver you can take with you along with a notebook PC to view the SkyAware map of nearby planes. If there are regular flights in the area, you’ll be able to see those common routes / aircraft highways and hopefully be able to aim your telescope between them.

When I take my ADS-B receiver to a local airport, I’ll use my cellphone’s hotspot capability to connect the ADS-B receiver and my notebook PC to the same network connection, find the IP address of the ADS-B box, then enter that IP address in my notebook’s browser to see the real-time SkyAware map.

If you don’t mind a 5-10 second lag, you could just pull up FlightAware or ADSBexchange on your phone or notebook PC to see the nearby aircraft.

1 Like

You might want to have a look at the heatmap script I wrote - it does calculations to determine azimuth and elevation of an aircraft which you could adapt to give you the information you want. The script pulls data from the aircraft.json produced locally, so you could do something similar to get live data.

thanks, all. good information. I’m still learning this technology, so please be patient with me :slight_smile:

I can think of two applications for this, one for controlling the shutter during an imaging sequence, and another for the pro observatories that want to use a powerful laser to create an “artificial star” about 60 miles up. Problem is, FAA frowns on folks with those kinds of lasers, so they require a spotter to manually look for planes to turn off the laser if one comes by. Maybe having this information would help them, too. (I’m not a pro, but am a docent at the Palomar 200" scope in California)

For my personal scope setup, I use a Pi 4 running open source KSTARS https://edu.kde.org/kstars/ and EKOS/INDI https://www.indilib.org/about/ekos.html to control everything. KSTARS is a planetarium program that controls the field of view of the scope, it’s position in the sky, satellites passing by, etc. INDI is a device control system that controls the telescope mount, camera, focuser, dome control, etc. via plug-in device drivers. I also use a separate guide scope and camera to track the stars to single-pixel precision (about 15 degrees per hour) I have everything running on the Pi4 velcroed to the top of my scope. It is all designed to run unattended and remotely (hopefully).

I might set it up to take 24 5 minute exposures (the scope moving 30 degrees during the sequence), then stack them together, throwing away bad images caused by focusing, clouds, or aircraft lights. It would be nice to either delay a capture or shorten the exposure to avoid an airplane flying through it.

I’m thinking maybe it would work to have a Flight Window API that would return the count and trajectories of aircraft within a given rectangular view defined by two corners of Alt/Az from the telescopes point of view (not necessarily the receiver’s) A count of zero would indicate it was safe to image. Or it could be set up as an alert to warn of a flight entering the window.

The scope controller would keep the window defined (Field of View/Alt/Az of the camera) plus a warning zone to detect intruders before they enter the camera’s frame, and decide how to control the imaging sequence.

It seems to me that a Flight Window API could be used for a lot of other purposes, too.

It’s been a few years (decades?) since I did software architecture, and I’m probably outdated in my way of thinking these things through… I’d appreciate anyone’s thoughts on this idea.

The data that the FA provides is not real-time data. The delay is about 20 seconds.
The best way is with your own receiver.
It is enough to use an Android phone (or tablet) with OTG and SDR dongle.
Install the program Avare and connect the dongle via USB adapter.
Now you see all the planes around you.

1 Like

thanks for the tip. I am using a Pi-based FlightFeeder receiver. But my problem is more complicated than just looking at the flight paths from above. Imagine setting up a telescope in Niagara falls to take pictures of the Orion Nebula for 2 hours. The camera is looking through a slice of the sky about 1 degree by 1 degree square that moves about 30 degrees over the course of the imaging. If a plane passes through this window, (or the safety buffer zone outside of it) it messes up the image, and maybe 10 minutes of photography.

You can’t predict reliably predict flight paths.
But i suppose the planes going straight is a good estimate.

The heatmap script will show you where to get the data and even to calculate some stuff.
You’ll just have to program yourself something that does the rest.

Take a look at the aircraft.json at /dump1090-fa/data/aircraft.json for the receiver you are running.
That’s the data you get.
There is no pre-made application that does what you ask.


Fully agree with @rugomol


1 Like

Not quite what you wanted but there may be pointers in this article.

There is also something similar I saw a few years ago on rtl-sdr.com but I can’t find it.


aircraft.json is definitely the way to go here. It will give you a 3D position (lat, lon, alt) and 3D velocity vector (heading, groundspeed, climb/descend rate) for each aircraft; transform into a coordinate system of your choice and do some projective geometry to work out whether the extrapolated flight path will be visible to your sensor.

Aren’t you going to have more problems with the Starlink satellites than aircraft?

Wow… thanks to all for the great information. I use Python, so aircraft.json (thanks obj) using haversine formula (thanks for the link, triggers) https://stackoverflow.com/questions/4913349/haversine-formula-in-python-bearing-and-distance-between-two-gps-points looks like it will get me pretty far along on my quest.

Is there a way to get planned waypoints for a flight? How predictable are they? If I see a flight somewhere between it’s planned waypoints, how reasonable of a prediction would it be to just extrapolate the current position and speed to predict a future path?

re: severity of Starlink: The satellites (birds) are only visible at dawn or dusk when the viewer is in darkness and the bird is in sunlight. Astronomers wait until astronomical sunset/sunrise which generally covers the bulk of the visibility period. And ever after that, they birds would be only visible in low elevation, close to the horizon, which is not a typical place that astronomers like to look, due to atmospheric effects, so the solar illumination issues is not a very serious issue.

Even with 12,000 birds in the constellation, that works out to a spacing of about 128 miles between them. So if one of them is directly overhead, the nearest ones would be about 128 miles away. A dark object a few meters across 128 miles away and hundreds of miles high is not going to affect many images.

In contrast, aircraft are illuminated, and quite noticeable over a distance, so they are (and have been) much more a threat to visibility than Starlink. I would imagine that cosmic ray hits to their telescope’s sensors are a greater problem than Starlink’s visibility.

Where a flight plan has been filed, you can see the waypoints in FlightAware. If FA delays the data too much, check out ADSBexchange.com for closer-to-real-time positions.

My son and I just started working on a GoLang-based project to sent alert texts to a Slack channel so I’ll know when an aircraft is inbound to my ADS-B receiver that’s located near an airport. As suggested above, we’re using/parsing the aircraft.json file and then calculating distance and bearing to each aircraft using a golang-geo pkg.

If the bearing to the aircraft is 180 degrees different from the aircraft heading, then we know it’s probably inbound for landing (if it’s also at a low altitude) so we post a message on a Slack channel that’s something like “N1234 is 9 miles out on bearing 270”. If you Google glolang slack post, you’ll find some example code.

triggers…Yep thats what i was about to say… stupidest idea eva (starlink sats) and their going to launch many more I’ve heard thousands are going to be orbiting in groups of 50 or more all following each other until months later going their own separate ways…

If a bit of pre-planning would save a lot of headaches later, a glance at the charts on https://skyvector.com/ might help at least avoid higher density routes.

No, planes don’t always fly the exact routes, but a good percentage of the time they are close, especially near airports or enroute waypoints.