air traffic control program for Tandy model 102
|
05-25-2015, 12:43 AM
(This post was last modified: 05-26-2015 01:15 PM by Don Shepherd.)
Post: #1
|
|||
|
|||
air traffic control program for Tandy model 102
I wrote an air traffic control program for the Macintosh way back around 1987-1988. It was fun to write, and I learned Microsoft BASIC for the Mac with that program.
A few months ago a forum member gave me a Tandy 102 laptop computer, which also runs BASIC. This computer is not a graphics-based computer like the Mac, but I thought it would be fun to do a rather simple ATC program for it. The horizontal line across the middle of the screen represents an airway that planes fly on. There will be eastbound planes, entering from the left side of the screen, and westbound planes entering from the right side of the screen. The exact location of the plane is represented by a little plane symbol and associated with the plane is the aircraft ID (letter A-Z, for 26 planes) and the current altitude, in thousands of feet (the data for west bound planes is above the line, and the data for eastbound planes is below the line). Planes enter at a random altitude from 1000 to 8000 feet and should leave the screen at 9000 feet so that they won't run into another plane at 1000-8000 feet just entering the screen. The screen is updated about once every seven seconds, which is about what the real-life ATC enroute system does in the US (or perhaps I should say what it did back in the 1990's when I worked on it). Unlike real ATC, you can only do one thing to a plane: change his altitude. You can't vector him, hold him, slow him down or speed him up, tell him to get lost, etc. So the challenge is to use altitude to separate planes flying across the screen. If two planes are at the exact same location at the same altitude, they crash and the game is over. I should point out that a crash can only occur between a westbound plane and an eastbound plane; eastbound or westbound planes can't crash into one another because they all go the same speed. You give an altitude command by keying in: C8. This tells plane C to climb or descend to 8000 feet. When a new plane comes onto the screen, you hear a beep. You will amost always want to give him an altitude command, and for a NEW plane you just have to enter the altitude, like 8, a nice little shortcut. Your goal is to handle all 26 planes. In real life, planes don't fly airways at just any old altitude. Eastbound flights fly at odd thousands of feet, and westbound flights fly at even thousands of feet. I could have implemented that with this simulator, but it wouldn't have made it very challenging. So basically you have planes headed directly at one another and it's your job to keep their altitudes different so they don't crash. There is no mouse on a Tandy 102. Your control is from the keyboard. Pressing ESC stops the simulation. The pause key on the Tandy will pause the simulation; press it again to resume. The program will change the time-of-day clock on the computer, so be aware. There are no rules regarding how one must run the simulation or define the separation procedures; that's up to you. Anyhow, it was fun to write and I post it here in case anyone is interested. Code:
|
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
air traffic control program for Tandy model 102 - Don Shepherd - 05-25-2015 12:43 AM
RE: air traffic control program for Tandy model 102 - BobVA - 05-26-2015, 02:34 AM
RE: air traffic control program for Tandy model 102 - Don Shepherd - 05-26-2015, 11:52 AM
RE: air traffic control program for Tandy model 102 - Dave Britten - 05-26-2015, 06:21 PM
RE: air traffic control program for Tandy model 102 - Dieter - 05-26-2015, 06:35 PM
RE: air traffic control program for Tandy model 102 - Dave Britten - 05-26-2015, 07:08 PM
RE: air traffic control program for Tandy model 102 - BobVA - 05-26-2015, 09:37 PM
RE: air traffic control program for Tandy model 102 - BobVA - 05-26-2015, 09:43 PM
|
User(s) browsing this thread: 1 Guest(s)