Changeset 16970 for trunk/Mars


Ignore:
Timestamp:
07/21/13 17:08:04 (11 years ago)
Author:
tbretz
Message:
Added RaDecPosn which stores ra/dec in h/deg instead of deg/deg as EquPosn
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mcore/nova.h

    r16962 r16970  
    1111{
    1212    typedef ln_lnlat_posn LnLatPosn;
     13    typedef ln_rst_time   RstTime; // Note that times are in JD not Mjd
    1314    //typedef ln_hrz_posn   HrzPosn;
    14     typedef ln_equ_posn   EquPosn;
    15     typedef ln_rst_time   RstTime; // Note that times are in JD not Mjd
     15    //typedef ln_equ_posn   EquPosn;
    1616
    1717    struct ZdAzPosn;
     18    struct RaDecPosn;
     19
    1820
    1921    // Warning: 0deg=South, 90deg=W
     
    2628    struct ZdAzPosn
    2729    {
    28         double zd;
    29         double az;
     30        double zd; // [deg]
     31        double az; // [deg]
    3032
    3133        ZdAzPosn() : zd(0), az(0) { }
     
    3739
    3840    HrzPosn::HrzPosn(const ZdAzPosn &za) { alt = 90-za.zd; az = za.az-180; }
     41
     42
     43    // Note that right ascension is stored in degree
     44    struct EquPosn : public ln_equ_posn
     45    {
     46        EquPosn() { }
     47        EquPosn(const ZdAzPosn &);
     48    };
     49
     50    struct RaDecPosn
     51    {
     52        double ra;  // [h]
     53        double dec; // [deg]
     54
     55        RaDecPosn() : ra(0), dec(0) { }
     56        RaDecPosn(const EquPosn &equ) : ra(equ.ra/15), dec(equ.dec) { }
     57
     58        // This crahsed cint, but it could save up the dedicate structure HrzPosn :(
     59        //operator HrzPosn() const { const HrzPosn p = { az-180, 90-zd}; return p; }
     60    };
     61
     62    EquPosn::EquPosn(const RaDecPosn &rd) { ra = rd.ra*15; dec = rd.dec; }
    3963
    4064
Note: See TracChangeset for help on using the changeset viewer.