- Returns
- The time of the next 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 346 of file Time.cc.
References JD(), Mjd(), Nova::ORM(), and Time().
Referenced by DataLogger::DataLogger(), StateMachineLidControl< T, S >::Execute(), StateMachineDrive< T, S >::Execute(), StateMachineBias< T, S >::Execute(), and DataLogger::Report().
352 if (ln_get_solar_rst_horizon(
JD()-0.5, &obs, horizon, &sun_day)==1)
353 throw runtime_error(
"ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
355 if (
Time(sun_day.rise)>=*
this)
356 return Time(sun_day.rise);
358 if (ln_get_solar_rst_horizon(
JD()+0.5, &obs, horizon, &sun_day)==1)
359 throw runtime_error(
"ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
361 return Time(sun_day.rise);
363 return Time(floor(
Mjd()+0.5))+0.5;
Time(enum init_t type=utc)