Changeset 8818


Ignore:
Timestamp:
01/18/08 17:06:02 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy
Files:
5 edited

Legend:

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

    r4076 r8818  
    1515void SlaStars::Set(const AltAz &altaz)
    1616{
    17     fAltAz = altaz * kDeg2Rad;
     17    fAltAz = altaz * TMath::DegToRad();
    1818    fRaDec = CalcRaDec(fAltAz);
    1919}
     
    2121void SlaStars::Set(const ZdAz &zdaz)
    2222{
    23     fAltAz = AltAz(kPiDiv2-zdaz.Zd(), zdaz.Az()) * kDeg2Rad;
     23    fAltAz = AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()) * TMath::DegToRad();
    2424    fRaDec = CalcRaDec(fAltAz);
    2525}
     
    2727void SlaStars::Set(const RaDec &radec)
    2828{
    29     fRaDec = radec * kDeg2Rad;
     29    fRaDec = radec * TMath::DegToRad();
    3030    fAltAz = CalcAltAz(fRaDec);
    3131}
     
    5555RaDec SlaStars::CalcRaDec(const AltAz &altaz) const
    5656{
    57     return CalcRaDec(ZdAz(kPiDiv2-altaz.Alt(), altaz.Az()));
     57    return CalcRaDec(ZdAz(TMath::Pi()/2-altaz.Alt(), altaz.Az()));
    5858}
    5959
     
    102102    // Right Ascension/Declination [rad]
    103103    //
    104     return CalcRaDecFast(AltAz(kPiDiv2-zdaz.Zd(), zdaz.Az()));
     104    return CalcRaDecFast(AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az()));
    105105}
    106106
     
    116116    //
    117117    AltAz altaz = CalcAltAzFast(radec);
    118     return ZdAz(kPiDiv2-altaz.Alt(), altaz.Az());
     118    return ZdAz(TMath::Pi()/2-altaz.Alt(), altaz.Az());
    119119}
    120120
     
    170170{
    171171    ZdAz zdaz = CalcZdAz(radec);
    172     return AltAz(kPiDiv2-zdaz.Zd(), zdaz.Az());
     172    return AltAz(TMath::Pi()/2-zdaz.Zd(), zdaz.Az());
    173173}
    174174
  • trunk/MagicSoft/Cosy/catalog/Slalib.cc

    r8376 r8818  
    6161    slaDe2h(ha, dec, GetPhi(), &az, &alt);
    6262
    63     return ZdAz(kPiDiv2-alt, az);
     63    return ZdAz(TMath::Pi()/2-alt, az);
    6464}
  • trunk/MagicSoft/Cosy/catalog/StarCatalog.h

    r7764 r8818  
    5656    void PaintImg(unsigned char *buf, int w, int h);
    5757
    58     const AltAz GetAltAz() const /*[deg]*/ { return fAltAz*kRad2Deg; }
    59     const ZdAz  GetZdAz() const  /*[deg]*/ { return ZdAz(kPiDiv2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; }
     58    const AltAz GetAltAz() const /*[deg]*/ { return fAltAz*TMath::RadToDeg(); }
     59    const ZdAz  GetZdAz() const  /*[deg]*/ { return ZdAz(TMath::Pi()/2-fAltAz.Alt(), fAltAz.Az())*kRad2Deg; }
    6060    const RaDec GetRaDec() const /*[deg]*/ { return fRaDec*kRad2Deg; }
    6161
  • trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc

    r8376 r8818  
    271271void MGSkyPosition::SetDot(TArc *arc, const RaDec &radec, Int_t off)
    272272{
    273     RaDec rd(radec.Ra()+off*360/24*kDeg2Rad, radec.Dec());
     273    RaDec rd(radec.Ra()+off*360/24*TMath::DegToRad(), radec.Dec());
    274274    ZdAz zdaz = fSlaStar->CalcZdAzFast(rd);
    275275
     
    294294    static int Ry=~0;
    295295
    296     const float rad = az*kDeg2Rad;    // [rad]
     296    const float rad = az*TMath::DegToRad();    // [rad]
    297297
    298298    const float s = sin(rad);
     
    379379    UpdateStars();
    380380
    381     RaDec radec = fSlaStar->CalcRaDecFast(pos*kDeg2Rad);
     381    RaDec radec = fSlaStar->CalcRaDecFast(pos*TMath::DegToRad());
    382382    UpdatePosition(radec, pos.Zd(), pos.Az());
    383383    UpdateText(pos.Zd(), pos.Az());
  • trunk/MagicSoft/Cosy/main/MCaos.cc

    r8376 r8818  
    22
    33#include <fstream>
    4 #include <iomanip>
    54
    65#include <TSystem.h>
     
    1211#include <TCanvas.h>
    1312
     13#include "MLog.h"
     14#include "MLogManip.h"
     15
    1416#include "MTime.h"
     17#include "MPointing.h"
    1518
    1619#include "Led.h"
     
    1922#include "FilterLed.h"
    2023
    21 #include "coord.h"
    22 
    2324using namespace std;
    2425
     
    2829    if (!fin)
    2930    {
    30         cout << "ERROR - Cannot open " << name << endl;
     31        gLog << err << "ERROR - Cannot open " << name << endl;
    3132        return;
    3233    }
     
    3435    fPositions.Clear();
    3536
    36     cout << " Reading " << name << ":" << endl;
    37     cout << "------------------------------" << endl;
     37    gLog << all << " Reading " << name << ":" << endl;
     38    gLog << inf << "------------------------------" << endl;
    3839    while (1)
    3940    {
     
    4344            break;
    4445
    45         cout << " Led #" << fPositions.GetEntriesFast() << ":  ";
    46         cout << setw(3) << px << " ";
    47         cout << setw(3) << py << "  (";
    48         cout << setw(3) << ox << ", ";
    49         cout << setw(3) << oy << ")" << endl;
     46        gLog << " Led #" << fPositions.GetEntriesFast() << ":  ";
     47        gLog << setw(3) << px << " ";
     48        gLog << setw(3) << py << "  (";
     49        gLog << setw(3) << ox << ", ";
     50        gLog << setw(3) << oy << ")" << endl;
    5051        AddPosition(px, py, ox, oy);
    5152    }
    52     cout << "Found " << fPositions.GetEntriesFast() << " leds." << endl;
     53    gLog << all << "Found " << fPositions.GetEntriesFast() << " leds." << endl;
    5354}
    5455
     
    7475        fFile = NULL;
    7576
    76         cout << "Error: Cannot open file '" << name << "'" << endl;
     77        gLog << err << "ERROR - Cannot open file '" << name << "'" << endl;
    7778    }
    7879
     
    8788    tree->Branch("EvtTime.",    &fEvtTime,    "fEvtTime/D");
    8889
    89     cout << "Root file '" << name << "' open." << endl;
     90    gLog << inf << "Root file '" << name << "' open." << endl;
    9091}
    9192
     
    102103    fFile = NULL;
    103104
    104     cout << "Root file closed (n=" << n << ")" << endl;
     105    gLog << inf << "Root file closed (n=" << n << ")" << endl;
    105106
    106107    if (n<1)
    107108    {
    108109        gSystem->Unlink(name);
    109         cout << "Root file deleted - no entries." << endl;
     110        gLog << warn << "Root file deleted - no entries." << endl;
    110111    }
    111112}
Note: See TracChangeset for help on using the changeset viewer.