Flight Historian Version 2.2: Regions and Flight Lookups

(updated )

Version 2.2 of Flight Historian is now live.


Previously, Flight Historian had offered the ability to show maps with all worldwide flights, or to zoom in to the contiguous United States (CONUS). This had been accomplished by giving all airports an is_conus parameter in the database, which was set to true if the airport was CONUS.

While the majority of my travel was within the US, I’d taken a few trips to other parts of the world, and I wanted to add the ability to zoom in on other regions. I ended up figuring out that I could use airport ICAO codes to identify airports’ regions. Now, Flight Historian has the ability to filter by World, USA (CONUS), Europe, and Oceania. If I need to add a region in the future, it’s as easy as adding a single line of code with the name of the region and an array of ICAO prefixes.

Home page of Flight Historian, showing the new map region tabs.

Map generated by Paul Bogard using the Great Circle Mapper - copyright © Karl L. Swartz

New Flight Updates

While my digital boarding pass import functionality has been immensely successful in saving me time adding flights, it’s not always possible to get a digital boarding pass. Flights that require a seat assignment at the gate, international codeshares, and other sorts of flights can all require a paper boarding pass, which I was unable to import.

However, paper boarding passes still have a PDF417 barcode (which I could scan with a barcode reader app) containing some flight data, so I updated the flight log to support using this Bar Coded Boarding Pass (BCBP) data to pre-populate some new flight fields. Additionally, for situations where I didn’t even have a barcode available, I added the option to search for a flight by airline and flight number.

New Flight menu on Flight Historian, showing options for emailing a digital boarding pass, pasting a barcode, searching for a flight number, or creating a flight manually.

I now have four ways to create a flight: emailing a digital boarding pass, scanning a paper boarding pass barcode, looking up an airline and flight number, and manually adding a flight.

Since the BCBP and flight numbers inherently don’t have as much data as the Apple digital boarding pass, I had to rely much more heavily on looking up information on FlightAware’s AeroAPI (formerly FlightXML). I reworked the entire new flight process to essentially take as much information as it already knew, and use it to look up as much of the remaining information as possible:

Flowchart showing the process for looking up a new flight. Flight Historian takes as much data as is provided from a PKPass, BCBP data, or a flight number, and then looks up the remainder using FlightAware's AeroAPI. If unknown airports, aircraft, or airlines are encountered, a form is displayed allowing it to be created. Once all that is accomplished, a new flight form is displayed, with fields prefilled with data from the previous steps.

Tail Numbers

While US tail numbers are purely letters and numbers (e.g. N909EV), many international tail numbers commonly have dashes in them (e.g., VH-OQI). Previously, I stored the tail number in the database with those dashes present. However, since the dashes are technically optional, I now store the tail numbers in the database with the dashes removed, and I wrote a function to add dashes to tail numbers based on the countries they’re from.