37  inline const Ellipsoid& getEllipsoid(
const JUTMGrid& grid)
 
   41    string buffer = grid.getWGS();
 
   42    size_t pos    = buffer.find_first_of(
"0123456789");
 
   44    const string wgs = buffer.substr(0, pos);
 
   48    istringstream(buffer.substr(pos)) >> 
zone;
 
   53      pos    = buffer.find(wgs);
 
   55      if (pos != string::npos) {
 
   57        pos += wgs.size() + 1;
 
   61        istringstream(buffer.substr(pos)) >> val;
 
   69    THROW(JParseError, 
"Invalid UTM grid " << grid);
 
   80  inline JGeographicalLocation getGeographicalLocation(
const JUTMGrid&     grid,
 
   81                                                       const JUTMPosition& position)
 
   89    UTMtoLL(el.
id, position.getUTMNorth(),  position.getUTMEast(), grid.getUTMZone().c_str(), lat, lon);
 
  107    const Ellipsoid& el = getEllipsoid(grid);
 
  130    JParser<> zap(
"Example program to print geographical data for given detector.");
 
  137  catch(
const exception &error) {
 
  138    FATAL(error.what() << endl);
 
  159    meridian   =  ORCA_MERIDIAN_CONVERGENCE_ANGLE_DEG;
 
  162  } 
else if (isARCADetector(
detector)) {
 
  165    meridian   =  ARCA_MERIDIAN_CONVERGENCE_ANGLE_DEG;
 
  170    FATAL(
"No location" << endl);
 
  173  cout << 
"Detector " << name << endl;
 
  174  cout << 
detector.getUTMGrid()     << endl;
 
  175  cout << 
detector.getUTMPosition() << endl;
 
  186  cout << 
"Meridian convergence angle [deg]: " << 
FIXED(9,5) << meridian << 
" " << 
FIXED(9,5) << getDegrees(getMeridianConvergenceAngle(
detector.getUTMGrid(), 
detector.getUTMPosition())) << endl;
 
  187  cout << 
"Meridian convergence angle [deg]: " << 
FIXED(9,5) << getDegrees(getMeridianConvergenceAngle(location)) << 
" (approximate)" << endl;  
 
 
Interface methods for SLALIB and auxiliary classes and methods for astronomy.
 
Meridian convergence angles for different sites.
 
Data structure for detector geometry and calibration.
 
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
 
General purpose messaging.
 
Utility class to parse command line options.
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
 
static Ellipsoid ellipsoid[]
 
void UTMtoLL(int ReferenceEllipsoid, const double UTMNorthing, const double UTMEasting, const char *UTMZone, double &Lat, double &Long)
 
double eccentricitySquared
 
const char * ellipsoidName
 
Exception for parsing value.
 
Utility class to parse command line options.
 
Data structure for UTM grid.
 
Data structure for UTM position.
 
int main(int argc, char **argv)
 
double getMeridianConvergenceAngle(const JGeographicalLocation &location)
Get Meridian convergence angle.
 
double getRadians(const double angle)
Convert angle to radians.
 
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 
Auxiliary data structure for floating point format specification.
 
double getLongitude() const
Get longitude.
 
double getLatitude() const
Get latitude.