Logo coherent WaveBurst  
Library Reference Guide
Logo
TestIndingo.C
Go to the documentation of this file.
1 //
2 // Test CartesianComponents with INDIGO
3 // Author : Gabriele Vedovato
4 
5 
6 #define LATITUDE 14.4
7 #define LONGITUDE 76.4
8 
9 void TestIndingo() {
10 
11  double rad2grad = 180./TMath::Pi();
12  double grad2rad = TMath::Pi()/180.;
13 
14  double latitude=LATITUDE;
15  double longitude=LONGITUDE;
16  double elevation=0.0;
17  double X,Y,Z;
18 
19  cout << latitude << " " << longitude << " " << elevation << endl;
20  latitude*=grad2rad;
21  longitude*=grad2rad;
22  elevation*=grad2rad;
23  GeodeticToGeocentric(latitude,longitude,elevation,X,Y,Z);
24  cout.precision(10);
25  cout << X << " " << Y << " " << Z << endl;
26 
27  double uN[3];
28  double AltN = 0;
29  double AzN = 0;
30  GetCartesianComponents( uN, AltN*grad2rad, AzN*grad2rad, latitude, longitude);
31  cout << "uN : " << uN[0] << " " << uN[1] << " " << uN[2] << endl;
32 
33  double uE[3];
34  double AltE = 0;
35  double AzE = 90;
36  GetCartesianComponents( uE, AltE*grad2rad, AzE*grad2rad, latitude, longitude);
37  cout << "uE : " << uE[0] << " " << uE[1] << " " << uE[2] << endl;
38 
39  exit(0);
40 }
#define LATITUDE
Definition: TestIndingo.C:6
double Pi
void TestIndingo()
Definition: TestIndingo.C:9
double rad2grad
double grad2rad
void GeodeticToGeocentric(double latitude, double longitude, double elevation, double &X, double &Y, double &Z)
Definition: skycoord.hh:215
#define LONGITUDE
Definition: TestIndingo.C:7
void GetCartesianComponents(double u[3], double Alt, double Az, double Lat, double Lon)
Definition: skycoord.hh:387
exit(0)