ECLIPSE.BAS February 2000 by Marc Kummel aka Treebeard. Contact mkummel@rain.org, http://www.rain.org/~mkummel/ What is ECLIPSE.BAS? --------------------- ECLIPSE.BAS is a small BASIC program that predicts solar and lunar eclipses. I pulled this code from my much more ambitious TBC program that I wrote a few years ago. It's a kludge that does some things the hard way because the original program did much more. At least it isolates the working routines for eclipse prediction. Sometime I'd like to add code to draw a picture of each eclipse event. My ambitious TBC calendar/ephemeris program is available from Treebeard's Basic Vault at: . I did my best with the math, but I wouldn't trust the ephemeris data for navigation if I were sailing to Hawaii! The further the date is from Epoch 1990, the greater the error. This is tricky stuff! Main sources and links: * Duffet-Smith. Practical Astronomy With Your Calculator, 3ed. * "Eclipse Prediction", Astronomy, Nov 1986, p.67 * My "Total Eclipse" stumper answer at has info and links on eclipse prediction. * Fred Espenak's Eclipse Home Page has info on eclipses. Check out Using ECLIPSE.BAS ------------------ SOLSYS is a simple DOS program. Run it in DOS, or a Command session in Windows. It will show the details for the next eclipse *somewhere* on earth. Press or ext for the next eclipse, or press or ast to back up. It calculates basic ephemeris data for each eclipse it shows. Local times are figured from my home in the mountains behnd Santa Barbara, California. There's no way to change it except to edit the source code at line 254 of the main procedure: 'Location, should be able to change this! local$ = "San Marcos Pass, CA" 'place name latitude# = DegToDec#(34, 30, 0) '34:30 latitude (DMS) longitude# = DegToDec#(119, 50, 0) '119:50 longitude (DMS) timezone% = 8 '+8 is 8 hours west of GMT dst% = true 'daylight savings time elevation% = 2500 'elevation effects viewing times Enter your own location name, latitude, longitude, timezone, daylight savings time flag, and elevation to customize this for your own home. It wouldn't be hard to make this a command or menu option, but I'm busy with other projects. You're on your own! The Files: ----------- I wrote this program to solve a stumper. You'll have to study the source code for more info. I wrote it using MS Basic PDS v7.10, but it should work with any version of QBasic, QuickBasic, or PDF. ECLIPSE.EXE DOS executible ECLIPSxx.BAS BASIC source code README.TXT This file TBVAULT.TXT Treebeard's Basic Vault info Conditions: ------------ This program and source code are yours to use and modify as you will, but they are offered as freeware with no warranty whatsoever. Give me credit, but do not distribute any changes under my name, or attribute such changes to me in any way. You're on your own! If you find this program or code useful, then let me know what you do with it, as a courtesy to a fellow programmer who still hacks for fun and glory. Any suggestions or comments will be much appreciated. Send comments and fixes to: Marc Kummel aka Treebeard mkummel@rain.org http://www.rain.org/~mkummel/ http://www.treebeard.org/ For more interesting Basic software with source code, check out Treebeard's Basic Vault at .