CARMA C++
DriveProxy.h
Go to the documentation of this file.
1 #ifndef SZA_ANTENNA_CORBA_DRIVEPROXY_H
2 #define SZA_ANTENNA_CORBA_DRIVEPROXY_H
3 
12 
13 #include "carma/antenna/sza/control/szaDriveControl.h"
14 
15 #include "carma/szautil/Angle.h"
16 #include "carma/szautil/Axis.h"
17 #include "carma/szautil/Length.h"
19 #include "carma/szautil/PointingMode.h"
20 #include "carma/szautil/Rx.h"
21 
22 
23 // Must undef macro SystemException in carma::util::BaseException.h,
24 // since this causes references to CORBA::SystemException below to be
25 // misinterpreted
26 
27 namespace sza {
28  namespace antenna {
29  namespace corba {
30 
35  class PointingModelProxy;
36 
42  class DriveProxy : public Proxy {
43 
44  public:
45 
52 
56  ~DriveProxy();
57 
58  void setAntLocation(double longitude, double latitude,
59  double altitude);
60 
61  void setAzel(sza::util::Axis::Type axes, double az,
62  double el, CORBA::ULong seq);
63 
64  void setAzel(double az, double el, CORBA::ULong seq);
65 
66  void setAz(double az, CORBA::ULong seq);
67 
68  void setEl(double el, CORBA::ULong seq);
69 
70  void setMountOffset(double az, double el, CORBA::ULong seq);
71 
72  void setEqnEqx(double mjd, double eqneqx);
73 
74  void setMaxRate(float azRate, float elRate);
75 
76  void setAzMaxRate(float azRate);
77 
78  void setElMaxRate(float elRate);
79 
81  model);
82 
83  void setRefrac(double a, double b );
84 
85  void setSlewRate(unsigned long axes,
86  long az, long el);
87 
88  void setUt1Utc(double mjd, double ut1utc);
89 
90  void stop();
91 
92  void slew(const char* source, unsigned long axisMask,
93  double az, double el);
94 
95  void trackSnow();
96 
97  void trackWind();
98 
100  CORBA::ULong seq=0);
101 
102  void extendTrack(const carma::antenna::common::DriveControl::RaDecEpoch& position,
103  bool newSource=false, unsigned seq=0, char* source=0,
105 
106  void track(const char* source,
107  const carma::antenna::common::DriveControl::RaDecTriplet& positionTriplet,
109  bool overTheTop,
110  CORBA::ULong seq);
111 
112 
113  void updateRaDec(const carma::antenna::common::DriveControl::RaDecEpoch& position,
115 
116  void updateWeather(float ambientTemp,
117  float barometricPressure,
118  float relativeHumidity,
119  float dewpointTemp,
120  float windSpeed,
121  float windDirection);
122 
123  void setAzMountOffset(double az, CORBA::ULong seq);
124 
125  void setElMountOffset(double el, CORBA::ULong seq);
126 
127  void setOffset(sza::util::OffsetMsg::Axis axes,
128  double az,
129  double el,
130  CORBA::ULong seq=0);
131 
132  void setOffset(double az, double el, CORBA::ULong seq);
133 
134  void setAzOffset(double az, CORBA::ULong seq);
135 
136  void setElOffset(double el, CORBA::ULong seq);
137 
138  void setAperturePointingConstants(carma::antenna::common::
139  DriveControl::Aperture aperture,
140  float azOffset,
141  float elOffset,
142  float sag);
143 
144  void setTilts(double azTilt1, double azTilt2,
145  double elTilt1, double elTilt2);
146 
147  void setTiltmeterZero(float aftForward,
148  float leftRight);
149 
150  void setTolerance(float toleranceInArcsecs);
151 
152  void setSafeRange(float azLow,
153  float azHigh,
154  float elLow,
155  float elHigh);
156 
157  //-----------------------------------------------------------------------
158  // CORBA methods to set the pointing model terms
159  //-----------------------------------------------------------------------
160 
161  void setEncoderCountsPerTurn(unsigned long azCountsPerTurn, unsigned long elCountsPerTurn);
162 
163  void setEncoderLimits(unsigned long azMinCount, unsigned long azMaxCount,
164  unsigned long elMinCount, unsigned long elMaxCount);
165 
166  void setEncoderZeros(double azEncZeroDeg, double elEncZeroDeg);
167 
168  void setTilts(double haTiltDeg, double latTiltDeg, double elTiltDeg);
169 
170  void setCollimation(carma::antenna::common::DriveControl::Aperture aperture,
171  double xCollimationDeg, double yCollimationDeg);
172 
173  void setFlexure(carma::antenna::common::DriveControl::Aperture aperture,
174  double sinCoeffDeg, double cosCoeffDeg);
175 
176  void setFlexure(sza::util::PointingMode::Type model, sza::util::Angle& sFlex, sza::util::Angle& cFlex);
177 
178  void setMountPointingConstants(CORBA::ULong azEncoderCountsPerTurn, CORBA::ULong elEncoderCountsPerTurn,
179  CORBA::ULong azMinEncoderCount, CORBA::ULong azMaxEncoderCount,
180  CORBA::ULong elMinEncoderCount, CORBA::ULong elMaxEncoderCount,
181  double azEncoderZeroDegrees, double elEncoderZeroDegrees,
182  double haTiltDegrees, double latTiltDegrees, double elTiltDegrees,
183  double opticalXCollimationDegrees, double opticalYCollimationDegrees,
184  double opticalFlexureSinDegrees, double opticalFlexureCosDegrees,
185  double radioXCollimationDegrees, double radioYCollimationDegrees,
186  double radioFlexureSinDegrees, double radioFlexureCosDegrees);
187 
188  void setWrapMode(carma::antenna::common::DriveControl::AzWrapMode azWrapMode);
189 
190  //-----------------------------------------------------------------------
191  // Local methods
192  //-----------------------------------------------------------------------
193 
194  void setSite(sza::util::Angle& lng, sza::util::Angle& lat, sza::util::Length& alt);
195  void setLocation(sza::util::Length& up, sza::util::Length& east, sza::util::Length& north);
196 
197  void setEncoderCountsPerTurn(unsigned az, unsigned el);
198  void setEncoderLimits(unsigned azMin, unsigned azMax, unsigned elMin, unsigned elMax);
199  void setEncoderZeros(sza::util::Angle& azZero, sza::util::Angle& elZero);
200 
201  void setTilts(sza::util::Angle& haTilt, sza::util::Angle& latTilt, sza::util::Angle& elTilt);
202  void setCollimation(sza::util::PointingMode::Type model, sza::util::Angle& x, sza::util::Angle& y);
203 
204  void setFlexure();
205 
206  static sza::util::Rx::Id apertureToRxId(carma::antenna::common::DriveControl::Aperture model);
207  static carma::antenna::common::DriveControl::Aperture rxIdToAperture(sza::util::Rx::Id rxId);
208 
214 
215  }; // End class DriveProxy
216 
217  }; // End namespace corba
218  }; // End namespace antenna
219 }; // End namespace sza
220 
221 #endif
222 
223 
PointingModelProxy * pointingModel_
The object that will be served as the CORBA DO to handle pointing model commands. ...
Definition: DriveProxy.h:213
Aperture
Enumerate apertures to use for selecting pointing models.
Type
Enumerate possible pointing modes.
Definition: PointingMode.h:25
DriveProxy(sza::antenna::control::AntennaMaster *parent)
Constructor with a pointer to the parent AntennaDrive.
A class which will be served as the CORBA PointingModel DO, whose methods will send messages to the A...
Type
An enumerator to identify a valid axis.
Definition: Axis.h:24
Aperture
Enumerate apertures to use for selecting pointing models.
AzWrapMode
The azimuth drive can operate over more than a full circle, and the wrap logic dictates how the ambig...
Tagged: Fri Jul 24 11:34:30 PDT 2009.
Don't add or subtract anything to the azimuth.
Tagged: Thu Mar 11 16:38:48 PST 2004.
Position
Enumerate valid fixed positions for Stow.
Define a class to encapsulate the entire Antenna control system.
Create a DriveProxy class in namespace carma.
Definition: DriveProxy.h:42