I started fiddling around trying to create a flight test card template a few days ago. I originally planned to use a spreadsheet, but I found that the fact that the column widths were the same for the whole document was a major constraint. I then tried a word processor, but the obvious need for a lot of cut and paste, and the difficulty in getting the auto number to work properly became a frustration.

I then decided to experiment with something completely different. I used LaTeX to create my POH. And I've been playing around with Perl scripts to run my flight test data gathering. LaTeX files are just text files, and perl is very powerful at manipulating text files. So why not use perl to automatically create LaTeX test cards?

It only took a few minutes to move my list of tests into a MySQL database. Then I created a LaTeX template for the parts of the test card that will be the same for every flight. I added a database table to hold data for each flight (date, crew, purpose, etc). And I added a field in the test point table to hold a pointer to a LaTeX template for that type of test.

The basic flow is:

  1. I decide which test points I will do on the next flight, and put the flight number in the test point database table.
  2. I put the flight details in the flight table (date, crew, test purpose, etc).
  3. I run a perl script which pulls the details for the flight and uses them to fill in the blanks on the first page of the test card. It then searches the database for the list of tests for that flight, grabs the templates for each type of test, and populates the template with the details of that test point from the database (speed, altitude, power, flap angle, etc).
  4. The perl script writes a complete LaTeX file, then runs pdflatex to create a PDF file of the test card, opens the test card so I can inspect it and print it.

It took about four hours of work to get the prototype working. I need to create a bunch more templates for different types of test. But, once that is done I will be able to create a test card in just a few minutes. No more cut and paste errors.