CalcLST
The CalcLST function returns the Local Sidereal Time for a date and time (UT or GMT) and a longitude. To get the Greenwich Sidereal Time, use a longitude of 0.
dLST = CalcLST( sDate, sTime, sLongitude )
This function returns the Local Sidereal Time in decimal hours. To convert to a time string, use HrToHMS..
The date, time, and longitude values may use any number of commonly use field delimiters. Some examples are shown below:
sDate: "2007 05 24" "2007-05-24" "2007/05/24" "2007, 05, 24"
sTime: "18 24 41.5" "18:24:41.5" "18h24m41.5s" "18,24,41.5"
sLongitude: "112 24 46.88" "112:24:46.88" "112d24m46.88s" "112,24,46.88"
The following script calculates the local sidereal time for a date, time, and longitude.
|
-- date: 28 Sept 2005 |
|
-- UT Time: 5h15m34s |
|
-- longitude: 88 degrees west |
|
-- result is in decimal hours |
|
-- convert hours to time string |
|
-- Result: LST = 23:49:41.013 |