■ When I wrote an Aviation App
In 2019 I received my Pilot License. I was (and still am) enthusiastic about flying and I wanted to dive deeper into the structures of the airspace. I worked a couple of years for German Air Traffic Control (DFS Deutsche Flugsicherung) and picked up a few things about airspace there too. I wanted to build an App for Aviation that visualizes airspace in 3D.
As you remember, early 2020 was a time in which we all learned about the existence of a new virus, and with its spread around the world, aviation came to a halt almost entirely.
Good for me, I thought. No distractions. I can progress in a slow moving game. That will only help my business come to life.
The business failed, and still there was so much to learn. I recently reviewed the old code and extracted the core of it as a static web application for you to play with.
Here’s my journey.
The Idea
In aviation, big or small, it is normal to use software to plan a flight. In flight school we learn to use good old paper charts, and I always have one with me, as a backup. Flight planning, including calculations for the wind are hard to do by hand, so software is a huge time saver. I use ForeFlight from Boeing.
None of the well known flight planning Apps offer a true 3D view of the airspace. ForeFlight has Synthetic Vision, but as I understand it, it is made for situational awareness and not for flight planning.
I wanted to see my flight planning in 3D. I wanted to maneuver through the complex Dutch airspace structures with more confidence. I called the App CONFIDENT.
The Tech
In my aero club, most pilots take an iPad or Android tablet for flying. Because creating two native Apps is a lot of work, I constrained my App to be a Progressive Web App.
Since I wanted to earn money with the App, I decided to use Stripe for subscription handling.
The most interesting part was the airspace data source. Somewhere I have to get all the data for the entire European airspace. I made a contract with Eurocontrol, one of the very few official providers of airspace data in the world, and purchased up-to-date data.
The backend was rather simple. Go for all the number crunching and PostgreSQL to hold dynamic data. The static airspace was stored on disk in JSON files.
Legal
For very good reasons, aviation-related activities are mostly regulated. Being a one-man-business, I had absolutely no interest in dealing with the legal consequences I could run into, so it was clear to me that this App can and will only exist for educational purpose. NO OPERATIONAL USE!
Another aspect was tax. I consulted with my tax advisor. Selling a software subscription throughout the EU is difficult. Don’t take this as advice, but: You need to charge the VAT that applies in your subscriber’s country. Good luck picking VAT regulations for all 31 EASA countries and applying them correctly to the checkout process. I think I managed to do that somewhat well. After all I never sold a subscription, so nobody will blink an eye.
Plain Difficult Stuff
With some decisions I really made my life extra hard. The earth is a spheroid (not a sphere). Roughly speaking, it has the shape of a basketball someone sits on.
I had the will to base my 3D model on the spheroid. Hey, I’m developing a 3D App, I don’t intend to use a 2D projection for this! And this gets really complicated. There are not many software libraries out there. Even fewer in Go. So I translated a JavaScript library including its test cases to Go one day to get all the computations correct. I learned really cool things. How to convert between Ellipsoidal and Cartesian Coordinates. How to do Tweening. What you need to do, given a starting point, a distance and a bearing, to calculate the resulting coordinates on the curvature of our planet. All wonderful stuff! But difficult, error-prone and time consuming.
Less difficult, more annoying
Working with the people from Eurocontrol was a joy! Working with their tech not as much. First, you need a VPN connection to access the data. I’ve worked with different VPNs before. Theirs was special. It only was available for Windows. So I found a way to convert the certificate to a better known format and used the built-in tools on OSX to connect.
The data is released every 28 days in the so called AIRAC cycle, standardized, and already known until the end of 2029. Having one defined date for important changes is a requirement to make international collaboration in aviation possible. On a side note, often times important changes are published 28 days prior their effective date, so you have one entire cycle to prepare until the changes take effect.
VPN nice and good, but it had the speed of a modem. The data I needed was more than 400MB. It takes hours to load this file.
Another obscure detail was the file browser. I thought I could download the data via HTTP, maybe FTP. Instead, I got a Java Applet. It took a while to figure out how, in 2020, I can run and use it, but I somehow managed.
Third and last annoying thing was a hard to find inconsistency in the AIXM data source. Normally you can give latitude and longitude coordinates in either decimal form (51.926517, 4.462456) or in degrees (51° 55’ 35.4612’’, 4° 27’ 44.8416’’). As you can see, the numbers before the decimal point match the numbers before the ° symbol. The numbers following are different, even though they represent the same point on the planet. When you represent degrees as decimal (51.55354612, 4.27448416), nothing adds up anymore.
It is relatively easy to detect these errors. The Minutes (the ‘ symbol) only go to 59. Anything above must be a decimal number. Some countries used one format, some the other. If you figured out the format for one given country, you could stick to this format for the rest of the calculation for this specific country. But man, if nobody tells you before about these inconsistencies, you get some hard to debug effects.
Another anomaly I’ve never understood was why Greece did not have any airspace classifications of A,B,C or D. I was so puzzled that I specifically excluded Greece from the list of supported countries during release. I never figured it out.
Don’t get me wrong here, Eurocontrol does an excellent job providing the data in a reasonable way. Unfortunately, there are more hurdles than technically necessary, and that’s what I call an annoyance.
Business
Cash has to come in, or you don’t have a business. Even more so when I purchased airspace data from Eurocontrol worth a few thousand(!) Euros. Yes, that’s how much it costs, and there’s no other reliable way to get airspace data.
I think what really made this business fail were a few things combined.
- I concluded that if I build a helpful tool for myself, it will be helpful for others too
- I thought purchasing airspace data will amortize with enough subscribers - I never had a subscriber
- I released the App in the biggest decline of Aviation in Aviation’s history, and did not have enough runway to purchase another year of airspace data (without knowing when the pandemic will be over)
- I overcomplicated the business. I built an entire subscription integration, including sign-up emails, forgot password flow, subscription notifications etc. before even testing the App with other Pilots
- I overcomplicated the technical foundation. Would anyone care if the 3D app used the good old projection mapping in 2,5D? In hindsight, I did the technical most sensible. But it was not worth the effort
- Dealing with the mental burden that the pandemic brought to most of us
You know what I am the most proud of? The marketing flyer I designed 🙂
What it could have been
I think understanding airspace in 3D is an advantage for everyone involved. Planning a flight through the airspace, instead of on a map is less abstraction, more reality.
As I wrote in the beginning, I use ForeFlight for flying. A Boeing Company(!). And I wanted to offer an alternative to ForeFlight. Competing with the industry leader, even in a “you don’t have to be better, you have to be different” way, is just really hard. I wanted to try, and it was cool.
Here is the link to CONFIDENT (the Dutch airspace is missing. I lost the computations and it is too much work to restore). It is now free to use for everyone 🙂 I think it is most magical on a (modern) iPad, and for some reason it does not work with the Macbook track pad. Use a mouse instead. Furthermore, this App is archived, so no user support. And: NO OPERATIONAL USE 😉