<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Danny Cai on Medium]]></title>
        <description><![CDATA[Stories by Danny Cai on Medium]]></description>
        <link>https://medium.com/@dwcai?source=rss-640ec17f9dac------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Danny Cai on Medium</title>
            <link>https://medium.com/@dwcai?source=rss-640ec17f9dac------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 14:59:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dwcai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Python for Air Traffic Control? A quick history callback]]></title>
            <link>https://medium.com/@dwcai/python-for-air-traffic-control-a-quick-history-callback-dc47267a83ac?source=rss-640ec17f9dac------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc47267a83ac</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[air-traffic]]></category>
            <dc:creator><![CDATA[Danny Cai]]></dc:creator>
            <pubDate>Fri, 13 Feb 2026 05:15:27 GMT</pubDate>
            <atom:updated>2026-02-14T01:07:55.250Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*rIo-5gOMOJ9-S5mEvL3H3g.png" /></figure><p><strong>Intro</strong><br>Python deserves its place in the spotlight of safety. Focusing on the company Frequentis, a major player in defense and aviation from 2000–2010, they developed solutions for air traffic control monitoring. These solutions included a customizable user interface called “TAPtools” (Tower and Airport Tool Segment for Air Traffic Control) used in both civilian and defense towers.<br> <br> <strong>The Tool</strong><br>This tool is essentially an air traffic control system with a customizable interface. Which addresses the fact that with each airport there are different situations in terms of number of planes, geography, and runway dimensions. So, a single, fixed interface cannot meet all operational needs in the real world. Which is why this software is crucial.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/1*iNtXKtFSi0bg_Sjhq7cviQ.png" /></figure><p><em>TAPtools® user interfaces developed by Frequentis</em></p><p><strong>How It Worked</strong><br>TAPtools builds the interface for the operator but is executed by another program called “PanMachine” on in-house hardware known as the “PowerPanel,” a 66MHz PowerPC with 32 MB RAM and a 12&quot; touch screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/713/1*ZLZGzqSTt1KewnBOXGzO9g.png" /></figure><p><strong>The Issue</strong><br>The Finnish Civil Aviation Administration (FCAA) wanted to not just run the software on the in house “PowerPanel” but also on a web browser. So Frequentis went to work making that happen keep in mind their original software language was Lua.</p><p>It had its fair share of drawbacks such as variables are global by default unless explicitly declared local, Tables are flexible but can be misused (numeric vs string keys). Error reporting is minimal, and Lua lacks a built-in list structure and cannot run natively in a Java environment.</p><p><strong>Python to the rescue </strong><br>Python, written in C, can be compiled on most C compilers, making it portable across systems. Jython, a Java-based implementation of Python, allowed the same code to run inside a Java web environment.</p><p><em>“C-Compliers are programs that translate code written in the C programming language into machine code that a computer’s processor can execute essentially making it possible to turn source code into runnable programs.”</em></p><p>The PowerPanel lacked a hard disk, so local compilation was impossible. Developers cross-compiled Python on another computer to generate executable code for the PowerPC. After this one-time setup, Python bytecode created on any machine could run on the PowerPanel.</p><p>Python bytecode is an intermediate, low-level version of Python source code (.py files) automatically generated when the code runs. The Python interpreter executes this bytecode, allowing programs to run on different hardware without rewriting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/474/1*nnJPBUTnYhA_fC-GQtsExw.png" /><figcaption>Python Bytecode Diagram</figcaption></figure><p><strong>Why Bytecode?</strong><br>Rather than turning every air traffic control program into hardware-specific machine code, Python first converts the source code into portable bytecode. That bytecode is then run by the Python interpreter, such as CPython, which has been compiled for the target hardware.</p><p>Portability : The same interface code could run on different hardware without being rewritten. <br> Easier cross-compiling : The interpreter only had to be built once for the target system. After that, the same Python code would run on it. <br> Faster updates<strong> </strong>: Developers could ship new Python code instead of rebuilding everything from scratch. <br> Less platform dependence: The core application logic stayed the same across systems.</p><p>Simulated Lua Code:</p><pre>-- Lua: globals by default, weak error handling<br>aircraftList = {}<br><br>function addAircraft(id, altitude)<br>    aircraftList[#aircraftList + 1] = { id = id, altitude = altitude }<br>end<br><br>function updateAltitude(index, newAltitude)<br>    aircraftList[index].altitude = newAltitude  -- no type checking<br>end<br><br>function getAltitude(index)<br>    return aircraftList[index].altitude<br>end<br><br>addAircraft(&quot;FIN123&quot;, 12000)<br>updateAltitude(1, 12500)<br>print(getAltitude(1))</pre><p>Issues: Variables like aircraftList are global by default, tables can be misused, and there is no built-in error handling.</p><p>Simulated Python Code:</p><pre># Python: local variables, classes, structured error handling<br>class Aircraft:<br>    def __init__(self, flight_id, altitude):<br>        self.flight_id = flight_id<br>        self.altitude = altitude<br><br>class RadarSystem:<br>    def __init__(self):<br>        self.aircraft_list = []<br><br>    def add_aircraft(self, flight_id, altitude):<br>        self.aircraft_list.append(Aircraft(flight_id, altitude))<br><br>    def update_altitude(self, index, new_altitude):<br>        try:<br>            self.aircraft_list[index].altitude = new_altitude<br>        except IndexError:<br>            print(&quot;Error: aircraft not found&quot;)<br><br>    def get_altitude(self, index):<br>        try:<br>            return self.aircraft_list[index].altitude<br>        except IndexError:<br>            return None<br><br># Example usage<br>radar = RadarSystem()<br>radar.add_aircraft(&quot;FIN123&quot;, 12000)<br>radar.update_altitude(0, 12500)<br>print(radar.get_altitude(0))</pre><p>Advantages: Variables are local by default, classes organize data, and structured try/except error handling prevents crashes. Clear lists and stronger typing make the code more readable, maintainable, and safer for critical systems.</p><p><strong>Conclusion </strong><br>Switching from Lua to Python halved the code to around 5,000 lines and enabled browser support. Python tied the system together, improved readability, and simplified debugging thanks to runtime error handling. In short, Python was essential for creating a more maintainable, portable, and reliable air traffic control system.</p><p>Citations<br> <a href="https://www.python.org/success-stories/frequentis-taptools-python-in-air-traffic-control/">https://www.python.org/success-stories/frequentis-taptools-python-in-air-traffic-control/</a><br> <a href="https://www.frequentis.com/en/defense-usa/surveillance-for-air-traffic-control">https://www.frequentis.com/en/defense-usa/surveillance-for-air-traffic-control</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc47267a83ac" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>