/[PAMELA software]/DarthVader/OrbitalInfo/src/InclinationInfo.cpp
ViewVC logotype

Diff of /DarthVader/OrbitalInfo/src/InclinationInfo.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by mocchiut, Thu Mar 15 12:46:04 2007 UTC revision 1.3 by mocchiut, Tue Apr 3 11:05:29 2007 UTC
# Line 85  InclinationInfo::~InclinationInfo() Line 85  InclinationInfo::~InclinationInfo()
85  {  {
86  }  }
87    
88  short int Sign_1(double_t a, Int_t b){  short int Sign_1(Double_t a, Int_t b){
89    if(a>0){b=1;}    if(a>0){b=1;}
90    if(a<0){b=-1;}    if(a<0){b=-1;}
91    else{b=0;}    else{b=0;}
# Line 97  void InclinationInfo::Clear(){ Line 97  void InclinationInfo::Clear(){
97    
98  void InclinationInfo::QuaternionstoAngle(Quaternions Qua){  void InclinationInfo::QuaternionstoAngle(Quaternions Qua){
99        
100    double_t a11     = pow(Qua.quat[0][0],2.)+pow(Qua.quat[0][1],2.)-pow(Qua.quat[0][2],2.)-pow(Qua.quat[0][3],2.);    Double_t a11     = pow(Qua.quat[0][0],2.)+pow(Qua.quat[0][1],2.)-pow(Qua.quat[0][2],2.)-pow(Qua.quat[0][3],2.);
101    double_t a12     = 2*(Qua.quat[0][1]*Qua.quat[0][2]+Qua.quat[0][0]*Qua.quat[0][3]);    Double_t a12     = 2*(Qua.quat[0][1]*Qua.quat[0][2]+Qua.quat[0][0]*Qua.quat[0][3]);
102    double_t a13     = 2*(Qua.quat[0][1]*Qua.quat[0][3]-Qua.quat[0][0]*Qua.quat[0][2]);    Double_t a13     = 2*(Qua.quat[0][1]*Qua.quat[0][3]-Qua.quat[0][0]*Qua.quat[0][2]);
103    double_t a21     = 2*(Qua.quat[0][1]*Qua.quat[0][2]-Qua.quat[0][0]*Qua.quat[0][3]);    Double_t a21     = 2*(Qua.quat[0][1]*Qua.quat[0][2]-Qua.quat[0][0]*Qua.quat[0][3]);
104    double_t a22     = pow(Qua.quat[0][0],2.)+pow(Qua.quat[0][2],2.)-pow(Qua.quat[0][1],2.)-pow(Qua.quat[0][3],2.);    Double_t a22     = pow(Qua.quat[0][0],2.)+pow(Qua.quat[0][2],2.)-pow(Qua.quat[0][1],2.)-pow(Qua.quat[0][3],2.);
105    double_t a23     = 2*(Qua.quat[0][2]*Qua.quat[0][3]+Qua.quat[0][0]*Qua.quat[0][1]);    Double_t a23     = 2*(Qua.quat[0][2]*Qua.quat[0][3]+Qua.quat[0][0]*Qua.quat[0][1]);
106    double_t a31     = 2*(Qua.quat[0][1]*Qua.quat[0][3]+Qua.quat[0][0]*Qua.quat[0][2]);    Double_t a31     = 2*(Qua.quat[0][1]*Qua.quat[0][3]+Qua.quat[0][0]*Qua.quat[0][2]);
107    double_t a32     = 2*(Qua.quat[0][2]*Qua.quat[0][3]-Qua.quat[0][0]*Qua.quat[0][1]);    Double_t a32     = 2*(Qua.quat[0][2]*Qua.quat[0][3]-Qua.quat[0][0]*Qua.quat[0][1]);
108    double_t a33     = pow(Qua.quat[0][0],2.)+pow(Qua.quat[0][3],2.)-pow(Qua.quat[0][1],2.)-pow(Qua.quat[0][2],2.);    Double_t a33     = pow(Qua.quat[0][0],2.)+pow(Qua.quat[0][3],2.)-pow(Qua.quat[0][1],2.)-pow(Qua.quat[0][2],2.);
109    double_t a       = 360/(2*TMath::Pi());    Double_t a       = 360/(2*TMath::Pi());
110    double_t eksi    = 0.0000001;    Double_t eksi    = 0.0000001;
111    double_t eteta   = 0.0000001;    Double_t eteta   = 0.0000001;
112    double_t ksteta  = a22*a22/(a12*a12+a22*a22);    Double_t ksteta  = a22*a22/(a12*a12+a22*a22);
113    double_t ksksi   = a33*a33/(a33*a33+a31*a31);    Double_t ksksi   = a33*a33/(a33*a33+a31*a31);
114        
115    Int_t kj1;    Int_t kj1;
116    if (a33<0){kj1=1;    if (a33<0){kj1=1;
# Line 213  return ; Line 213  return ;
213            
214  void InclinationInfo::TransAngle(Double_t x0, Double_t y0, Double_t z0, Double_t Vx0, Double_t Vy0, Double_t Vz0, Double_t gamar, Double_t ksir, Double_t tetar, Double_t q0, Double_t q1, Double_t q2, Double_t q3){  void InclinationInfo::TransAngle(Double_t x0, Double_t y0, Double_t z0, Double_t Vx0, Double_t Vy0, Double_t Vz0, Double_t gamar, Double_t ksir, Double_t tetar, Double_t q0, Double_t q1, Double_t q2, Double_t q3){
215            
216      double_t a = 360/(2*TMath::Pi());      Double_t a = 360/(2*TMath::Pi());
217    
218  //  Points on three axes of Resurs' coordinate system (RCS)  //  Points on three axes of Resurs' coordinate system (RCS)
219      Int_t XRCS[3]; Int_t YRCS[3]; Int_t ZRCS[3];      Int_t XRCS[3]; Int_t YRCS[3]; Int_t ZRCS[3];

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.23