Telescope Control Library
Diff: CelestialMath.cpp
- Revision:
- 18:3ea58b079adc
- Parent:
- 0:6cb2eaf8b133
--- a/CelestialMath.cpp Fri Sep 14 21:09:02 2018 -0400 +++ b/CelestialMath.cpp Sun Sep 23 02:32:42 2018 -0400 @@ -83,7 +83,7 @@ return CelestialMath::equatorialToLocalEquatorial(star_ref, timestamp, loc); } -double CelestialMath::getGreenwichMeanSiderealTime(time_t timestamp) +double CelestialMath::getGreenwichMeanSiderealTime(double timestamp) { double jd = (double) timestamp * 1.1574074074074E-5 + 2440587.5 - 2451545.0; // Julian Date since J2000 // double jd0 = floor(jd - 0.5) + 0.5; // JD of previous midnight @@ -95,7 +95,7 @@ return remainder(gmst, 360.0); } -double CelestialMath::getLocalSiderealTime(time_t timestamp, +double CelestialMath::getLocalSiderealTime(double timestamp, const LocationCoordinates &loc) { double gmst = getGreenwichMeanSiderealTime(timestamp); @@ -104,7 +104,7 @@ } LocalEquatorialCoordinates CelestialMath::equatorialToLocalEquatorial( - const EquatorialCoordinates &e, time_t timestamp, + const EquatorialCoordinates &e, double timestamp, const LocationCoordinates &loc) { // From phi to cphi @@ -113,7 +113,7 @@ } EquatorialCoordinates CelestialMath::localEquatorialToEquatorial( - const LocalEquatorialCoordinates &a, time_t timestamp, + const LocalEquatorialCoordinates &a, double timestamp, const LocationCoordinates &loc) { // From cphi to phi @@ -988,7 +988,7 @@ } double CelestialMath::kingRate(EquatorialCoordinates eq, - LocationCoordinates loc, time_t time) + LocationCoordinates loc, double time) { LocalEquatorialCoordinates leq = CelestialMath::equatorialToLocalEquatorial( eq, time, loc);