Version 2.2 of Flight Historian is now live.
Table of Contents
Regions
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.](/images/flight-historian/regions.png)
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.](/images/flight-historian/new-flight-menu.png)
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:
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.
Changelog
New
- Created
FlightXML
module for performing lookups on FlightAware’s AeroAPI (formerly FlightXML) - Added ICAO codes to the
Airport
model. - Added Bar Coded Boarding Pass (BCBP) and flight number lookups to New Flight menu
- Created Tail number formatting method (
format
) toTailNumber
module
Changed
- Maps can now be filtered by multiple regions (instead of just World and CONUS)
- Regions are now determined by airport ICAO codes
- Moved existing FlightXML lookups to new
FlightXML
module - Tail numbers are now stored with no dashes, and instead formatted using
TailNumber.format
- Minor UI and bug fixes
Removed
- Functionality for updating existing flights with a new PKPass
is_conus
boolean fromAirport
model, since regions are now determined by ICAO code