1 #ifndef ANTARCTICA_GEOM_H 2 #define ANTARCTICA_GEOM_H 10 #include "RampdemReader.h" 12 #include "TH2DAntarctica.h" 15 #include "RefractionModel.h" 31 AntarcticCoord(CoordType coord_type = CARTESIAN,
double xval = 0,
double yval = 0,
double zval = 0)
33 set (coord_type,xval,yval,zval) ;
38 set(CARTESIAN, v.x(),v.y(),v.z());
49 return TVector3(c.x,c.y,c.z);
54 void set(CoordType coord_type ,
double xval ,
double yval ,
double zval )
64 static double surfaceDistance(
double lat0,
double lat1,
double lon0,
double lon1);
70 void to(CoordType new_type) {
if (new_type != type) {convert(new_type);} }
72 CoordType currentType()
const {
return type; }
77 void asString(TString * str)
const;
80 void convert(CoordType new_type);
95 CartesianSurfaceMap(
double resolution = 1e3, RampdemReader::dataSet d = RampdemReader::rampdem);
97 double surface(
double x,
double y)
const;
98 double z(
double x,
double y)
const;
99 double metersAboveIce(
double x,
double y,
double z)
const;
100 TH2 * getMap() {
return map; }
141 virtual int NSegments()
const = 0;
157 virtual int getNeighbors(
int segment, std::vector<int> * neighbors = NULL)
const = 0;
170 virtual void Draw(
const char * opt =
"colz",
const double * data = 0,
const double * range = 0 )
const;
173 virtual void DrawI(
const char * opt =
"colz",
const int * data = 0,
const double * range = 0)
const;
177 virtual void asString(TString * str)
const = 0;
178 virtual void setRampdemDataset( RampdemReader::dataSet d) { dataset = d; }
182 RampdemReader::dataSet dataset;
195 StereographicGrid(
int nx = 512,
int ny = 512,
double max_E = 3330000,
double max_N = 3330000);
198 virtual int getNeighbors(
int segment, std::vector<int> * neighbors = NULL)
const;
199 virtual int NSegments()
const {
return nx * ny; }
202 virtual void Draw(
const char * opt =
"colz",
const double * data = 0,
const double * range = 0)
const;
205 virtual void asString(TString * str)
const;
238 double apparent_source_theta;
239 double apparent_payload_el;
242 bool checkForCollision(
double dx = 100,
AntarcticCoord * where = 0,
AntarcticCoord * where_exit = 0, RampdemReader::dataSet d = RampdemReader::rampdem,
double grace = 20,
bool reverse =
false)
const;
255 static double getHorizon(
double phi,
const Adu5Pat * gps,
const Refraction::Model * refractionModel = 0,
double tol = 5e-6, RampdemReader::dataSet rampdemData= RampdemReader::rampdem);
257 static int findSourceOnContinent(
double theta,
double phi,
260 double collision_check_dx = 0,
264 RampdemReader::dataSet d= RampdemReader::rampdem);
virtual void Draw(const char *opt="colz", const double *data=0, const double *range=0) const
virtual AntarcticCoord * sampleSegment(int idx, int N, AntarcticCoord *fillus=0, bool random=true, bool fillalt=true) const
Adu5Pat – The ADU5 Position and Attitude Data.
virtual void getSegmentCenter(int idx, AntarcticCoord *fillme, bool fillalt=true) const =0
Float_t latitude
In degrees.
virtual AntarcticCoord * sampleSegment(int idx, int N, AntarcticCoord *fillus=0, bool random=true, bool fillalt=true) const =0
Float_t longitude
In degrees.
static double getHorizon(double phi, const Adu5Pat *gps, const Refraction::Model *refractionModel=0, double tol=5e-6, RampdemReader::dataSet rampdemData=RampdemReader::rampdem)
virtual int getNeighbors(int segment, std::vector< int > *neighbors=NULL) const =0
virtual void getSegmentCenter(int idx, AntarcticCoord *fill, bool fillalt=true) const
virtual AntarcticCoord getSegmentCenter(int idx, bool fillalt=true) const
Float_t altitude
In metres.
static AntarcticSegmentationScheme * factory(const char *key)
static double surfaceDistance(const AntarcticCoord &a, const AntarcticCoord &b)
virtual void Draw(const char *opt="colz", const double *data=0, const double *range=0) const
virtual int getNeighbors(int segment, std::vector< int > *neighbors=NULL) const
virtual int getSegmentIndex(const AntarcticCoord &coord) const
virtual int getSegmentIndex(const AntarcticCoord &coord) const =0