CARMA C++
Site.h
1 #ifndef SITE_H
2 #define SITE_H
3 
12 
13 // Include the C-style struct and method definitions this class is
14 // based on
15 
16 #include "carma/szaarrayutils/astrom.h"
17 
18 // Needed for cvel
19 
20 #include "carma/szaarrayutils/szaconst.h"
21 
22 #include "carma/szautil/Angle.h"
23 #include "carma/szautil/Length.h"
24 
25 namespace sza {
26  namespace antenna {
27  namespace control {
28 
29 
33  class Site {
34 
35  public:
36 
42  Site();
43 
49  void setFiducial(sza::util::Angle longitude, sza::util::Angle latitude,
50  double altitude);
51 
57  void setOffset(double north, double east, double up);
58 
62  void reset();
63 
67  double convertMjdUtcToLst(double utc, double ut1utc, double eqneqx);
68 
77  void applyParallax(double dist, PointingCorrections* f);
78 
85 
90 
95  void packFiducial(signed* s_elements);
96 
101  void packActual(signed* s_elements);
102 
107  void packOffset(signed* s_elements);
108 
109  inline double getLongitude() {
110  return actual_.longitude;
111  }
112 
113  inline double getLatitude() {
114  return actual_.latitude;
115  }
116 
117  inline double getAltitude() {
118  return actual_.altitude;
119  }
120 
121  inline sza::util::Angle latitude() {
122  return sza::util::Angle(sza::util::Angle::Radians(), actual_.latitude);
123  }
124 
125  inline sza::util::Length altitude() {
126  return sza::util::Length(sza::util::Length::Meters(), actual_.altitude);
127  }
128 
129  private:
130 
136  double wrap2pi(double angle);
137 
143  // The fiducial site. This is the location of an arbitrary
144  // (lat, long, alt) point, relative to which the actual
145  // antenna location is specified.
146 
147  sza::array::Site fiducial_;
148 
149  // The offset location, in meters of this antenna from the
150  // fiducial position
151 
152  double north_;
153  double east_;
154  double up_;
155 
156  // The actual (lat, long, alt) of this antenna, after the
157  // above offsets have been taken into account.
158 
159  sza::array::Site actual_;
160 
161  }; // End class Site
162 
163  }; // End namespace control
164  }; // End namespace antenna
165 }; // End namespace sza
166 
167 #endif // End #ifndef
void packActual(signed *s_elements)
Pack actual site-specific data for archival in the register database.
void setFiducial(sza::util::Angle longitude, sza::util::Angle latitude, double altitude)
Set the antenna location fiducial parameters.
Class for managing antenna site-specific parameters.
Definition: Site.h:33
void setOffset(double north, double east, double up)
Set the antenna location offset parameters.
While computing pointing corrections, an object of the following type is used to communicate accumula...
void reset()
Reset site parameters to default values.
void applyDiurnalAberration(PointingCorrections *f)
Correct the azimuth and elevation for diurnal aberration.
double convertMjdUtcToLst(double utc, double ut1utc, double eqneqx)
Return the local sidereal time for a given site and UTC.
void updateLatitude(PointingCorrections *f)
Install the latitude in the pointing corrections container.
Tagged: Thu Nov 13 16:53:47 UTC 2003.
void applyParallax(double dist, PointingCorrections *f)
Correct the azimuth and elevation for horizontal parallax.
void packFiducial(signed *s_elements)
Pack fiducial site-specific data for archival in the register database.
void packOffset(signed *s_elements)
Pack site-specific data for archival in the register database.