** Next:** Example: caltech_lst program
** Up:** Galactic Modelling
** Previous:** Galactic Modelling
** Contents**

##

Function: `local_sidereal_time()`

float local_sidereal_time(time_t time, float longitude)

Returns the local sidereal time, in decimal hours, for a given calendar time
and detector longitude. The arguments are:

`time`: Input. The time as an integer number of seconds since
0h 1 January 1970. This number is returned by the time routines in
`<time.h>`.
`longitude`: Input. The longitude of the detector in degrees
West.

The local sidereal time is calculated as follows. Let JD be the Julian date
of 0h on the desired calendar day. (This is computed using the Numerical
Recipes routine `julday()`, but a value of 0.5 must be subtracted from
this routine to give the JD at 0h rather than at 12h.) The
Universal Time, UT, is computed using the `gmtime()` function.
The Greenwich Sidereal Time, GST, is

(modulo 24 hours) where

and

The *local* sidereal time is obtained by subtracting the longitude of the
detector expressed as decimal hours West of Greenwich.

- Author: Jolien Creighton, jolien@tapir.caltech.edu
- Comments: This routine is adapted from the method given in:
Peter Duffet-Smith
*Practical Astronomy with Your Calculator,*
3rd edition,
(Cambridge University Press, 1988).

** Next:** Example: caltech_lst program
** Up:** Galactic Modelling
** Previous:** Galactic Modelling
** Contents**
Bruce Allen
2000-11-19