next up previous contents
Next: Function: galactic_to_equatorial() Up: Galactic Modelling Previous: Function: local_sidereal_time()   Contents


Example: caltech_lst program

This program is an example of how to use the function local_sidereal_time() to compute the local sidereal time at the Caltech 40-meter laboratory. The program determines the present sidereal time at Caltech if it receives no arguments. Instead, the program can receive a single long integer specifying the number of seconds since 0h UTC 1 Jan 1970, and it returns the Caltech sidereal time at that time. Also returned are the number of seconds since 0h UTC 1 Jan 1970, the local and coordinated universal times, and the Greenwitch sidereal time. Some examples:

  1. caltech_lst
    881889773 seconds since 0h UTC 1 Jan 1970
    17:22:53 PST Thu 11 Dec 1997
    01:22:53 UTC Fri 12 Dec 1997
    22:53:30 (22.891788 h) Local Sidereal Time
    06:46:02 (06.767323 h) Greenwitch Sidereal Time
    
    (guess when I wrote this example!)
  2. caltech_lst 0
    0 seconds since 0h UTC 1 Jan 1970
    16:00:00 PST Wed 31 Dec 1969
    00:00:00 UTC Thu 01 Jan 1970
    22:48:23 (22.806442 h) Local Sidereal Time
    06:40:55 (06.681976 h) Greenwitch Sidereal Time
    

The program can be simply modified to correspond to your local sidereal time by changing the #define LONGITUDE command to your local longitude (in degrees West of Greenwitch).

author:
Jolien Creighton, jolien@tapir.caltech.edu

Includes/caltech_lst.tex



Bruce Allen 2000-11-19