1 // $Id: Skycal.hh 5748 2014-10-11 19:38:53Z flaterco $ 2 3 // Skycal.hh -- Functions for sun and moon events. 4 // Please see Skycal.cc for verbose commentary. 5 6 // Prediction of moon phases, sun and moon rises and sets has nothing 7 // to do with tide prediction. There is no overlap between this code 8 // and the tide prediction code. 9 10 namespace libxtide { 11 12 namespace Skycal { 13 14 // eventTime and eventType are set to the next moon phase event 15 // following time t. Nothing else in tideEvent_out is changed. 16 void findNextMoonPhase (Timestamp t, TideEvent &tideEvent_out); 17 18 // eventTime and eventType are set to the next (sun/moon) rise or 19 // set event following time t. Nothing else in tideEvent_out is 20 // changed. 21 enum RiseSetType {solar, lunar}; 22 void findNextRiseOrSet (Timestamp t, 23 const Coordinates &c, 24 RiseSetType riseSetType, 25 TideEvent &tideEvent_out); 26 27 // Returns true if sun is up at time t. 28 const bool sunIsUp (Timestamp t, const Coordinates &c); 29 30 #ifdef EXPERIMENTAL_MOON_AGE_NOT_PHASE 31 // 2014-06-22: Fast path to find bracketing new moon events. 32 // prev_out <= t < next_out. 33 void findNewMoons (Timestamp t, Timestamp &prev_out, Timestamp &next_out); 34 #endif 35 36 } 37 38 } 39