Airports V2, Part 1: Can AI run air traffic control?
I found an API for flight information and started wondering if AI could be an air traffic controller.
Could I give a model the positions of planes around an airport and let it figure out what to say? Could I listen to the controller and pilots talk while watching the planes move?
That sounded fun, so I started building a little experiment called Shadow Tower.
Now I can zoom into Portland International Airport and see individual gates, jet bridges, terminal buildings, and named taxiways. A simulated plane follows a short taxi route and waits for clearance before entering the runway.
This got away from me a little.

The terminal map is drawn from structured airport features. The plane in this scenario is holding short elsewhere on the field.
First, a radio
The original idea was to look at aircraft around a real airport, give an AI controller that traffic, and let it generate fictional radio conversations with simulated pilots.
I started with Portland International Airport, or KPDX. The app can pull read-only aircraft observations from OpenSky Network and display them on a map. The controller gets a view of the traffic and decides whether it has anything to say. A simulated pilot responds, and those messages can be turned into speech and played through the browser.
Hearing an AI controller talk to an AI pilot while a plane moved across the screen was pretty cool.
But... everything is fictional. The controller can tell a plane to turn, but the real plane keeps doing whatever its actual pilot was going to do. I can listen to a plausible conversation. I can't use the next position as evidence that my controller made a good decision.
So I started building a simulation where the instructions could affect what happened next.
One plane should be manageable
The first departure scenario put one fictional flight on the runway. It waited for an AI-generated takeoff clearance and a pilot readback, then took off and climbed.
A small enough experiment to watch and debug. Also a convenient way to avoid thinking about how the plane got to the runway.
The flight has an identity and an event history in SQLite. Radio transmissions, accepted clearance, and simulated phase changes belong to that flight. A reset creates a new one. There is also a separate cockpit channel, which currently amounts to one AI-generated pilot remark during initial climb.
A little positive rate from the cockpit while the plane climbs is pretty neat.
Then I started wondering whether the speed and altitude made sense together.
That led to OpenAP, an open-source aircraft
performance toolkit, and then to a partial Rust port called openap-rs.
Naturally, the airport project needed a second project.
The port follows OpenAP's deterministic climb generator for the parts I need, with output compared against the Python implementation for the A320, A321, and 737-800. Shadow Tower projects the generated climb distance along the runway heading. The original scripted departure is still available too.
There is plenty more to say about that detour. But the next thing that bothered me was on the ground.
Where does a taxiway come from?
A line representing a runway was enough when the plane appeared on it. Once I wanted the plane to taxi, I needed to know where the pavement actually was.
I started with runway endpoint and width data, generated approximate pavement polygons, and compared them with aerial imagery. That gets you a reasonable rectangle. It does not get you the curved connector between a taxiway and a runway.
My next question was whether an agent could inspect an aerial image and trace that connector. Big slabs of pavement seemed like a reasonable place to start.
I used a georeferenced aerial image of PDX and an FAA airport diagram. The image supplied the visible shape; the diagram supplied a reference for the name and layout. The first experiment focused on a short section of K1 leading toward runway 10L.
The agent chose points in the image. A script converted those pixels into geographic coordinates and drew the proposed route back over the original image so I could inspect it.
The first trace followed the inside edge of the pavement too closely.
That was visible in the overlay, so I corrected it and kept the scope small: one connector, a hold point, and a path onto the runway. The rejected trace is still saved beside the corrected one. It is part of how I got there.

Cyan approaches the hold point. Orange continues onto the runway after the simulated clearance. This is an approximate trace, not operational guidance.
I also traced a partial pavement boundary and added a check that the planned centerline stays within the pavement union. That catches a route cutting across a gap even when its endpoints are inside. It doesn't establish that an entire aircraft fits through a turn. That needs more work.
The little tracing tool takes image bounds and coordinates rather than assuming one imagery provider. The PDX download recipe is separate. I could see this becoming useful for other aerial features eventually, but airports are enough of a rabbit hole for now.
There was more public data than I thought
I kept asking whether I really needed to create all this myself.
Surely there was at least a list of taxiways somewhere. What about buildings? Could I show how the terminal connected to the apron?
Earlier attempts to retrieve OpenStreetMap data through Overpass hadn't worked. A bounded request to the main OSM map API did.
And there was a lot in it.
My extract contains 111 taxiway features, 35 taxilanes, 14 aprons, 53 gates, 45 jet bridges, and six terminal features, along with other buildings and holding positions. Those are feature counts from a bounded extract, not a claim that I have a complete inventory of the airport.
But suddenly the map had concourses. Zoom closer and there were individual gates. Little jet bridges reached out from the buildings, with parking-position lines and taxiways beyond them.
My reaction was mostly swearing.
I had to ask whether this was an image slapped on the screen or whether the app actually knew about all those things.
It knows about them.
An offline importer converts the OSM XML into GeoJSON. Each feature keeps its coordinates, source ID, tags, and available name or reference. Taxiway lines retain their original node IDs. The Canvas renderer draws those features, and the bundle lives in the app, so the display doesn't need a live map service. The source is OpenStreetMap contributors, under the ODbL.
I replaced the separate airport and close-up views with ordinary pan and zoom. Then I noticed the radar circles staying centered while the airport moved underneath them. Those went away too. A scale bar and north indicator make more sense for the map this had become.
Finally, I asked to hide the traced pavement patch because it looked bad against the new map. The geometry still exists for validation. It just doesn't need to be painted over everything.
A session of being impressed by polygons, followed by asking for fewer polygons. Software development.
Giving the controller somewhere to look
The structured data is what makes this exciting beyond the screenshot.
A controller could ask where K1 connects, which runway a route crosses, or how to get from a particular gate to a hold point. I want those answers to come from the airport model.
I haven't built that whole query and routing system yet. Lines that look connected on a map still need checking. Missing segments, aircraft clearance, runway crossings, and occupancy all matter before I can call something a valid taxi route.
An MCP server seems like a useful interface eventually. The controller could inspect taxiways and request routes through tools. Routing code would calculate and validate the path; the model would choose among valid options and issue instructions. The same functions could serve the app directly first.
That is the division I want throughout the project. The model proposes an action. The simulation owns the state transition and records what happened.
Shadow Tower is Rust with an Axum server, HTMX, and a Canvas map. The departure logic can run without the browser or a model, which lets me test things like holding indefinitely until clearance is accepted, reserving the runway during lineup, and continuing into takeoff without teleporting the aircraft.
That first traced demo started on K1. It didn't depart from one of those nice gates yet. The buildings and taxiways gave me the reference data for the next step, but displaying them hadn't magically implemented airport operations.
Now I can watch the whole trip
The plane now starts at C12, pushes back, taxis to runway 10L, flies a fictional local circuit, lands, exits via A4, and taxis back to the stand. One flight identity and an event history through the whole trip.
It needs separate permissions for pushback, taxi, takeoff, landing, and taxiing back in. The model supplies the controller decisions and pilot readbacks. The simulation checks them before allowing movement. The routes are assigned in advance; the model isn't inventing a taxi route or flying the aircraft's controls.
And it's up at shadowtower.dev.
Everyone watches the same airport. A fresh flight runs each hour using Particle-1, then the last completed flight replays between runs without more model calls. The page labels which one you're watching. It's transcripts only for now, so the pretend radio is something to read rather than listen to.
The first public flight got all five clearances and made it back to C12. Watching that happen on the actual site was a little surreal. I know how the pieces fit together. It's still a computer asking another computer if it can leave the gate, and waiting until the answer checks out.
One plane becomes two
The next question is what happens when somebody else wants the runway.
I now have a separate two-flight experiment running without the browser or a model. It uses synthetic stands and simple movement timings. In the first scenario, one returning flight waits eight simulation ticks for its destination stand. The other then waits two ticks for the runway. Both eventually park.
That waiting is the interesting part. A clearance can't quietly give two planes the same resource, and the runway stays reserved until the aircraft finishes its exit. The experiment records accepted clearances and blocked requests, so I can replay the decisions and check the result.
Those two planes aren't on the public map yet. This is the deterministic baseline for getting them there, before adding model decisions to a situation where the planes can actually get in each other's way.
Eventually I'd like to simulate a day of traffic and compare different ways of coordinating it: one controller, several agents, deterministic rules, or some combination. There is a lot between here and there.
For now, I keep watching the plane come home.
This is the kind of project I would have struggled to get this far with a year or so ago. There are too many unfamiliar pieces to hold in my head at once: aircraft performance, geospatial data, taxiway geometry, radio procedures. Working with an agent lets me follow those questions far enough to get something on screen, inspect it, and find the next thing that needs fixing.
I wrote before about building things because the idea is fun. This is very much one of those projects.
I wanted to hear a pretend controller talk to a pretend pilot. Now I'm looking at gate C12 and wondering who gets to use it next.