Projects: Tags: AIDAP: Glacier Park International Airport

Information

Timeline: Fall 209
Application Type: Website
Status: Maintained
Technologies: PHP, MySQL, AIDAP, PDF
Partners: BWD Staff

This project was a good chance for me to integrate a number of technologies. The client (an airport) wanted to collect information about current flight conditions so that pilots could see it before their flient. The client decided they wanted to display the information two ways: on their website and as a PDF that the pilots could print out and take with them.

The first source of information is a report on the current runway conditions. This data is periodically collected by airport personnel. The second source of information was from the FAA itself, in the form of Notices to Airmen (NOTAMS). These are messages describing hazards at or en route to airports.

The system for collecting runway conditions was a relatively simple matter of collecting data in a form and displaying it later. The interesting part was getting the NOTAMs. The FAA provides a server for accessing the data. Quite a bit of my time was devoted to establishing communication between the client's web server and the FAA server. Once this was finished, it was easy to translate the XML servev via Aeronautical Information Data Access Portal (AIDAP) into a format that could be stored in the client's database.

One interesting problem we ran into was the time limit for requests to the FAA's server. In their documentation they specified that a client not post requests to the server more than once every five minutes. So I had to write a bit of code to throttle the connections so that at most one request was made every five minutes. I did this by caching the latest data and keeping track of the last FAA server access.

The other complication for this site was that there had to be three tiers of access. One was for the pilots, who would just pull the information. There was another tier for the airport staff who would be posting airport conditions. The final tier was for airport supervisory staff, who would have access to some administrative functions. This was easy to handle with the Authorization module of the Nifty CMS Framework, however. We just created permissions for each tier of access and then assigned those to appropriate groups that the individual user accounts would be assigned to.

The final piece of the puzzle was displaying the NOTAM information. The web-based display was a pretty simple job. The PDF generation was a bit more complicated. I initially wrote the PDF generation code using one PDF library, but when we moved the site live we found out that the library in question wasn't supported. Luckily, the library that I used (this one) was pretty difficult to work with to begin with, so I had already written a wrapper class to make using it more bearable. This class abstracted away most of the direct PDF calls, and had methods to create pargraphs, centered lines of text, and lines and shapes. It was a simple matter to just adapt the library to use FPDF. If I hadn't had that wrapper class, I would have had to make a lot of script-level changes, which would have taken substantially more time.

Gallery