Changeset 1784 for trunk/MagicSoft/Cosy


Ignore:
Timestamp:
02/21/03 19:40:04 (22 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/Changelog

    r1760 r1784  
    11                                                                  -*-*- END -*-*-
     2 2003/02/21 - Thomas Bretz (La Palma):
     3
     4   * gui/MGSkyPosition.[h,cc]:
     5     - some changes trying to get rid of a strange memory leak
     6
     7   * candrv/nodedrv.cc:
     8     - changed output
     9
     10   * catalog/Slalib.h:
     11     - added Hms2DegRad and Dms2Rad
     12
     13
    214 2003/02/16 - Thomas Bretz (La Palma):
    315
  • trunk/MagicSoft/Cosy/candrv/nodedrv.cc

    r1727 r1784  
    154154
    155155    lout << hex << setfill('0');
    156     lout << "Sdo=" << idx  << "/" << (int)subidx << " set.";
     156    lout << "Node #" << (int)fId << ": Sdo=" << idx  << "/" << (int)subidx << " set.";
    157157    lout << endl;
    158158
  • trunk/MagicSoft/Cosy/catalog/Slalib.h

    r1758 r1784  
    1717    virtual ~Slalib();
    1818
     19    static Double_t Dms2Rad(Int_t deg, UInt_t min, Double_t sec)
     20    {
     21        /* pi/(180*3600):  arcseconds to radians */
     22#define DAS2R 4.8481368110953599358991410235794797595635330237270e-6
     23        return DAS2R * (60.0 * (60.0 * (Double_t)deg + (Double_t)min) + sec);
     24    }
     25
     26    static Double_t Hms2Rad(Int_t hor, UInt_t min, Double_t sec)
     27    {
     28        /* pi/(12*3600):  seconds of time to radians */
     29#define DS2R 7.2722052166430399038487115353692196393452995355905e-5
     30        return DS2R * (60.0 * (60.0 * (Double_t)hor + (Double_t)min) + sec);
     31    }
     32
    1933    virtual void SetMjd(double mjd);
    2034
  • trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc

    r1760 r1784  
    7272    {
    7373        fStars[i] = new TArc(0, 0, 1);
    74         InitArc(fStars[i], 1001, kWhite, kWhite);
     74        InitArc(fStars[i], 1001, 17, 15);
    7575        fList->Add(fStars[i]);
    7676    }
     
    104104}
    105105
     106static const RaDec stars[13] =
     107{
     108    // 32349   Sirius           -1.44 1.45    2.64      0.009   A0m
     109    (RaDec(Slalib::Hms2Rad(  6, 45, 0), Slalib::Dms2Rad(-16, 42, 0))),
     110    // 30438   Canopus          -0.62 -5.53   95.88     0.164   F0Ib
     111    (RaDec(Slalib::Hms2Rad(  6, 23, 0), Slalib::Dms2Rad(-52, 41, 0))),
     112    // 69673   Arcturus         -0.05 -0.31   11.25     1.239   K2IIIp
     113    (RaDec(Slalib::Hms2Rad( 14, 15, 0), Slalib::Dms2Rad( 19, 10, 0))),
     114    (RaDec(Slalib::Hms2Rad( 01, 37, 6), Slalib::Dms2Rad(-57, 14, 0))),
     115    (RaDec(Slalib::Hms2Rad( 12, 26, 6), Slalib::Dms2Rad(-63, 06, 0))),
     116    (RaDec(Slalib::Hms2Rad( 13, 25, 2), Slalib::Dms2Rad(-11, 10, 0))),
     117    (RaDec(Slalib::Hms2Rad(  5, 14, 0), Slalib::Dms2Rad(- 8, 12, 5))),
     118    (RaDec(Slalib::Hms2Rad( 19, 50, 0), Slalib::Dms2Rad(- 8, 52, 6))),
     119    (RaDec(Slalib::Hms2Rad( 18, 37, 0), Slalib::Dms2Rad( 38, 47, 0))),
     120    (RaDec(Slalib::Hms2Rad(  5, 16, 0), Slalib::Dms2Rad( 46, 00, 0))),
     121    (RaDec(Slalib::Hms2Rad(  7, 39, 0), Slalib::Dms2Rad(  5, 14, 0))),
     122    (RaDec(Slalib::Hms2Rad(  5, 55, 0), Slalib::Dms2Rad(  7, 24, 0))),
     123    (RaDec(Slalib::Hms2Rad( 19, 50, 0), Slalib::Dms2Rad(  8, 52, 0)))
     124};
     125
    106126void MGSkyPosition::UpdateStars()
    107127{
    108     RaDec stars[13];
    109 
    110     // 32349   Sirius           -1.44 1.45    2.64      0.009   A0m
    111     stars[0] = RaDec(MObservatory::Hms2Rad(  6, 45, 0), MObservatory::Dms2Rad(-16, 42, 0));
    112     // 30438   Canopus          -0.62 -5.53   95.88     0.164   F0Ib
    113     stars[1] = RaDec(MObservatory::Hms2Rad(  6, 23, 0), MObservatory::Dms2Rad(-52, 41, 0));
    114     // 69673   Arcturus         -0.05 -0.31   11.25     1.239   K2IIIp
    115     stars[2] = RaDec(MObservatory::Hms2Rad( 14, 15, 0), MObservatory::Dms2Rad( 19, 10, 0));
    116     stars[3] = RaDec(MObservatory::Hms2Rad( 01, 37, 6), MObservatory::Dms2Rad(-57, 14, 0));
    117     stars[4] = RaDec(MObservatory::Hms2Rad( 12, 26, 6), MObservatory::Dms2Rad(-63, 06, 0));
    118     stars[5] = RaDec(MObservatory::Hms2Rad( 13, 25, 2), MObservatory::Dms2Rad(-11, 10, 0));
    119     stars[6] = RaDec(MObservatory::Hms2Rad(  5, 14, 0), MObservatory::Dms2Rad(- 8, 12, 5));
    120     stars[7] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(- 8, 52, 6));
    121     stars[8] = RaDec(MObservatory::Hms2Rad( 18, 37, 0), MObservatory::Dms2Rad( 38, 47, 0));
    122     stars[9] = RaDec(MObservatory::Hms2Rad(  5, 16, 0), MObservatory::Dms2Rad( 46, 00, 0));
    123     stars[10] = RaDec(MObservatory::Hms2Rad(  7, 39, 0), MObservatory::Dms2Rad(  5, 14, 0));
    124     stars[11] = RaDec(MObservatory::Hms2Rad(  5, 55, 0), MObservatory::Dms2Rad(  7, 24, 0));
    125     stars[12] = RaDec(MObservatory::Hms2Rad( 19, 50, 0), MObservatory::Dms2Rad(  8, 52, 0));
    126 
    127128    for (int i=0; i<13; i++)
    128129        SetDot(fStars[i], stars[i], 0);
    129 
    130 }
     130}
     131
    131132void MGSkyPosition::InitText()
    132133{
     
    244245}
    245246
    246 void MGSkyPosition::SetDot(TArc *arc, RaDec &radec, Int_t off)
     247void MGSkyPosition::SetDot(TArc *arc, const RaDec &radec, Int_t off)
    247248{
    248249    RaDec rd(radec.Ra()+off*360/24*kDeg2Rad, radec.Dec());
     
    258259    arc->SetY1(y);
    259260
    260     SetModified();
     261    //SetModified(); ***MEMORY LEAK!!!***
    261262}
    262263
  • trunk/MagicSoft/Cosy/gui/MGSkyPosition.h

    r1760 r1784  
    6767    void SetLin2(Float_t x1, Float_t y1, Float_t x2, Float_t y2);
    6868
    69     void SetDot(TArc *arc, RaDec &radec, Int_t off);
     69    void SetDot(TArc *arc, const RaDec &radec, Int_t off);
    7070
    7171    void UpdateStars();
Note: See TracChangeset for help on using the changeset viewer.