FastRS V02.13 (17 Mar 96) Copyright © 1993-96 by William K. Walker
"Fundware" from North Valley Digital. (FastRS runs under MS-DOS. A Windows version is "pending.")

FastRS produces a listing of the sunrise/sunset times for the Bahá'í Fast. It needs to know your location name, latitude, longitude, year and time zone (EST = 5, PST = 8, etc.). Here is an example for Kalispell, Montana, USA:

Location: Kalispell, MT
Latitude: 48 11 45 N
Longitude: 114 18 47 W
Time Zone: 7
Year: 1995

FastRS will create a file named FASTyyy.LST ("yyy" is the Bahá'í year) containing the sunrise/sunset table. In the example above, the file would be named FAST151.LST.

If you want times in 24-hour format, type FASTRS /24.

See the program documentation for more details.

(Do you want to know when this page is updated? You can register for automatic update notification via email.)


Download FastRS from this site. (fastrs21.zip; 40,305 bytes)
Download FastRS from the BCCA archives. (fastrs21.exe; self-extracting executable; 55,654 bytes)

Return to NVDi Home Page
Go to Bill Walker's Home Page


Top

FastRS Program Documentation (also included in the FastRS distribution):

Overview and Introduction
Installation
Running the Program
Money
Credits
Author! Author!
Tech Notes and Other Goodies


Top or Table of Contents


                              F A S T R S



     A program to calculate sunrise and sunset for the Bahá'í Fast

              Copyright (c) 1993 - 96 by William K. Walker

                         V02.13, 17 March 1996





Overview and Introduction

=========================



FASTRS is a fairly simple program that calculates sunrise and sunset 

times for the period of the Bahá'í Fast. Once you have entered the 

necessary information, FASTRS writes the sunrise/sunset table to a file. 

At that point, you can print it out or you can use your favorite text 

editor or viewer to browse it.



FASTRS asks for the following information in order to calculate sunrise 

and sunset for your location:



     o  a location description,

     o  the local latitude and longitude,

     o  the year and

     o  the time zone.



The location description is just that: a short description of the 

location for which you are calculating the sunrise and sunset times. 

(Example: Kalispell, MT)



Latitude and longitude are the map coordinates that tell FASTRS where 

you are on the globe. Latitude describes your distance from the Equator. 

You must enter four pieces of information to specify your latitude: 

degrees, minutes, seconds and direction (north or south) from the 

Equator. Longitude works like latitude, except it tells FASTRS how far 

you are to the east or west of the Prime Meridian, a north-south line 

running through the Greenwich Observatory in London, England. So, 

longitude is also entered as degrees, minutes and seconds, but the 

direction is either east or west. For example, my home in Kalispell, MT 

is north of the Equator and west of London, so its latitude and 

longitude look like this when I enter them into the FASTRS program:



             48 11 45 N

            114 18 47 W



See the "Tech Notes" section for suggestions on how to find your local 

map coordinates.



The year can be entered as the 4-digit Julian year or the 3-digit Bahá'í

year. In either case, the range is limited to a 100-year span from

1980/136BE through 2080/236BE. Thus, if you wanted sunrise and sunset 

times for 1995, you would enter either 1995 or 151.



The time zone is the number of hours that need to be added to your local 

time to convert it to Greenwich Mean Time (GMT). GMT is also known as 

Universal Coordinated Time. In either case, it means the time at the 

Greenwich Observatory in London. For example, if you live in the United 

States Mountain Standard Time Zone (MST), you must add 7 hours to your 

local time to convert it to GMT. Thus, you would enter 7 when FASTRS 

asks for the time zone. If you live on the West Coast, you would add 8 

hours; if you live in Darwin, Australia, you would subtract 9.5 hours 

(i.e., you would enter -9.5); and so forth.



Once you've figured all this stuff out and given it to the program, 

FASTRS will produce an output file named FASTyyy.LST. The "yyy" part is 

the Bahá'í year. If you entered 1995 (or 151) as the year, the file 

would be named FAST151.LST.





Top or Table of Contents



Installation

============



If You Received FASTRS On Diskette

----------------------------------

The easiest way to install FASTRS is to create a directory for it and 

dump all the program files into it. If you received FASTRS on diskette, 

something like the following commands ought to do the trick (assuming C 

is your hard drive and A is your diskette):



          md c:\fastrs

          copy a:\*.* c:\fastrs\*.*



If You Downloaded FASTRS From Another Computer

----------------------------------------------

First, create a directory for the FASTRS distribution files, then copy 

the FASTRS archive file into the directory you just created and expand 

the archive. If the archive is "self-extracting" (FAST21.EXE or 

FASTRS21.EXE), the command sequence should look something like this 

(assuming your hard drive is drive C):



          md c:\fastrs

          copy fastrs21.exe c:\fastrs\*.*

          cd c:\fastrs

          fastrs21



Once this is done, you may delete the original archive file if you wish.



If the BBS repackaged the FASTRS files into a different type of archive 

file, you may need to run a separate archiving program to retrieve the 

files. In this case, the archive will be named something like 

FASTRS21.ZIP or FASTRS21.ARC. The command sequence to create a directory 

and retrieve the files is very similar to the example above. Here is a 

typical set of commands for a ZIP archive:



          md c:\fastrs

          copy fastrs21.zip c:\fastrs\*.*

          cd c:\fastrs

          pkunzip fastrs21



Once this is done, you may delete the original archive file if you wish.





Top or Table of Contents



Running the Program

===================



To run FASTRS, switch to the directory containing it, and type the 

program's name. For example:



          cd c:\fastrs

          fastrs



Or, if you want the times to come out in 24-hour format (e.g., 18:00 

instead of 6:00PM), type



          fastrs /24



and answer the prompts. The information FASTRS needs is described in the 

"Introduction and Overview" section above.



Here's what a program run looks like for my place in Kalispell, Montana:





       FASTRS V02.13  -- Calculates sunrise/sunset for Bahá'í Fast

       Type FASTRS ? for help.





     Location: Kalispell, MT

     Latitude: 48 11 45 N

     Longitude: 114 18 47 W

     Year: 151

     Time Zone: 7



     Working...

     Writing sunrise/sunset times to FAST151.LST...





Note: It could take a while for FASTRS to compute all the sunrise/sunset 

times. It finishes almost instantly on my big development system, but it 

takes about 20 seconds on the old AT clone in the other room. (For you 

propeller-heads out there, the "slow" machine is a 10MHz 80286; the fast 

one is a 120Mhz 80486.) Beta tester Mark Foster reported 24 seconds on 

his AT-class machine.



Anyway, once FASTRS is done, it writes the sunrise/sunset times to a 

table in a file. In the example above, the file is named FAST151.LST. At 

this point, I could print it out by typing



          copy fast151.lst prn



Top or Table of Contents



Here's what the printout would look like:





  FASTRS   V02.13    Copyright (c) 1993-96 by William K. Walker



   Location: Kalispell, MT

   Latitude:  48° 11' 45.00" N

  Longitude: 114° 18' 47.00" W

  Time Zone: GMT-7









             Sunrise/Sunset Times, Bahá'í Fast -- 151BE (1995)





                  `Alá      March     Sunrise     Sunset

                  ----      -----     -------     ------



                    1   Thu   2        7:17AM     6:23PM



                    2   Fri   3        7:15AM     6:24PM



                    3   Sat   4        7:13AM     6:26PM



                    4   Sun   5        7:11AM     6:27PM



                    5   Mon   6        7:09AM     6:29PM



                    6   Tue   7        7:07AM     6:30PM



                    7   Wed   8        7:05AM     6:32PM



                    8   Thu   9        7:03AM     6:33PM



                    9   Fri  10        7:01AM     6:35PM



                   10   Sat  11        6:59AM     6:36PM



                   11   Sun  12        6:57AM     6:38PM



                   12   Mon  13        6:55AM     6:39PM



                   13   Tue  14        6:53AM     6:41PM



                   14   Wed  15        6:51AM     6:42PM



                   15   Thu  16        6:49AM     6:44PM



                   16   Fri  17        6:47AM     6:45PM



                   17   Sat  18        6:45AM     6:47PM



                   18   Sun  19        6:43AM     6:48PM



                   19   Mon  20        6:41AM     6:50PM





Top or Table of Contents



Money

=====



This software is (ahem) "fundware." If you find it useful, send a 

contribution to one of the Bahá'í Funds when you get a chance, or add a 

little to your normal contribution. I don't care which fund gets the 

money, or how much you send -- your judgment is as good as mine, 

possibly better. Also, it would really make my day if you send me a note 

telling me that this program has generated a little extra revenue for 

the Faith.



Non-Bahá'ís should note that the Bahá'í Faith does not accept 

contributions from non-members. If you are not a Bahá'í and you insist 

on sending some money to someone, send it to Hospice -- they are good 

folks, and they can use it.





Top or Table of Contents



Credits

=======



The nasty math that does the sun elevation and azimuth calculations was 

written originally by Bob Walraven in January, 1985. It was part of a 

FORTRAN program named FRESNO.



Significant "sanity-check" and field test assistance was contributed by 

Mark A. Foster, Olathe, KS. Nice guy that he is, he made some time for 

me in the midst of grading final exams. A round of applause, please, for 

the gentleman in the front row.



Thanks are due, also, to my wife, Lois, who reviewed the documentation 

and made several helpful suggestions, including the addition of a day-

of-the-week column to the listing.





Top or Table of Contents



Author! Author!

===============



Bug reports and suggestions should be sent to the author:



         William K. Walker

         North Valley Digital

         390 S. Tyndall Pkwy, Ste 149

         Parker, FL  32404

         +1 (850) 647-9614 (voice)

         +1 (850) 647-9615 (fax)



         wkwalker@nvdi.com

         http://www.nvdi.com/





Top or Table of Contents



Tech Notes And Other Goodies

============================



This section contains all the stuff you don't absolutely need to know to 

run FASTRS. Nevertheless, you may find some interesting goodies here. It 

wouldn't hurt to at least scan the topics in case something catches your 

eye.



How To Find Your Latitude And Longitude

---------------------------------------

In the first place, you don't need to be exact to the nearest fraction 

of a second. Getting the degrees and minutes part more-or-less correct 

will probably be good enough. Actually, the nearest 1/4 degree (15 

minutes) will do the trick.



If you live in the United States, The Old Farmer's Almanac is a useful 

reference. Their "Time Correction Tables" list the geographic 

coordinates of over 250 U.S. cities.



If you have a regular, commercial airport nearby, you might try calling 

the weather people there. They should know their global coordinates. 

Sometimes the weather person at one of the local TV stations will know 

this sort of thing, too.



A library is another good place to look. So are colleges and 

universities. If they have any detailed maps on file -- topographic maps 

are best -- you can often use them to obtain your longitude and 

latitude. A good atlas might also provide the necessary information.



Or, send me a note and I'll pull your coordinates from my database.



Entering Decimal Degrees

------------------------

Sometimes it's easier to figure coordinates as decimal degrees instead 

of degrees, minutes and seconds. This is especially true when you are 

taking measurements from a map. If, for example, you wish to use 81.4 

degrees west instead of 84 degrees, 24 minutes, 0 seconds west, you can 

do so. When you run FASTRS, just enter the minutes and seconds as 0. 

E.g., 81.4 0 0 W instead of 81 24 0 W.



Using I/O Redirection

---------------------

You can use a trick called I/O redirection to feed pre-typed responses 

to FASTRS from a data file. For instance, the FASTRS distribution 

includes a file called KALISPEL.DAT which can be used to reproduce the 

example listing shown earlier in this document. To do this, you would 

type

                    fastrs <kalispel.dat



The "<" tells MS-DOS to provide input to FASTRS from KALISPEL.DAT 

instead of from the keyboard.



Just to show how things work, I've included data files for a few other 

places, too. Also, once you have figured out your local coordinates and 

time zone, you can create your own data file. Just use any plain text 

editor such as the MS-DOS EDIT or (yech!) EDLIN program to create a file 

containing the responses you would normally type when you run FASTRS. 

You can use the data files I supplied as a model. When it's time to run 

FASTRS next year, all you need to do is change the year entry in your 

data file and you're ready to go.



If you don't have a decent text editor, I have included a very simple 

one called TED (Tiny EDitor) as part of the FASTRS distribution. TED's 

documentation is in TED.TXT.



Command Line Switches

---------------------

FASTRS recognizes two command line switches: /24 and ?.



The "/24" switch causes the sunrise/sunset times to be output in 24-hour 

format instead of "AM/PM style." Actually, you can enter "/24" or "24" 

or (if you are undergoing UNIX withdrawal) "-24" and FASTRS will accept 

it.



Entering "?" or any invalid command line character produces the program 

name, program release date and version, the copyright notice, and a 

short block of help text.



Using The TZ Environment Variable

---------------------------------

A lot of people don't know this, but there is an MS-DOS environment 

variable called "TZ" that can be used to tell programs about your time 

zone. The command syntax looks like this:



          set TZ=SSShh:mm:ssDDD



where



          SSS      is the three-letter designation for standard

                   time in your time zone (example, MST);



          hh:mm:ss is the amount of time to add to your local

                   time to get Greenwich Mean Time (GMT -- see

                   the discussion in the "Overview" section)

                   expressed as hours, minutes and seconds; and



          DDD      is the designation for daylight savings time,

                   if your area uses it (example: MDT).



Thus, if you lived in the U.S. Mountain Time Zone and your area used 

daylight savings time part of the year, you would enter:



          set TZ=MST7MDT



If you added the above line to your AUTOEXEC.BAT file, TZ would get set 

each time you booted your computer.



FASTRS understands TZ. If, when you run FASTRS, you just press the Enter 

key when you see the "TimeZone:" prompt, FASTRS will check to see if the 

TZ variable is set. If it is, FASTRS will use the information supplied 

by TZ; if not, FASTRS will insist that you type in your zone 

information.



One nice side-effect: FASTRS will use TZ's three-letter time zone 

designation. Thus, if you set TZ to "MST7MDT" before running the 

"KALISPEL" example earlier in this document, and if you just press Enter 

when FASTRS asks for the time zone, the listing will show the time zone 

as "MST" instead of "GMT-7."





Sunrise/Sunset Calculation

--------------------------

Sunrise and sunset are calculated as the time when the edge of the sun

just appears or disappears, given the normal index of atmospheric

refraction. This is 2 or 3 minutes before or after the sun actually

clears the horizon, because the atmosphere bends the sun's light

slightly.



In case you were wondering why the last two or three days of the Fast 

are more than 12 hours long, now you know. The atmosphere, acting like a 

lens, lets us peek just a little bit beyond the horizon. (It seems 

poetically appropriate, doesn't it?)



Although FASTRS gives pretty good results anywhere on the globe, I did 

not attempt to make the output meaningful for locations extremely close 

to the poles. I.e., I did not make a distinction between "sun visible 

all day" and "sun not visible all day"; I just flag sunrise and sunset 

as "none."



Distribution Files

------------------

ted.com        -  a simple text editor

kalispel.dat   -  Kalispell, MT data file

wilmette.dat   -  Wilmette, IL data

haifa.dat      -  Haifa, Israel data

file_id.diz    -  program description for BBS uploads

fastrs.exe     -  the FASTRS program

fastrs.ico     -  Windows icon for FASTRS

fastrs.pif     -  Windows Program Information File for FASTRS

fastrs.txt     -  FASTRS documentation

files.txt      -  list of distribution files

readme.txt     -  quick start "read me" file

ted.txt        -  TED editor documentation



Portability Notes

-----------------

If you wish to adapt FASTRS to other environments, get in touch with me. 

I will make the sources available to anyone with a specific project in 

mind although I would prefer not to hand them out to the idly curious.



FASTRS is written in C. The code should be reasonably portable. I kept 

away from pointless trickiness, avoiding the constant temptation to 

generate "elegant" code at the expense of clarity.



The program should be ANSI C compatible, or very close to it.



FASTRS does use a few 8-bit characters to generate things like the 

degree symbol and the accents in the word "Bahá'í". These are defined in 

FASTRS.H and would, of course, need to be modified for output to non-IBM 

style displays and printers.



You will probably need to remove the "#pragma page()" statements if you 

are not working with the Microsoft C compiler.



The TZCHEK routine is Microsoft-specific. It should be customized for 

your target system, or modified always to return a zero value.



Edit History

------------

1991 -                  Various early versions written in FORTRAN and C

 Nov 1993



14 Dec 93      Y02.00   First V02.00 public beta test

W. K. Walker



15 Dec 93      Y02.00a  Second V02.00 beta; modified to support TZ

W. K. Walker            environment variable; added support for non-

                        integer time zone offsets; updated doc



16 Dec 93      V02.00   Official public release

W. K. Walker



10 Mar 94      V02.10   Added day-of-week column to listing

W. K. Walker



17 Aug 95      V02.11   Updated to reflect new address; fixed TZ

W. K. Walker            handling bug



23 Feb 96      V02.12   Minor documentation updates

W. K. Walker



17 Mar 96      V02.13   Fixed erroneous release date in source code;

W. K. Walker            doc updates

Top or Table of Contents


Return to NVDi Home Page
Go to Bill Walker's Home Page



Maintained by William K. Walker
Copyright © 1996-1999 by William K. Walker
Last update: 2 Mar 1999