Changeset 15202
- Timestamp:
- 03/30/13 16:26:47 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/Time.cc
r15190 r15202 28 28 29 29 #ifdef HAVE_LIBNOVA 30 #include <libnova/solar.h> 31 #include <libnova/rise_set.h> 30 #include "../externals/nova.h" 32 31 #endif 33 32 … … 308 307 { 309 308 #ifdef HAVE_LIBNOVA 310 const double lon = -(17.+53./60+26.525/3600);311 const double lat = 28.+45./60+42.462/3600;312 313 ln_lnlat_posn observer;314 observer.lng = lon;315 observer.lat = lat;316 317 309 ln_rst_time sun_day; 318 if (ln_get_solar_rst_horizon(JD()-0.5, & observer, horizon, &sun_day)==1)310 if (ln_get_solar_rst_horizon(JD()-0.5, &Nova::ORM(), horizon, &sun_day)==1) 319 311 throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!"); 320 312 … … 322 314 return Time(sun_day.rise); 323 315 324 if (ln_get_solar_rst_horizon(JD()-1.5, & observer, horizon, &sun_day)==1)316 if (ln_get_solar_rst_horizon(JD()-1.5, &Nova::ORM(), horizon, &sun_day)==1) 325 317 throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!"); 326 318 … … 346 338 { 347 339 #ifdef HAVE_LIBNOVA 348 const double lon = -(17.+53./60+26.525/3600);349 const double lat = 28.+45./60+42.462/3600;350 351 ln_lnlat_posn observer;352 observer.lng = lon;353 observer.lat = lat;354 355 340 ln_rst_time sun_day; 356 if (ln_get_solar_rst_horizon(JD()-0.5, & observer, horizon, &sun_day)==1)341 if (ln_get_solar_rst_horizon(JD()-0.5, &Nova::ORM(), horizon, &sun_day)==1) 357 342 throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!"); 358 343 … … 360 345 return Time(sun_day.rise); 361 346 362 if (ln_get_solar_rst_horizon(JD()+0.5, & observer, horizon, &sun_day)==1)347 if (ln_get_solar_rst_horizon(JD()+0.5, &Nova::ORM(), horizon, &sun_day)==1) 363 348 throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!"); 364 349
Note:
See TracChangeset
for help on using the changeset viewer.