From: sinenmaa@cc.helsinki.fi (K. Sinenmaa)
Newsgroups: comp.sources.hp48
Subject: v03i032:  nasir_ks - nasir v1.1, Part01/01
Date: 16 Feb 92 21:28:09 GMT
Followup-To: comp.sys.hp48
Organization: University of Helsinki

Checksum: 1147924384 (verify with brik -cv)
Submitted-by: K. Sinenmaa <sinenmaa@cc.helsinki.fi>
Posting-number: Volume 3, Issue 32
Archive-name: nasir_ks/part01

BEGIN_RDME nasir.rdm
Hi,

I posted this program because there was so empty in this news group.
I changed this program to handle the same sub-programs as the TYKO v2.2
does. So I will try to post it also to this news group as soon as
possible -- maybe  later in the spring.
And if someone wants I can also join this program to the TYKO v2.2.
It requires only 670 bytes more memory than the pure TYKO.
Some features of TYKO;
      DATA output the same as TYKO v2.1
      Calendar selection, either Gregorian or Julian
      Date limitation is off
      The time zones of the north America
      Day light saving time
      Drawing the selected objects in the heliocentric coordinates
      with the Earth and also the Moon is drawing

Happy  graphing
kati



             &&&    &&         &&&          &&&&     &&   &&&&&
             && &   &&        && &&        &&  &&    &&   &&  &&
             && &&  &&       &&   &&        &&       &&   &&   &&
             &&  && &&      &&     &&        &&      &&   &&&&&
             &&   & &&     &&&&&&&&&&&        &&     &&   && &&
             &&    &&&    &&         &&    &&  &&    &&   &&  &&
             &&     &&   &&           &&    &&&&     &&   &&   &&
             *****************************************************

                           v1.1  1992  k. sinenmaa
                               February 1th 1992


    INTRODUCTION

       This program does the time changes both in the JULIAN Calendar
       and the GREGORIAN Calendar dates. The date have to be  later than
       March 1st 4712 BC. The Calendar must be selected before calculations
       from the SETUP menus.
       Also the Sun's data is available contains the equatorial and hori-
       zon coordinates, rising and setting times and its geocentric distance.

    EXECUTABLE FILES

       SETUP    put user's coordinates and times
       NASIR    main program
       JDAY     a fast way to get a julian day number
       CADA     a fast way to convert JDAY to calendar date
       NOVA     shows the previous settings ( or current if ESC pressed )

    POPUP picture <nova>. Note, this is NOT valid before pressing
                             the ESC key from the SETUP menu
     48SX
     ***************************
     * NASIR v1.1  1992 by ks  *
     * Calendar = GREGORIAN    *
     * DLST = OFF              *
     * Time Zone = User's      *
     * [[ 5 2 1992 ]           * [[ day  month  year ]
     *  [ 60 2 25 ]            *  [ latitude  zone  longitude ]
     *  [ 0 19.45 17.45 ]      *  [ DLST  time   time at zero longitude = UT ]
     ***************************

    SETUP: two pages

       DATE   form is DD MM YYYY, the preceding zeros are not essential
       TIME   must be entered in the 24-hour system
       LATIT  latitude is between -90 and +90 degrees, must be as decimals
       LONG   longitude range is 0 to 180, westerns are negatives, as decimals
       ZONE   gives to you a new temporary menu, below
       ESC    store the new values to the variables, must be done

       DL.ON  Day Ligth Saving Time ON  not automatic, user's take care of it
       DLOFF  Day Ligth Saving Time OFF
       JUL.C  the calendar selection, JULIAN is ON
       GRE.C  the calendar selection, GREGORIAN is ON

    SETUP >> ZONE: two pages, contains the time zones of the North America

       USER  an user can put his or her own time zones, westerns are negatives
       EST   Eastern Standard Time, zone= -5 , longitude about -75  degrees
       CST   Central                      -6                   -90
       MST   Mountain                     -7                   -105
       PST   Pasific                      -8                   -120
       BACK  back to the first temporary menu

       AST   Alaska                       -9                   -135
       HST   Havaii                       -10                  -140

            NOTE; if you change these variables you must also change the
                  LONG (longitude) variable. Press ESC when ready to leave
                  the SETUP menus

    NASIR; main program                        SETUP >> JUL.C or GRE.C

       JDAY  calendar date to Julian Day number: DATE TIME
       CONV  Julian Day number to calendar date: none, 1 number from the STACK
       CT.ST Civil Time to Sidereal Time       : DATE TIME LONG ZONE DLST
       ST.CT Sidereal Time to Civil Time       : DATE TIME LONG ZONE DLST
       CLEAR clears the stack                  : none
       SUN   calculates the SUN's position     : DATE TIME LATIT LONG ZONE DLST

       JDAY and CADA can be run also as the independent programs, take their
       variables from the stack.
       JDAY >> three values, DD MM YYYY. result is Julian Day number
       CADA >> one value, result is a string contains calendar date

    APPREVIATIONS of the main program

       GreCal:     Julian day number counted in the Gregorian calendar
       JulCal:                                      Julian calendar
       Jday: Julian day number and its fraction part, correspond to the UT
       " GREGORIAN" or " JULIAN"                          current calendar
       UT:         Julian day number's fractional part converted to the UT
       GW 0UT:     mean sidereal time at 0 UT at the longitude of GreenWich
       GWmST:      mean sidereal time at the defined time in GreenWich
       LMST:       local mean sidereal time at the defined time and longitude
       CT:         mean sidereal time converted to the civil time

         NOTE: if the GWmST = 0 then the CT: shows the Greenwich transit
               of the mean equinox.

    SUN's results

       greek letter Alfa= Right Ascension* = R.A.  hh.mmss      equatorial
                   Delta= Declination*             dd.mmss      coordinates
                     Azi= Azimuth   dd.mmss    horizon
                     Alt= Altitude  dd.mmss    coordinates
                    Rise= rising time
                     Set= setting time
                       R= geocentric distance
                      LT= civil time

            * apparent R.A. and apparent declination

       The reference point of the right ascension is the direction of
       the vernal equinoxes ( the first point of Aries ). This occurs when
       the Sun is in this direction ( about March 21st ). R.A. gets all
       values counterclockwise from zero to 360 degrees but usually the
       degrees are converted to the 24-hour system as this program does.
       The reference plane of the declination is the Earth's orbit plane.
       This number can get values (in the case of Sun) about -23 to 23

       This program counts the Azimuth  to the clockwise from the South
       on the northern hemisphere and from the North on the Southern hemis-
       phere and it gets all values between 0 and 360 degrees. E.g. if
       Azi= 90 deg. then the Sun is about in the West (if LATIT is positive).
       Altitude can have the values from -89.59... to 89.59... degrees
       where the zero plane is an observer's horizon plane.

       Distance unit is in the AU (=Astromical Unit = 1.49597870E11 meters ).

       The accuracy of the R.A. and Declination is few secons within
       about two decade from the present -- to the past and future.
       To the others the precision is not as good as this.


    REFERENCES

           Quarterly Journal of Royal Astronomical Society, 25(1),54(1984)
           The Astronomical Almanac 1991
           Practical Astronomy with Your Calculator, 3rd edition
           The Astrophysical Journal Supplement Series, 41:391-411,1979 Nov.


BYTES: #7B82h 7159