Ignore:
Timestamp:
03/22/04 09:25:49 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mastro/MAstroSky2Local.cc

    r3537 r3568  
    6262#include "MAstroSky2Local.h"
    6363
     64#include "MAstro.h"
    6465#include "MTime.h"
    6566#include "MObservatory.h"
     
    128129// seen with an Alt/Az telescope.
    129130//
     131// For more information see MAstro::RotationAngle
     132//
    130133Double_t MAstroSky2Local::RotationAngle(Double_t ra, Double_t dec) const
    131134{
    132     TVector3 loc;
    133     loc.SetMagThetaPhi(1, TMath::Pi()/2-dec, ra);
    134     loc *= *this;
     135    TVector3 v;
     136    v.SetMagThetaPhi(1, TMath::Pi()/2-dec, ra);
     137    v *= *this;
    135138
    136     TRotation rot;
    137     rot.RotateZ(-loc.Phi());
    138     rot.RotateY(-loc.Theta());
    139 
    140     TVector3 v(1, 0, 0);
    141     v *= *this;
    142     v *= rot;
    143 
    144     return TMath::ATan2(v(1), v(0));
     139    return MAstro::RotationAngle(ZZ(), XZ(), v.Theta(), v.Phi());
    145140}
Note: See TracChangeset for help on using the changeset viewer.