Changeset 15205


Ignore:
Timestamp:
03/30/13 16:39:16 (12 years ago)
Author:
tbretz
Message:
Use some simplifications coming with the new C++ wrapper for libnova.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/Time.cc

    r15202 r15205  
    307307{
    308308#ifdef HAVE_LIBNOVA
     309    Nova::LnLatPosn obs = Nova::ORM();
     310
    309311    ln_rst_time sun_day;
    310     if (ln_get_solar_rst_horizon(JD()-0.5, &Nova::ORM(), horizon, &sun_day)==1)
     312    if (ln_get_solar_rst_horizon(JD()-0.5, &obs, horizon, &sun_day)==1)
    311313        throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
    312314
     
    314316        return Time(sun_day.rise);
    315317
    316     if (ln_get_solar_rst_horizon(JD()-1.5, &Nova::ORM(), horizon, &sun_day)==1)
     318    if (ln_get_solar_rst_horizon(JD()-1.5, &obs, horizon, &sun_day)==1)
    317319        throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
    318320
     
    338340{
    339341#ifdef HAVE_LIBNOVA
     342    Nova::LnLatPosn obs = Nova::ORM();
     343
    340344    ln_rst_time sun_day;
    341     if (ln_get_solar_rst_horizon(JD()-0.5, &Nova::ORM(), horizon, &sun_day)==1)
     345    if (ln_get_solar_rst_horizon(JD()-0.5, &obs, horizon, &sun_day)==1)
    342346        throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
    343347
     
    345349        return Time(sun_day.rise);
    346350
    347     if (ln_get_solar_rst_horizon(JD()+0.5, &Nova::ORM(), horizon, &sun_day)==1)
     351    if (ln_get_solar_rst_horizon(JD()+0.5, &obs, horizon, &sun_day)==1)
    348352        throw runtime_error("ln_get_solar_rst_horizon reported the sun to be circumpolar at the coordinates of La Palma!");
    349353
Note: See TracChangeset for help on using the changeset viewer.