Changeset 12763 for trunk


Ignore:
Timestamp:
01/25/12 11:01:54 (13 years ago)
Author:
tbretz
Message:
Added the moon track to GetVisibilityCurve.q
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/mastro/MAstroCatalog.cc

    r11553 r12763  
    721721    }
    722722
    723     MVector3 *star = static_cast<MVector3*>(FindObject(name ? name : g.GetName()));
    724     if (!star)
     723    const Bool_t ismoon = TString(name).CompareTo("moon", TString::kIgnoreCase)==0;
     724
     725    MVector3 *star = ismoon ? 0 : static_cast<MVector3*>(FindObject(name ? name : g.GetName()));
     726    if (!star && !ismoon)
    725727        return;
    726728
     
    737739        const MTime tm(mjd-lng+offset);
    738740
    739         MVector3 v(*star);
     741        MVector3 v = star ? *star : MVector3();
     742        if (!star)
     743        {
     744            Double_t ra, dec;
     745            MAstro::GetMoonRaDec(tm.GetMjd(), ra, dec);
     746            v = MVector3(ra, dec);
     747        }
     748
    740749        v *= MAstroSky2Local(tm.GetGmst(), *fObservatory);
    741750
Note: See TracChangeset for help on using the changeset viewer.