- Returns
- The time of the previous sun-rise, relative to given horizon in degree, for the coordinates of the ORM, La Palma. if libnova was not compiled in, it will return the next noon.
- Exceptions
-
a | runtime_error exception is thrown if the calculation of the sun-rise by libnova fails (this would happen if libnova thinks the sun is circumpolar which should never happen at La Palma) |
Definition at line 313 of file Time.cc.
References JD(), Mjd(), Nova::ORM(), and Time().
Referenced by EventBuilderWrapper::InitRunNumber().
319 if (ln_get_solar_rst_horizon(
JD()-0.5, &obs, horizon, &sun_day)==1)
320 throw runtime_error(
"ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
322 if (
Time(sun_day.rise)<*
this)
323 return Time(sun_day.rise);
325 if (ln_get_solar_rst_horizon(
JD()-1.5, &obs, horizon, &sun_day)==1)
326 throw runtime_error(
"ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
328 return Time(sun_day.rise);
330 return Time(floor(
Mjd()-0.5)+0.5);
Time(enum init_t type=utc)