Club 100 Library - 415/939-1246 BBS, 937-5039 NEWSLETTER, 932-8856 VOICE Comments from Bill Templeton, 9/85: There was no documentation on this fine M100 program, written by Mel Evans and uploaded onto Club 100, so I've included some ongoing messages below that will give you some background on WORLD.BA If you are not using a Chipmunk disk drive, change line 300 to read: 300 CLEAR256,62960:MENU:' Exit When running the program, just move the blinking cursor to 39N/122W which is as close to San Francisco as you can get, and press to relocate the origin. Then move the blinking cursor to another location on the map and press to see your new latitude and longitude. Then press to see the Great Circle distance in nautical miles from San Francisco to your new location. Finally press to convert to statute miles. Enjoy! Bill Templeton / Danville Tigers -------------- #: 93052 S2/Sched/Busnss/Home . 17-Sep-85 18:44:29 Sb: #92873-WORLD.MAP Fm: Bill Templeton To: Mel Evans Mel: What a geography lesson! My son and I located the points on your World Map that come closest to the cities listed below. The actual location of each City is a degree or two off from the latitudes and longitudes below that we used in your program, but this was expected... . WORLD.MAP ACTUAL . City LON LAT LON LAT ------------- --------- --------- San Francisco 39N 122W 38N 123W Honolulu 21N 159W 21N 158W New York 43N 75W 43N 75W London 51N 1W 51N 0 Tokyo 36N 139E 36N 140E Buenos Aires 34S 58W 35S 59W Sydney 34S 150E 34S 151E We then compared the great circle distances given on a Pan Am airline map with those calculated by your program and found them to be very close -- as accurate as we could arrive at using a 12" globe (1"= 660 statute miles; nautical miles = statute miles * 1.151). We both learned something in the process... (1) The length of a degree of latitude on the earth's surface is 60 nautical miles or about 69 statute miles. (2) One degree of longitude at the equator equals 60 nautical miles or about 69 statute miles, but diminishes to 0 at the poles. (3) You cannot measure great circle distances easily on a flat, Mercator map because the scale is only accurate at the equator, and is greatly exaggerated in the far northern and southern regions. (4) The great city of New Orleans is located at 30N/90W, whereas a house in New Orleans might be located at 30deg 27' 14.085"N and 90deg 43' 31.535"W. Just think of the resolution you would need to find a house without being able to window in on a city map! (5) Each meridan on a globe, spaced 15 deg apart, represents 1 hour of time. You see what your fine program started!!! We thoroughly enjoyed the learning experience... but enough of my ramblings for now. Best regards, ***Bill*** ------------ #: 93063 S2/Sched/Busnss/Home . 17-Sep-85 19:35:51 Sb: #93007-#WORLD.MAP Fm: Mel Evans To: Bill Templeton Bill: Thanks for the good feedback and nice comments. As Corky suggested, I am writing a .DOC file to explain some of the background details. But meanwhile, let me reply to you: 1) Yes. One degree of latitude (due N or S) is 60 nautical miles (nmi) or 69 statute miles. At the equator, one degree of longitude (due E or W) is also 60 nmi, but this distance shrinks to zero as the longitude lines come together at the North and South Poles. 2) The map is a Mercator projection, which distorts away from the equator. But the conversion from Mercator pixel to lat/lon is built into subroutines 100 and 200. And once you have lat/lon coordinates for two points, you can calculate precisely the great-circle distance between them, as does subroutine 500. 3) Unfortunately, however, the map is only 128 pixels wide. So the resolution is rather coarse: 360 degrees divided by 128 pixels is 2.8 degrees per pixel, or 170 nmi per pixel. You can see this by pressing Locate to display lat/lon, then moving over one pixel and pressing Locate again. The displayed lat/lon numbers are simply rounded to the nearest degree. 4) Local time may be off by one hour, because the algorithm assumes that time-zones are neatly laid out on 15-degree centers. But state legislatures don't work that way. See message #92918 for more details. Mel Evans ----------- #: 92918 S2/Sched/Busnss/Home . 16-Sep-85 20:03:42 Sb: #92885-WORLD.MAP Fm: Mel Evans To: Howard A. Cohen WORLD.MAP as downloaded is correct for Eastern time zone (EDT now, EST next month). To adjust to the time zone in which your M100 is set, change line 18 to: . 18 XZ=-6 :' M100 on Central time or 18 XZ=-7 :' M100 on Mountain time or 18 XZ=-8 :' M100 on Pacific time. Assuming I made no goofs in transcribing the map, accuracy is +/- one pixel = +/- 3 degrees = +/- 180 nmi. The map is a Mercator projection. Conversion from Mercator pixel to lat/lon is included in subroutines 100 and 200. Local time may be off by one hour because, given a choice between time zones, states tend to favor the more eastern of the two. Example: The theoretical dividing line between Eastern and Central time zones is the 82.5-degree meridian. Almost all of Michigan (over 95%) is west of this meridian, but Michigan chooses to be on Eastern time. My algorithm uses the theoretical dividing lines, so time will be wrong in all but eastern-most Michigan. It also doesn't know that Arizona refuses to go along with Daylight Saving Time. (Don't laugh. They get a lot of sun in Arizona, and that extra hour of daylight might burn the grass!) There is one special case that the algorithm does recognize. The eastern-most tip of Siberia is in the western hemisphere, but still on the Russian side of the International Date Line (IDL). Line 70 takes care of this. Move the cursor to the eastern tip of Siberia, and hit Locate to see time/day. Now move due south until you're below latitude N64. The day changes: you have just crossed the IDL; not from eastern hemisphere to western, but from Russian day to Alaskan day! If you have sunrise/sunset as a function of lat/lon, it would be easy to add to WORLD.MAP. Would sunrise/sunset be useful to somone? Mel Evans -------------- #: 93141 S2/Sched/Busnss/Home . 18-Sep-85 07:37:01 Sb: #93063-WORLD.MAP Fm: Bill Templeton To: Mel Evans Mel: Here's a quick comparison which shows your WORLD.MAP in DL2 calculates great circle distances very close to Pan Am's figures! . WORLD.MAP Pan AM . Locations n.mi. s.mi s.mi --------------- ---- ---- ---- SF-Honolulu 2150 2475 2416 SF-Tokyo 4432 5101 5149 NY-London 2907 3346 3473 NY-Buenos Aires 4684 5391 5494 Sydney-Honolulu 4395 5059 5076 Added a couple of lines to convert nautical miles to statute miles on M100 display if is pressed after is pressed... 524 D=INT(D*DPR*60+.5):PRINT@304,"Dist:";D;"nmi"; 525 I$=INPUT$(1):IFI$=CHR$(32)THEN526ELSE22 526 PRINT@309,INT(D*1.151+.5);"smi";:GOTO22 Fun program!... ***Bill***