HP48SX FLIGHT PLANNING/TRACKING LIBRARY { 1786 FLIGHT LIB } and TIMER LIBRARY { 1785 TIMER LIB } by Steve Mauser Copyright, 1991 Victoria Designs 377 Nature Trail Lane Murrysville, Pa 15668 TABLE OF CONTENTS I. INTRODUCTION II. DESCRIPTION 1. Flight Activities a. Flight Status b. Start/Ckpt Xing/Close c. Enroute Calculations i. TIMER ii. TAS/IAS/Alts iii. Timed Groundspeed iv. Calc. Winds v. External Routines d. Reset Last CKPT Xing e. CLOSE PLAN 2. Calculate Flight Plan 3. Enter/Edit Route Data a. Load Existing Route b. Store Current Route c. Extend/Add CKPTS d. Edit CKPT(s) Data e. Erase Current Data 4. Enter/Edit Winds a. Add Data b. Edit Data c. Erase Data 5. Select Plane III. PROCEDURES APPENDIX A Downloading and Linking the Library APPENDIX B Programming Airplane Characteristics APPENDIX C Warranty APPENDIX D Registration HP48SX FLIGHT PLANNING/TRACKING LIBRARY { 1786 FLIGHT LIB } and TIMER LIBRARY { 1785 TIMER LIB } I. INTRODUCTION The Flight Planning/Tracking Library provides a menu-driven library which facilitates flight planning calculations - - weight/balance - winds aloft - route planning - flight plan times and headings - fuel requirements and flight tracking and in-flight calculations - - audible alarms for expected checkpoint crossings - TAS/IAS conversions - pressure and density altitudes - groundspeed determination - winds aloft as well as providing an interconnection to the TIMER LIB, a large- digit timer function for holds and approaches. The library takes over the HP48SX while executing the various functions, but permits normal operation of the HP48SX upon exiting the library menu system while remembering current data upon re- entry to the library. Alarms will break-in on operations outside of the library functions, but will not break in while in the flight library execution mode. The flight library requires 29+ kb of memory and requires that data for the current trip be stored in user memory. The timer library requires 5 kb of memory. These sizes dictate that the flight library be stored in an external memory card, while the data for the flight library and the TIMER LIB can be stored in the calculator memory. The flight library menu contains only one executable - the PLANr.dvr function. The timer library menu provides only the TIMER executable. Short programs in the HOME directory can be written to permit rapid access to the planner/tracker and the time. However, the timer can also be accessed through the flight library's menu system. The remainder of this writeup provides a description of the operation for the flight planning/tracking library, menu by menu, instructions for downloading and storing the library, and a registration form for receiving future versions of the library. II. DESCRIPTION This following is a description of the use of the flight library only. A description of the operation of the timer library is included under the "Enroute Activities" menu of the flight library. The flight library provides numerous planning, tracking, and in- flight computations for basic small airplane flying. While most calculations are as precise as the data provided, the library only provides accurate flying information for altitudes up to 12,000 ft. MSL. For instance, in the IAS/TAS and pressure and density altitude calculations, conversion approximations are only valid to this 12,000 ft. MSL level. While the flight library is stored in ROM memory, it does require the use of user RAM for data storage and manipulation. Specifically, the library REQUIRES that a directory named AIR be created, and that this directory contain two subdirectories, named RTE.FILES and PLANES. Permanent storage of flight plans and airplane data are located in these two subdirectories, while current flight plan data are stored in the AIR directory. After loading the library (see Appendix A), the library can be executed from any directory/subdirectory, will move to and execute in the AIR directory, and should then return to the directory/subdirectory from which it was called. Except for the airplane-specific data files stored in the PLANES subdirectory of AIR, all data files are generated and stored from within the library, so little original programing experience is necessary to use the library. Sample copies of one airplane's data files which would be stored in the AIR/PLANES subdirectory is included with the library files, and are listed in Appendix B. The following description of the library functions follows the menus which are the cruising elements in the library. To move around the menus, the arrow keys are used to move the cursor to the selected activity, and the ENTER key is used to select the activity. The EXIT key in the menu is the only way to back up into the previous menu or exit the program. The discussions in each of the following sections correspond to menu items and are discussed in the order in which they are presented in the menu screens. The SELECT ACTIVITY menu is the introductory screen and provides entry into all the other functions provided by the library. These other functions are as follows. 1. Flight Activities The flight activities item will provide access to functions normally associated with in-flight procedures. These include the current flight status, confirmation of checkpoint crossing, flight calculations, an Oops function to reset the last checkpoint crossed, and a CLOSE PLAN function which discontinues the flight plan tracking function. a. Flight Status The flight status selection presents a screen which gives the current status of the flight. This includes the previous checkpoint name and crossing time, the current checkpoint name, expected minutes to crossing, the estimated crossing time (in ZULU), the estimated nautical miles to crossing, the magnetic course to the checkpoint, and the estimated heading to fly to the checkpoint. This information is also provided for the checkpoint immediately beyond the upcoming checkpoint. On pressing the ENTER key, the flight status screen will display the total time in flight (in hours), the estimated time remaining (in hours), and the estimated fuel remaining in the tanks (in hours). Pressing ENTER again, will return to the FLIGHT ACTIVITIES menu. b. Start/Ckpt Xing/Close Selecting this menu item will start the tracking function, indicate that the upcoming checkpoint has been crossed, or will indicate the crossing of the final checkpoint (destination) and close the tracking function. The user is asked to confirm checkpoint crossing, and then the groundspeed along the direct checkpoint course is calculated. Following this, if the actual heading flown is entered at the request, the actual winds encountered will be calculated and summarized. [NOTE: The user may call up this function and delay pressing the ENTER key until actual checkpoint crossing is made. The time of crossing is taken as the instant that the ENTER key is pressed, with only a "Y" (default value) on the entry line.] This routine returns to the Flight Activities menu. To check that the function performed properly, select the Flight Status function from the same menu, which should show that the checkpoints have been incremented. c. Enroute Calculations Selecting this item will call another screen from which to select calculation functions which are generally used during flight. The selections are as follows. i. TIMER The timer function is a countdown timer which, when finished counting down, will revert to counting up until it is stopped. Any time for countdown can be entered, up to 9 minutes and 59 seconds. If the timer has been used at any time previously, the timer will start with the last countdown time. The timer is started by pressing the GO menu key, and is stopped by pressing the STOP menu key. If the timer is stopped (either when it is started initially, or after a countdown sequence is complete) and the STOP key is pressed, the timer will ask for the initial countdown time to be entered. The new time can be entered at this point, or, if ENTER is pressed with "0" for the input time, the system will reset to the Enroute Calcs menu, exiting the timer function. The last countdown time is saved. ii. TAS/IAS/Alts Selecting this menu item will result in a request for the current indicated altitude and the altimeter setting. Next, a request is made for one airspeed value - either theIndicated Air Speed or the True Air Speed - and for the Outside Air Temperature (degrees C). From this information, a screen is provided which summarizes the estimated altitudes (indicated, pressure, and density), and the indicated airspeed and true airspeed. (These estimated values are based on a three-point exponential fit of the standard curves of temperature, pressure, and density, and a 2% per 1,000 ft. increase in TAS over IAS, corrected for density altitude) iii. Timed Groundspeed This selection enables timer functions which are used to compute the actual groundspeed, and, if the actual heading flown is given, will calculate the actual winds aloft being experienced. The first time this option is selected, a request for the distance to be timed is made. Upon entering the distance, AND upon pressing ENTER, the timer will commence. Upon entering this menu option the second time, pressing ENTER will stop the timing run, and will result in the presentation of the calculated groundspeed, and then a request for course (default is the course for the leg being flown from the flight plan) and heading flown. Providing this latter data will result in a calculation of the winds aloft experienced. iv. Calc. Winds This selection provides a summary of the LAST actual winds aloft calculation. Wind aloft calculations can be those performed at the last checkpoint crossing, or can be a result of requesting the Timed Groundspeed option, also provided in this menu. The summary screen in this selection gives the data for the leg which was timed, the calculated groundspeed and the heading flown (if entered) for this leg, the calculated winds experienced, and the winds which were forcast and interpolated for this leg and altitude. v. External Routines The library permits the user to execute additional programs which are written and stored in the { HOME AIR } directory. When the Enroute Calculations option is invoked, the library will form a temporary menu of all the program variables in the { HOME AIR } directory. To execute a selected program, simply press the appropriate menu key. After execution of the external program, the execution will return to the flight library. d. Reset Last CKPT Xing In the excitement of flight, the checkpoint crossing for the next checkpoint may be entered before the actual crossing time. To reset the last checkpoint which is now incorrectly noted as being crossed so it again becomes the next checkpoint to be crossed, select this option. No screen will be provided, but the result of this operation can be displayed by requesting the Flight Status option in this same menu. e. CLOSE PLAN If at any time you wish to discontinue tracking of the flight plan, this option will shut down the tracking function. While selecting the Start/Ckpt Xing/Close option in this menu will close the plan upon its activation over the last checkpoint (destination), this selection will do the same, except it will conclude trackingregardless of the current location within the plan. This has also been considered to be a shortcut "panic" button. 2. Calculate Flight Plan Activating this option, providing the checkpoint route data has been input (see Enter/Edit Route Data below) and winds aloft have been entered for each location cited in the checkpoint data, will calculate the flight plan. Selecting this option will step through each location, giving the calculated groundspeeds for the winds aloft data for 3, 6, 9, and 12,000 feet, and interpolating inbetween (i.e. 4,500, 7,500, and 10,500 feet), and will request the altitude to be flown TO this checkpoint. Following the altitude request for the first checkpoint and for the last checkpoint, the program asks for a time adder which it will add to the calculated time for the leg. This tinme adder should be used to account for climbing time, and/or vectoring time. Upon calculating all of the data for the plan, a summary is provided for the cummulative nautical miles to be flown (between checkpoints), the total time expected to be required for the flight, and the estimated amount of fuel required for the trip. 3. Enter/Edit Route Data This function provides for entering, and storing for future use, the route data for the flight. A second menu screen is brought up when this option is selected to provide the various options. Route files are stored in the AIR directory, RTE.FILES subdirectory. A description of each of the options on the secondary menu is as follows. a. Load Existing Route This selection will drop into the RTE.FILES subdirectory and prompts for the name of the route file to load. Press the appropriate menu key to load the desired route filename. b. Store Current Route After inputing a route from within the flight planner, the route information can be stored in the RTE.FILES subdirectory using thisselection. This selection drops into the RTE.FILES subdirectory and prompts for a route file name (suggest a format similar to AGC.CAK for Allegheny Airport to Clarksburg). Upon pressing enter after providing a name, you will be returned to the EDIT/ENTER Route Data menu. c. Extend/Add CKPTS This selection provides for starting a new route file or for adding extra checkpoints to an existing route file. The route file must be the current route file (i.e. a new route being entered, or a route loaded from the Load Existing Route feature).The data requested in this option is the LOC identifier (three alpha-newmerics), the winds aloft location (three alpha-numerics), and the checkpoint data (mag. variation, distance TO, and heading TO). Completing the data for one checkpoint will generate a request for the next, until ENTER is pressed when asked for the next checkpoint LOC identifier. d. Edit CKPT(s) Data This menu item permits modifying the route. First, the checkpoints in the route are listed, and the user is asked if any checkpoints are to be deleted. To delete the checkpoint, simply enter the index number in the table for the appropriate LOC to be deleted. Next, the user is prompted for changing the checkpoint order. To change the order, enter the checkpoint index to move and then the desired index for that checkpoint. Finally, the user is given the option to Review/Edit the data for each checkpoint. In this function, the data for each checkpoint is shown and editing is permitted. e. Erase Current Data Use this option to completely clear all of the checkpoint data (prior to entering a new set of route data). 4. Enter/Edit Winds This series of functions provides for entering the current winds aloft data. The secondary menu consists of the following operations. a. Add Data Use this option to enter new data or to extend the existing winds aloft data. Since the locations for winds aloft are not connected to each other, any location for winds aloft can be entered. However, only those locations which match the locations specified in the checkpoint data are actually used. Winds aloft are entered as they would be reported in written reports, as a four-digit number. The first two digits are the "from" bearing of the winds, and the second two digits are the speed. The program recognizes "99" entries for light and variable winds, but, since we are dealing with light aircraft, it is not programed to recognize coding for winds in excess of 99 mph. Winds can be entered for from 3,000 to 12,000 feet. Entries must be made to bracket the altitude to be flown (i.e. the altitude of flight must be equal to one of the winds aloft altitudes or lie between two winds aloft altitude entries). If the flight altitude lies outside of the given wind altitudes, the flight calculation mode will later use zero winds aloft. b. Edit Data This function provides for deleting an individual location's winds aloft data, or for editing individual locations' data. To delete an individual location's data, simply enter the location's index number from the displayed list of winds aloft locations. In editing the data, each location's data is presented individually and the user is permited to over write the existing data. The data is presented in vector notation, using a TRUE from bearing. Because of the vector notation, bearings from 180 degrees to 359 degrees will be shown as a negative value. c. Erase Data This selection provides for completely erasing the current winds aloft data prior to beginning entry of new data for the immediate flight. 5. Select Plane Selecting this option drops the library into PLANES subdirectory and permits the user to use the HP48SX menu keys to enter the airplane tail number. The tail number represents a routine which then loads the weight and balance calculation information for the airplane, theweight and balance envelope for plotting the calculated weight and balance within the envelope, and the fuel burn rate for the airplane. No provision has been made for entering the unloaded airplane characteristics from within the library. Details on setting up the routines for each airplane are provided in Appendix B, as well as samples of the routines which are provided with the library files. III. PROCEDURES The procedures for using the library are generally in reverse order from the initial menu screen. The most important functions, those performed during flight, are at the tops of the menus, while the more casual planning functions are at the bottom of the menus. This permits a "no-look" procedure for calling the library, pressing ENTER twice, and immediately toing to the flight status screen (probably the most-used function during flight). To ready the system for a flight, the following order of procedures is recommended. 1) Enter the library 2) Select an airplane 3) Select the route menu and load or enter the route (also store the route after entry, if desired) 4) Enter the winds aloft data for the locations referenced in the route 5) Calculate the flight plan 6) Check the flight status to verify that things are as expected 7) Set the cursor on the Start/Ckpt Xing/Close option of the Flight Activities menu - DO NOT press ENTER 8) Press ENTER just prior to the takeoff roll. The tracker is now in progress and an alarm will sound approximately two minutes prior to each checkpoint's crossing. When the alarm sounds, either confirm crossing by pressing ENTER with the "Y" on the entry line, or press N (STO) and press ENTER. If you press "Y", the program will begin prompts for groundspeed and winds aloft calculation. If you do not press "Y", then the program will go back to sleep for one minute and will resound the alarm. This procedure continues until you confirm checkpoint crossing. APPENDIX A DOWNLOADING AND LINKING THE LIBRARY APPENDIX A After downloading the flight and timer library files from the bulletin board, or from a file on a disc for your PC, download one of the library files to the HP48SX. To do this, go to the HOME directory and set up for a BINARY file transfer (in the SETUP sub- menu of the I/O menu). Following the transfer, and depending on which file has been transfered, there will be a file in the current directory named FLYING or TIMER. Store this file in a port. For example, If you have one 32 kb card, the flight library should be stored in the memory card port, and the timer in port 0. By pressing the FLIGHT menu key, a new menu will appear which reads "PLANr.dvr". The "r.dvr" does not appear in the menu, but PLANR.DVR is the complete name of this flight planner entry point. From this point, any of the planner/tracker functions can be accessed. To store the timer library in the calculator memory, repeat the above procedure using port 0 (i.e. :0:Y - where Y is any number). If you have a memory card which is larger than 32 kb, the timer library can also be stored in the memory card. To do this, follow the same instructions as for storing the flight library, above. Use of the library requires making a directory and two subdirectories. The directory must be named AIR. To do this, in the HOME directory (blue-shift ' ), enter the name AIR ( alpha, alpha, AIR, ENTER), enter the memory mode (orange-shift VAR) and select CRDIR. Upon pressing the VAR key, you should now see the AIR directory in the variable list. To make the subdirectories, press the AIR menu key, and create a directory named PLANES just as in creating the AIR directory. Follow this by also creating the subdirectory RTE.FILES under the AIR directory. To permit more rapid access to the library, a program can be placed in the HOME directory. The program consists of simply: << 1786 MENU PLANR.DVR KILL >> [Note: The program above is on the disk as 'FLY'. -jkh-] The KILL is important to clear and return to the stack display. Storing this program in the HOME directory and executing it will immediately call up the first menu in the library. Exiting the library will return to the directory from which the library was initiated. APPENDIX B PROGRAMMING AIRPLANE CHARACTERISTICS APPENDIX B Entering individual airplane data requires a small amount of programming. For each make/model of airplane, two routines are required - a routine which performs the calculations for the weight and balance and a routine which plots the weight and balance envelope and plots the actual weight and balance on this envelope. For each individual airplane tail number, a single routine is needed to place the default unloaded airplane characteristics into the weight and balance calculation routines, and to call the appropriate routines for its make and model. These three routines are all placed in the PLANES subdirectory of the AIR directory. After all the airplanes are entered, use the MEMORY (orange-shift VAR) ORDER functions to place all of tail number routines at the front of the menu list. This makes it more convenient to load the routine from the library's Select Plane menu item. Each of these routines are discussed in the following sections. 1. Plotting Routine This routine requires the most programming patience. The routine should be named to start with the letter "P" and further named to correspond with a type of airplane (i.e. P152, P172, PPIPARCH, etc.) since this routine can be used for any airplane tail number which corresponds to this make/model of airplane. The purpose of the routine is to draw the weight/balance envelope for the airplane. The procedure used is to draw lines between coordinate points using the HP48SX's graph LINE function. All coordinates are in a (X,Y) format, where X is usually in thousands of in-lbs and Y is the weight in lbs. The listing below is for the PPIPARCH routine which describes the weight/balance envelope for the Piper Archer: \<< ERASE { (81.0000000004,1200) (94.0000000004,2600) X 0 { (81.0000000004,1200) "C.G.(aft.datum)" "WT" } FUNCTION Y } 'PPAR' STO DRAX LABEL (81.9999999998,1200) (92.9999999989,1200) LINE (92.9999999989,1200) (92.9999999999,2550) LINE (92.9999999999,2550) (88.5000000017,2550) LINE (88.5000000017,2550) (81.9999999984,2050) LINE (81.9999999984,2050) (81.9999999998,1200) LINE MOMT WGHT / 1000 * .1 - WGHT 10 - R\->C MOMT WGHT / 1000 * .1 + WGHT 10 + R\->C BOX { # 0h # 0h } PVIEW \>> In the above listing, the first two coordinates in the first list ( {} ) are the lower left corner of the plot area and the upper right corner of the screen (resulting in a screen a little larger than the weight/balance envelope). The next coordinate in this same list is the location on the screen where the axes should cross each other (usually, also the lower left-hand corner of the screen). The other elements in this first list provide the axes labels and the type of function to be plotted. No other changes should be necessary for this list. The next series of statements simply draw the outline of the envelope. This can consist of as many lines and breakpoints in the envelope as you feel are necessary to model it. Each line is defined by the coordinate of the starting point (usually the end of the previous line) and the coordinate of end point, followed by invoking the HP48SX LINE function. 2. Weight/Balance Calculation Routine This routine uses the total front passengers' weight (fpwt), the rear passengers' weight (rpwt), the first baggage compartment weight (b1wt), the second baggage compartment weight (b2wt), and the amount of fuel on board (gal), to calculate the total weight (WGHT) and the total moment (MOMT) in the ramp/takeoff configuration. This routine applies to a make and model of aircraft and not a specific tail number, so name it accordingly. A listing of the routine for the Piper Archer follows. \<< WGHT fpwt + rpwt + b1wt + b2wt + gal 6 * + 'WGHT' STO MOMT fpwt 32.5 401 / * + rpwt 38 325 / * + gal 6 * 29 300 / * + b1wt 27.5 199 / * + b2wt 100 1 / * + 'MOMT' STO { b1wt b2wt rpwt fpwt } PURGE \>> The only entries which need be changed to represent a different airplane are the factors which multipy each element of weight to obtain the corresponding moment for each compartment. In the above routine, rather than calculate and insert each multiplier (the slope of each line for each compartment), the weight/balance curves were consulted and an arbitrary point at the extreme end of one compartment's line was selected. The value of the selected moment was entered, followed by the weight corresponding to this moment, and the two divided to obtain the moment per pound in each compartment. This conversion factor is then multiplied by the weight in that compartment (fpwt, rpwt, b1wt, b2wt - and recall the RPN notation used in the HP48SX calculations). 3. Individual Airplane Tail Number Driver Routine The final routine which defines an airplane's characteristics is particular to the airplane equipment on board, and therefore, should be titled with the airplane tail number. The routine first places on the stack the names of the routines which plot the weight/balance envelope and which calculate the weight/balance for this airplane's make and model (PPIPARCH and PIPARCH in the examples here). Then, a list which is later used in an INPUT statement is generated. The list contains default values which can be edited during the weight/balance activity in the Select Plane activity in the library. Default inputs are specified for the gallons/hour burn rate, the TAS, the base weight, and the base moment of unloaded airplane. The following is a listing of the routine N26H for airplane tail number N8226H. \<< 'PPIPARCH' 'PIPARCH' { ":Gal Per Hr:10.0 :TAS:125 :Base Wt:1601 :Base Mom:140.806" { -1 0 } V } \>> APPENDIX C Warranty APPENDIX C Absolutely no warranty, expressed or implied, applies to a user who is not registered in writting. For a user who is registered, the warranty excludes any liability whatsoever from the use of this software. Accurate calculations for the flight of airplanes are solely the responsibility of the pilot. This software is intended to be an aid to those calculations, but the accuracy of the calculations is not guaranteed. Use of this computational aid is not intended to replace required competence and cross-checking on the part of the pilot. The warranty on the software provides for either correcting a software error or providing instructions for a work-around. Program updates or improvements are not guaranteed nor implied. Should future updates or modifications to this software be made available, they are not guaranteed to be available in a size which will fit in a memory size of 32 kb or less (i.e. if you are going to purchase a memory card for the HP48SX, a card larger than 32 kb is recommended). APPENDIX D Registration Form APPENDIX D The registration fee for this program is $50. Payment of this fee entitles the registered user to communications regarding the use and application of the program and handy tips received from other users. Additionally, should updates become available, the registered user will be notified of the availability of the updates. Upon receipt of the registration fee, the user will be provided with a description of the data files generated and used by the library. Due to the target of making this library available in a size which would fit onto a 32 kb memory card, other optional programs which would be handy to have, were not included. Such as a program to automatically generate a full route plan for a return trip from the route plan entered to get to the original destination. This is a simple program which can be written by knowing the format and definitions of the various data files used by the library. Also knowing the the data formats, a program can be generated to summarize the entire trip, a facility which is not presently available in the library. Or, after calculating actual winds aloft experienced during the flight, a program could be written to update the remaining flight estimates based on the most recently-calculated winds. The data files used by the library have been packed and coded for memory savings and their use, therefore, are not straight forward. An explanation of each of the files, data constants, and other tidbits will be sent to each registered user. Use of the registration form below entitles the user to the use and to remain informed on the use and improvements to the library. Registration does not apply to anyone other than the registered individual. Club registrations are available, please contact the home office for information. USER REGISTRATION FORM FOR FLIGHT LIB { 1786 } NAME _____________________________________________________________ ADDRESS __________________________________________________________ __________________________________________________________ CITY ________________________ STATE ______________ ZIP ___________ For making available future updates, where did you obtain this copy of the library (BBS, copied from a friend, etc.) __________________________________________________________________ __________________________________________________________________ For the purposes of providing you updates, which is the most convienent for you (3.5" disc, 5.25" disc, DOS, MacIntosh, etc.)? __________________________________________________________________ __________________________________________________________________ Is a 32 kb - size library a limiting size for you? ___ YES ___ NO What is the maximum memory card size which you have ? ________ kb COMPLETE AND MAIL THIS FORM TO: VICTORIA DESIGNS 377 NATURE TRAIL LANE MURRYSVILLE, PA 15668