Logo Search packages:      
Sourcecode: icu version File versions  Download package

double CalendarAstronomer::lstToUT ( double  lst)

Converts local sidereal time to Universal Time.

lstThe Local Sidereal Time, in hours since sidereal midnight on this object's current date.
The corresponding Universal Time, in milliseconds since 1 Jan 1970, GMT.

Definition at line 419 of file astro.cpp.

References ClockMath::floorDivide(), and fTime.

    // Convert to local mean time
    double lt = normalize((lst - getSiderealOffset()) * 0.9972695663, 24);

    // Then find local midnight on this day
    double base = (DAY_MS * ClockMath::floorDivide(fTime + fGmtOffset,(double)DAY_MS)) - fGmtOffset;

    //out("    lt  =" + lt + " hours");
    //out("    base=" + new Date(base));

    return base + (long)(lt * HOUR_MS);

Here is the call graph for this function:

Generated by  Doxygen 1.6.0   Back to index