Changeset 14188 for trunk


Ignore:
Timestamp:
06/19/12 09:24:22 (12 years ago)
Author:
tbretz
Message:
Fixed a problem with the optionality of ra and dec
File:
1 edited

Legend:

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

    r14183 r14188  
    181181    const Moon moon(observer.lng, observer.lat, time);
    182182
    183     ln_equ_posn pos;
    184     pos.ra  = conf.Get<double>("ra")*15;
    185     pos.dec = conf.Get<double>("dec");
    186 
    187     ln_hrz_posn hrz;
    188     ln_get_hrz_from_equ(&pos, &observer, time.JD(), &hrz);
    189 
    190183    cout << setprecision(15);
    191184    cout << time.GetAsStr() << '\n';
     
    195188
    196189    if (conf.Has("ra") && conf.Has("dec"))
     190    {
     191        ln_equ_posn pos;
     192        pos.ra  = conf.Get<double>("ra")*15;
     193        pos.dec = conf.Get<double>("dec");
     194
     195        ln_hrz_posn hrz;
     196        ln_get_hrz_from_equ(&pos, &observer, time.JD(), &hrz);
    197197        cout << moon.Angle(pos.ra/15, pos.dec) << '\n';
     198    }
    198199
    199200    cout << endl;
Note: See TracChangeset for help on using the changeset viewer.