Ignore:
Timestamp:
02/14/03 17:12:58 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/catalog
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc

    r1109 r1757  
    2929}
    3030
     31#include "SlaStars.h"
     32
    3133void SlaPlanets::UpdatePlanetPos(ePlanets_t planet)
    3234{
     35    /*
    3336    double cp[6] = { 0, 0, 0, 0, 0, 0 };
    3437
     
    5255    case kENeptune:
    5356    case kEPluto:
     57    case kESun:
    5458        {
    55             //
    56             // coordinates of planet: heliocentric, equatoril, J2000
    57             //
     59        */
     60    //
     61    // coordinates of planet: heliocentric, equatoril, J2000
     62    //
     63    double ra,dec,diam;
     64    // TDB, planet, elong, phi, *ra, *dec, *diam
    5865
    59             int rc;
    60             slaPlanet(GetMjd(), planet, cp, &rc);
     66    // One can use TT instead of TDB for all plenets
     67    // (except the moon)
    6168
    62             if (rc)
    63                 return;
    64         }
    65         // !! Fall through!
     69    const double tt = GetMjd() + slaDtt(GetMjd())/60./60./24.;
    6670
    67     case kESun:
    68         coord[0] = cp[0] - fEarth[0];
    69         coord[1] = cp[1] - fEarth[1];
    70         coord[2] = cp[2] - fEarth[2];
    71         break;
    72     }
     71    // FIXME: Shell be UT1
     72    const double ut1 = fmod(GetMjd(), 1);
    7373
    74     fZdAz[planet] = XYZ2ZdAz(coord);
     74    // tt should be tdb, but tt can be used
     75    const double tdb = tt + slaRcc(tt, ut1, GetElong(), 8300*cos(GetPhi()), 8300*sin(GetPhi() ))/60./60./24.;
     76    /*
     77     cout << "Dt: " << slaDtt(GetMjd()) << endl;
     78     cout << "Rc: " << slaRcc(tt, ut1, GetElong(), 8300*cos(GetPhi()), 8300*sin(GetPhi() )) << endl;
     79     */
     80    slaRdplan(tt, planet, GetElong(), GetPhi(),
     81              &ra, &dec, &diam);
     82    /*
     83     switch (planet)
     84     {
     85     case kEMoon: cout << "Moon: "; break;
     86     case kEMercury: cout << "Merkur: "; break;
     87     case kEVenus: cout << "Venus: "; break;
     88     case kEMars: cout << "Mars: "; break;
     89     case kEJupiter: cout << "Jupiter: "; break;
     90     case kESaturn: cout << "Saturn: "; break;
     91     case kEUranus: cout << "Uranus: "; break;
     92     case kENeptune: cout << "Neptun: "; break;
     93     case kEPluto: cout << "Pluto: "; break;
     94     case kESun: cout << "Sonne: "; break;
     95     }
     96
     97     cout << (int)(ra*12/TMath::Pi()) << "h"<< (int)(ra*12/TMath::Pi()*60)%60 <<"min ";
     98     cout << (int)(dec*kRad2Deg) << "deg" << (int)(dec*kRad2Deg*60)%60 << "min" << endl;
     99     */
     100    /*
     101     SlaStars sla;
     102     sla.SetMjd(GetMjd());
     103     ZdAz za = sla.CalcZdAz(RaDec(ra,dec));
     104     cout << za.Zd()*kRad2Deg << " " << fmod(za.Az()*kRad2Deg+720,360.) << endl;
     105     fZdAz[planet] = za;
     106     */
     107
     108    double az, el;
     109    slaDe2h(GetAlpha()-ra, dec, GetPhi(), &az, &el);
     110
     111    cout << 90-el*kRad2Deg << " " << fmod(az*kRad2Deg+720,360.) << endl;
     112    fZdAz[planet].Set(TMath::Pi()/2-el, az);
     113    /*
     114     }
     115     // !! Fall through!
     116     break;
     117     case kESun:
     118     coord[0] = cp[0] - fEarth[0];
     119     coord[1] = cp[1] - fEarth[1];
     120     coord[2] = cp[2] - fEarth[2];
     121     break;
     122     }
     123     fZdAz[planet] = XYZ2ZdAz(coord);
     124
     125     if (planet==kESun)
     126     {
     127     cout << fZdAz[kESun].Zd()*kRad2Deg << " " <<  fZdAz[kESun].Az()*kRad2Deg << endl;
     128     }*/
    75129}
  • trunk/MagicSoft/Cosy/catalog/SlaStars.cc

    r1691 r1757  
    3838    // ----- calculate star independent parameters ----------
    3939    //
    40     slaMappa(2000.0, mjd, fAmprms);
    41     slaAoppa(mjd, 0,                    // mjd, UT1-UTC
     40
     41    // prepare calculation: Mean Place to geocentric apperent
     42    slaMappa(2000.0, mjd, fAmprms);        // Epoche, TDB
     43
     44    // prepare: Apperent to observed place
     45    slaAoppa(mjd, 0,                       // mjd, Delta UT=UT1-UTC
    4246             // GetElong(), GetPhi(), 148, // göttingen long, lat, height
    43              GetElong(), GetPhi(), 300, // göttingen long, lat, height
    44              0, 0,                      // polar motion x, y-coordinate (radians)
     47             GetElong(), GetPhi(), GetHeight(), // göttingen long, lat, height
     48             0, 0,                         // polar motion x, y-coordinate (radians)
    4549             // 273.155, 1013.25, 0.5,     // temp, pressure, humidity
    4650             273.155+20, 1013.25, 0.5,     // temp, pressure, humidity
    4751             // 0.2, 0.0065,               // wavelength, tropo lapse rate
    48              0.55, 0.0065,               // wavelength, tropo lapse rate
     52             0.55, 0.0065,                 // wavelength, tropo lapse rate
    4953             fAoprms);
    5054}
  • trunk/MagicSoft/Cosy/catalog/Slalib.cc

    r1109 r1757  
    1818    //
    1919    int status;
    20     slaDaf2r(51, 38, 48.0, &fPhi,   &status);
    21     slaDaf2r( 9, 56, 36.0, &fElong, &status);
     20    //slaDaf2r(51, 38, 48.0, &fPhi,   &status);
     21    //slaDaf2r( 9, 56, 36.0, &fElong, &status);
     22    //fHeight = 300;
     23
     24    slaDaf2r(28, 45, 30.0, &fPhi,   &status);
     25    slaDaf2r(17, 52, 48.0, &fElong, &status);
     26
     27    fElong *= -1;
     28    fHeight = 2326;
    2229
    2330    cout << "Latitude: 51\x9c 38'48.0\" = " <<  kRad2Deg*fPhi << "   ";
  • trunk/MagicSoft/Cosy/catalog/Slalib.h

    r1109 r1757  
    1616    double   fElong;
    1717
     18    double   fHeight;
     19
    1820public:
    1921    Slalib();
     
    2931    virtual void SetMjd(const double mjd);
    3032
    31     double GetAlpha() const { return fAlpha; }
    32     double GetMjd() const   { return fMjd; }
     33    double GetAlpha() const  { return fAlpha; }
     34    double GetMjd() const    { return fMjd; }
    3335
    34     double GetPhi() const   { return fPhi; }
    35     double GetElong() const { return fElong; }
     36    double GetPhi() const    { return fPhi; }
     37    double GetElong() const  { return fElong; }
     38
     39    double GetHeight() const { return fHeight; }
    3640
    3741    ZdAz   XYZ2ZdAz(double coord[3]) const;
Note: See TracChangeset for help on using the changeset viewer.