Observatory.h
1 //-*-C++-*-
2 /***************************************************************************
3  *
4  * Copyright (C) 2008 by Willem van Straten
5  * Licensed under the Academic Free License version 2.1
6  *
7  ***************************************************************************/
8 
9 // psrchive/Util/tempo/Observatory.h
10 
11 #ifndef __Tempo_Observatory_h
12 #define __Tempo_Observatory_h
13 
14 #include "Pulsar/Site.h"
15 
16 namespace Tempo
17 {
18 
20  class Observatory : public Pulsar::Site
21  {
22  public:
23 
26 
28  char get_code () const;
29  void set_code (char);
30 
32  std::string get_itoa_code () const;
33  void set_itoa_code (const std::string&);
34 
36  std::string get_name () const;
37  void set_name (const std::string&);
38 
39  protected:
40 
41  char code;
42  std::string itoa_code;
43  std::string name;
44 
45  };
46 
47  class ObservatoryITRF : public Observatory
48  {
49  public:
50 
52  ObservatoryITRF (double x, double y, double z);
53 
55  virtual void get_xyz (double& x, double& y, double& z) const;
56 
58 
59  virtual void get_sph (double& lat, double& lon, double& rad) const;
60 
61  protected:
62  double x, y, z;
63  };
64 
65  class ObservatoryIAU1976 : public Observatory
66  {
67  public:
68 
70  ObservatoryIAU1976 (double alat, double alon, double elev);
71 
73  virtual void get_xyz (double& x, double& y, double& z) const;
74 
76 
77  virtual void get_sph (double& lat, double& lon, double& rad) const;
78 
79  protected:
80  double lat, lon, rad;
81  };
82 
83 }
84 
85 #endif
86 
std::string get_name() const
Get the observatory name.
Definition: Observatory.C:48
Interface to Tempo.
Definition: fit.C:21
A convenient exception handling class.
Definition: Error.h:54
char code(const std::string &telescope_name)
Convert a telescope name to a single-character tempo code.
Definition: tempo++.C:167
const Observatory * observatory(const std::string &telescope_name)
Return the Observatory data given the telescope name.
Definition: Observatory.C:130
Observatory data available from TEMPO.
Definition: Observatory.h:25
Observatory()
Default constructor.
Definition: Observatory.C:19
std::string get_itoa_code() const
Get the two-letter ITOA code.
Definition: Observatory.C:34
char get_code() const
Get the one-letter tempo code.
Definition: Observatory.C:24
Site coordinates.
Definition: Site.h:25

Generated using doxygen 1.8.17