For Retro Computing Enthusiasts
, ,

Global Scan For VIC And 64

By Lee Wimbs — originally published in COMPUTE!’s Gazette Issue 2, August 1983

Written in straightforward BASIC, this program will work on both the VIC-20 and Commodore 64 without modification.

Does the thought of navigating the open seas in a sailboat set your pulse racing? Is geography your tiling? Do you have child who needs map reading practice? Or do you simply like to know the distance between two locations when you’re traveling? If any of your answers are yes, then here is the program you’ve been waiting for.

Given two locations by latitude and longitude, “Global Scan” can supply:

1. The distance between the two locations in miles;

2. The distance between the two locations in kilometers;

3. The direction in degrees from true north.

This BASIC program will run with little or no modification on most computers, including the unexpanded VIC-20 and Commodore 64. There’s nothing fancy or complicated about this program just type it in and RUN. When asked for the name of location A, enter the first city or location. Press RETURN. You will then be asked for the latitude position, in degrees. Enter and press RETURN. Follow the same procedure for the minutes and the seconds.

The program will then ask it the information is correct. If you enter an N, the program will cycle back to the first entry for degrees so you can correct your entries. If you enter Y, the program will request the information for the second location. If” all of your input is correct, the program will display the proper results on the screen.

Here is brief summary of how the program works:

Lines 30 – 110 obtain the name and latitude of location A.

Lines 120 – 170 obtain the longitude of location A.

Lines 190 – 270 obtain the name and latitude of location B.

Lines 280 – 330 obtain the longitude of location B.

Lines 360 – 450 print the distance between and B.

Lines 480 – 620 do the math.

Lines 660 – 760 ask if input is correct and check for zero input.

Remember to enter degrees, minutes, and seconds separately. The program will not allow zero to be entered. If zero is entered, lines 710-730 will send the computer to line 810 to indicate the operator should reenter the coordinate containing the zero.

If you wish to print the results of this program to keep as a record, subroutine can be inserted after line 350. This would take the readout from lines 360 to 450 and send it to the printer.

I have used this program to help my father plot his trips at sea, to help my son with his homework, and to plot microwave paths at work (I’m an engineer at TV station). With little time and imagination, you can find many helpful and exciting uses for this program.

See program listing on page 113.

Enjoyed this? It’s what we do every month.

The revived COMPUTE!’s Gazette brings the spirit of the golden era to today’s retro scene — Commodore, Atari, Amiga, and more, in full-color print and digital every month.