Basic Programming Instructions for Flight.bas
General:
It is very important that the program be entered in QBasic EXACTLY as it is written here with one exception - when you are entering the program, case is not important. You can enter it all in lower case and the QBasic compiler will display it in the proper case. When you get to the program itself, case is important. When you enter airport data, the name of the airport can be upper or lower case. When go to search for the airport, your search criteria must be the same as the way you originally entered the airport name. Play it safe - capitalize the first letter of all airports. That is easy to remember. When you are entering latitudes and longitudes, North, South, East and West MUST be capitalized. When you run the program a few lines of informational text will appear, which requires a bit of excplanation. There are three more related basic programs :
Flight_1.bas - This program is exactly the same as Flight.bas except it dows not print out the Flight Plan. This is convenient when you just want to look at courses and distances prior to choosing an actual flight.
Flight_2.bas - This is a modified version of Flight.bas that lets you fly across the International Date Line, either west to east or east to west.
Flight_M.bas The same as Flight_2.bas except that it does not print out the Flight Plan.
Menus:
Here is the first menu you will see:
| (1)
Enter Airport Data (2) Airport Search (3) Create Flight Plan (4) Edit Record (5) Print Airport Index (6) Print ILS/DME Airports (7) Print Selected Records (8) Print Selected Airports ....(A) Approaches ....(B) Beacons ....(C) Airports (0) Exit |
(1) Enter Airport Data
Press 1 - Enter
Screen says
"Next record is 1. Press 0 to return to menu.
Record No: Enter 1 or whatever the next record number is, or 0 to return to the main menu
Airport: Enter the name of the airport, beacon, or geographical point. This field, as are all others, is case sensitive. Use standard conventions when entering, i.e., Atlanta, St. Louis, Rio de Janiero, Point Oboe, etc. Press enter when done.
Latitude: Enter latitude in the folloing format:
40 (degrees) - enter - 30 (minutes) - enter - North - enter
There MUST be two digits in the degree field and in the minute field. North (or South) must be capitalized. If you are entering a southern latitude, the degree must be preceded by a minus sign. Do not put a minus sign in front of minutes.
Longitude: Enter longitude in the following format:
090 - enter - 00 - enter - West - enter
Degree must contain 3 digits and minutes must contain 2 digits. If the longitude is easterly, precede the degree with a minus sign - no minus in front of the minute.
El;evation: 1111 - enter. Digits only. The program assumes feet.
Runway: 2 or 2L or 33 - 2 digits max.
Heading: 008. Heading must contain 3 digits. Press enter
ILS: 108.7. If the ILS has DME then enter 108.7/D. Press enter
DME: 114.3. 6 digits max. including the decimal point. Press enter
ATIS: 128.50. 6 digits max. including the decimal point. Press enter.
MagDev: Enter the magnetic deviation for the airport or point you are entering. If the deviation is easterly, precede it with a minus sign. Press enter.
Notes: Enter anything special about the airport or location. 40 characters max. Ptess enter.
The following screen is a review of what you have entered. If correct, press "Y" or "y". The record will be saved to a file called "Flight" - no extension - and you will be returned to the airport entry screen, where you may continue entering or return to the main screen. If you press "N" or "n" the data will be deleted and you will be returned to the main menu.
(2) Airport Search
Selecting this option will give you the following screen:
Searching for Airport
Airport to search for: Enter the first four letters and or/digits of the airport you are seaching for. Four letters will normally be sufficient; however, if you are searching for Jacksonville, you would have to enter sufficient letters to distinguish it from Jackson Hole. Up to 13 letters can be entered, and remember, this field is case-sensitive.
(3) Create Flight Plan
This option will calculate the course and distance between any two airports or points which have been entered under (1). Pressing 3 and enter gives you the following screen:
Creating Flight Plan:
Departure Airport: Enter your point of departure and press enter. Pertinent data for your departure point will be displayed, and you will be asked to enter your destination airport.Enter your destination and press enter. If the dessination has not been previously entered or if you entered the name incorrectly you will get an error message "Airport Not Found" and will be returned to the main menu. If the destination entry is correct, the data for that airport will be displayed and you will be aksed if you are ready to compute the flight plan. Entering "Y" or "y" will continue the process, "N" or "n" will return you to the main menu. If you press "Y" or "y" the next screen will ask for your estimated ground speed. Enter that data and press enter. The following screen will display the course and distance to your destination, plus all pertinent data such as runway, heading, frequencies and so on. The course and distance are TRUE RECTANGULAR coordinates and as such are only approximate. Follow the instructions on the screen and you be given a second screen showing the actual course and distance which takes into account magnetic deviation and longitudinal variations. Note that lat and long are shown as a decimal. When you entered this data in (1) the degrees and minutes were converted to a decimal statement before being written into the file. This allows the program to manipulate them arithmetically.
(4) Edit Airport Record
The Edit function allows you to correct any data entry which mioght have been entered incorrectly. If the course and distance from (3) are way off, this is the first place to look for an error. Enter the record number followed by enter. You may have to go throught the Airport Search routine to find the record number.The next screen displays the data exactly as you entered it. Take particular note of the lat and long format. It must be entered precisely as shown, not the way you entered it when you made the original data entry. Remember, lat and long have been converted to decimals. A word of caution - you cannot compute a course between any two points that have EXACTLT the same lat or long. When the program computes all the necessary trigonometric functions it will come up with a big fat zero, which it can't handle. Change one of the locations by .01 (plus it or minus it) and you will be fine. Just follow the screen instructions to do your editing. If you don't need to edit anything just enter "none" when it asks you which field you want to edit.
The remaining options
(5) Print Airport Index
(6) Print ILS/DME Airports
(7) Print Sected Records
(8) Print Selected Airports
are pretty straight forward - no surprises. In (6), if you did not enter "/D" after the ILS frequency then the program will not pick up on it. (8) can be very handy if you want to create a hard copy file of the airports. Entering "A" on the second screen will print all airports beginning with capital A, "B" all airports beginning with a capital B, and so on.
Once you get the program entered, I would suggest you enter five or six imaginary places like Alpha, Bravo, Charlie, etc., and test out all the menu functions. Once you have it down pat, exit the program, go into your QBasic directory and delight "Flight" -remember - no extension. The next time you run the program the file will automatically be rebuilt.
e-mail me at
| This
page has been visited |