I realise that I need to obtain the DM’s contact details, and differences between versions of the airplane performance code are resolved.

Parklands library

It was over to Parklands at lunch today for the dnd group, but at 12:30 nobody was there. After browsing around for a while it was back home again to make further progress on some programming. I’ll have to get the DM’s contact details at some stage so that I can receive updates about ongoing plans.

Version conflicts

The different versions of the aircraft performance program (the Basic one we started with, the C program, and the JavaScript converted one) have different outputs, which is not good because they have the same inputs. Those programs have come from untrustworthy sources.

The best way to resolve this is to work from the original Fortran code code itself, and make the other languages consistent with that one. The trouble is that the pdf of the book that Henry has, doesn’t contain the original fortran code. Instead, someone has twinked some parts out, and written over it to arrive at some kind of Basic code instead. How can I get back to the original fortran code?

Amazon.com lets you look inside their books, and in this case with A Practical Guide to Airplane Performance and Design, Amazon lets you look at every single page of the book. I can scroll down to the code section at page 160 to get the original Fortran code, and with some fancy web browser footwork, those pages can be saved on to the computer too. Now that we have the original Fortran code, it’s just a matter of entering it in, using the Open Watcom Fortran Compiler, getting used to specific indentation requirements of Fortran, and confirming that it works as expected.

The other programs can all now be adjusted so that they all have the same desired output, As an example, one of the causes for differences is that the wing span was 20 feet 10 inches, but the C code was using 20.83 whereas the Fortran code had 20.833. It may have been more accurate as 20 + 10/12 but I’m going to keep version 1.0 consistent with the original Fortran code.

Now I can convert that Fortran code back to JavaScript, and I was tempted to use Summer of GOTO to more easily convert things, but after a studying the intention of the original Fortran code, I able to unwrap the goto madness in to well-structured code that achieves the same desired end results.

Now I can work on version 1.1, where improvements are made to the overall structure of the code, and other advances are made.

Advertisements