diff --git a/movement/lib/moonrise/moonrise.c b/movement/lib/moonrise/moonrise.c index ecaa7838..948ee4b0 100644 --- a/movement/lib/moonrise/moonrise.c +++ b/movement/lib/moonrise/moonrise.c @@ -48,7 +48,7 @@ MoonRise MoonRise_calculate(double latitude, double longitude, time_t t) { self.queryTime = t; offsetDays = julianDate(t) - 2451545L; // Days since Jan 1, 2000, 1200UTC. // Begin testing (MR_WINDOW / 2) hours before requested time. - offsetDays -= (double)MR_WINDOW / (2 * 24) ; + //offsetDays -= (double)MR_WINDOW / (2 * 24) ; // Calculate coordinates at start, middle, and end of search period. for (int i = 0; i < 3; i++) { @@ -124,9 +124,9 @@ MoonRise MoonRise_calculate(double latitude, double longitude, time_t t) { time = k + e + 1 / 120; // Time since k=0 of event (in hours). // The time we started searching + the time from the start of the search to the - // event is the time of the event. Add (time since k=0) - window/2 hours. + // event is the time of the event. time_t eventTime; - eventTime = self.queryTime + (time - MR_WINDOW / 2) *60 *60; + eventTime = self.queryTime + (time) *60 *60; double hz, nz, dz, az; hz = ha[0] + e * (ha[2] - ha[0]); // Azimuth of the moon at the event.