5 minutes, 927 Words
A short project that I’ve wanted to work on for some time is to be able to automatically pull the ATIS for a given airport in Australia, giving a real-time feed of the ATIS at an airport.
ATIS stands for Automatic Terminal Information Service. At most airports, the ATIS is a voice-recorded message broadcast by air traffic control on a frequency at an airport. Pilots listen to this ATIS message to get up-to-date information on the conditions at an airport prior to departure. The information that the ATIS provides includes:
- Active runways
- Visibility/cloud layers
- Air pressure
The information is critical for pilots and when contacting air traffic control for the first time pilot are often required to indicate that they have listened to the ATIS. They do this by stating some form of the phrase:
“in receipt of information B”
In this example scenario, B is the identifier of the current ATIS. As conditions change at an airport, so does the ATIS message. This means there needs to be some way of tracking the current ATIS, and this is done using a single letter, starting at A and ending at Y. Each time the ATIS is updated, the letter moves forward one place (so if the current information is B and an update is published, that new information is denoted with C). This wraps, so an update of information Y will be information A.
You have probably gathered by now that this information is critical to the safe operation of an aircraft and so this feed is clearly not something that you would ever rely on for operational purposes (you should always be tuning into the ATIS frequency at the airport and listening to that), but it is still reliable and fun to keep track of.
Let’s quickly deconstruct an example of the output that this feed provides.
|YSSY||The airport ICAO|
|241111||Date and time (24th of the month, 1111 UTC)|
|EXP INDEP VISUAL APCH||Expect independent visual approach|
|DO NOT PASS THRU ASSIGNED RWY CL||Do not pass through the assigned runway centreline (when on approach/departure)|
|RWY 16L AND R FOR ARRS AND DEPS||Runways 16L and 16R are in use for both arrivals and departures|
|INDEP PARL APP AND DEP IN PROGRESS||Independent parallel approaches and departures are in progress (16L and 16R are parallel runways)|
|CURFEW RESTRICTIONS APPLY FROM TIME 1145||Sydney airport has a curfew limiting flights to certain hours, these restrictions apply from 1145 UTC|
|ARRS RWY 34L AFTER TIME 1200||After 1200 UTC, arrivals use runway 34L|
|ALL DEPS 16 DIR AFTER TIME 1145||After 1145 UTC, departures use runways 16L/16R|
|WIND 130/8||Wind blowing from heading 130, 8 knots|
|WX CAVOK||Weather CAVOK - Clear And Visibility OK (visibility > 10km, no clouds below 5000ft, no forecast precipitation)|
|TMP 23||Temperature 23°C|
|QNH 1012||QNH (mean sea level air pressure) 1012 hPa|
This is just one example of the structure of the ATIS, different phrases and terminology will exist depending on the conditions at the airport.
The data for this feed is sourced from Airservices Australia, an Australian government organisation that is responsible for Australian airspace. Air traffic controllers in Australia are employees of Airservices Australia. The feed itself is written in Python 3.9 and containerised using Docker on my Ubuntu server, where it is hosted. A CI/CD pipeline makes making changes easy, and there is some logging to notify me if the docker container crashes/any exceptions are thrown. That should mean that the feed will be as reliable as possible when relying on external data.
One challenging aspect of the Twitter feed is that tweets are capped to a maximum of 280 characters (at the time of writing) and some ATIS messages are longer than 280 characters. I do some cropping and abbreviation to fit the ATIS into 280 characters without removing any actual information from the ATIS, however, there are special circumstances where issues can occur.
This is where the web feed comes in. While the Twitter feed is a quick and abbreviated version of the airport ATIS, the feed hosted at yssy.apmarkham.com has no such character limit and is a copy of the actual feed with no modifications. Both the Twitter feed and web feed update at the same time, so there will be no discrepancy between the current YSSY ATIS in the two feeds.
A useful verification tool for this ATIS feed is the LiveATC website which provides an audio feed of airport frequencies around the world. It’s a great tool if you, for example, want to listen to the tower frequency at some of the busiest airports in the world. Listening to professional air traffic controllers work is always impressive. Sydney’s ATIS feed is covered by LiveATC and can be heard here. Comparing the output of my feed to the actual recording at the airport that pilots listen to is a great way to verify the authenticity of the data.
This has been a fun little project to work on and it’s built in such a way that it will be very easy to expand to other airports, e.g. Bankstown (YSBK), the airport that I regularly fly out of. Over time it would be great to expand it even further to support any airport in Australia that offers ATIS services, as well as linking into other flight tracking projects that I’m working on.