1 #ifndef CARMA_CONTROL_DRIVEHANDLE_H
2 #define CARMA_CONTROL_DRIVEHANDLE_H
21 #include "carma/corba/corba.h"
22 #include "carma/antenna/common/DriveControl.h"
23 #include "carma/control/antennaHandleUtils.h"
24 #include "carma/control/AzWrapMode.h"
25 #include "carma/control/MjdTriplet.h"
27 #include "carma/monitor/ControlSubsystem.h"
32 #include "carma/services/Source.h"
51 typedef RemoteObjHandleT< antenna::common::DriveControl >
52 DriveControlRemoteObjHandle;
71 monitor::ControlSubsystemBase::Antenna & antenna
98 const carma::control::MjdTriplet mjdTriplet,
99 const ::std::string userCatalog,
102 int preferredSequenceNo );
115 const carma::control::MjdTriplet mjdTriplet,
118 int preferredSequenceNo );
134 const carma::control::MjdTriplet mjdTriplet,
135 const ::std::string userCatalog,
137 int preferredSequenceNo );
140 const carma::control::MjdTriplet mjdTriplet,
142 int preferredSequenceNo );
176 void setOffset (
double azArcmin,
double elArcmin,
int preferredSequenceNo );
186 void setAzOffset (
double azArcmin,
int preferredSequenceNo) ;
196 void setElOffset (
double elArcmin,
int preferredSequenceNo) ;
207 void setAzel(
double azDegrees,
double elDegrees,
int preferredSequenceNo );
217 void setAz(
double azDegrees,
int preferredSequenceNo );
227 void setEl(
double elDegrees,
int preferredSequenceNo );
240 int preferredSequenceNo );
250 int preferredSequenceNo );
271 void setSafeRange(
float azLow,
float azHigh,
float elLow,
float elHigh);
364 ::std::vector< double > delCoefs );
369 double azEncoderCountsPerTurn,
double elEncoderCountsPerTurn,
370 double azMinEncoderCount,
double azMaxEncoderCount,
371 double elMinEncoderCount,
double elMaxEncoderCount,
372 double azEncoderZeroDegrees,
double elEncoderZeroDegrees,
373 double haTiltDegrees,
double latTiltDegrees,
double elTiltDegrees,
374 double opticalXCollimationDegrees,
double opticalYCollimationDegrees,
375 double opticalFlexureSinDegrees,
double opticalFlexureCosDegrees,
376 double radioXCollimationDegrees,
double radioYCollimationDegrees,
377 double radioFlexureSinDegrees,
double radioFlexureCosDegrees);
382 double azMaxEncoderCount,
383 double elMinEncoderCount,
384 double elMaxEncoderCount);
392 void setSzaTilts(
double haTiltDegrees,
double latTiltDegrees,
double elTiltDegrees);
427 int monDataErrorLimit );
448 void test(
double aSeconds,
463 void trackFixed(
const std::string & source,
int preferredSequenceNo );
486 void track( const ::std::string & source,
487 const carma::control::MjdTriplet & triplet,
488 bool resetTrackOffsets,
489 const std::string & userCatalog,
491 int preferredSequenceNo );
500 const carma::control::MjdTriplet & triplet,
501 bool resetTrackOffsets,
503 int preferredSequenceNo );
515 void updateRaDec( const ::std::string & sourceName,
516 double mjd,
double ra,
double dec,
520 void setSourceModeToIdle( );
522 void setSourceModeToRaDec( );
524 void setSourceModeToAzEl( );
531 void updateAntennaSourceRaDec (
double mjd) ;
533 void setNextSequenceNo(
int preferredSequenceNo );
536 int consecutiveErrors_;
539 const unsigned short carmaAntNo_;
557 monitor::ControlSubsystemBase::Antenna & antenna_;
559 SourceMode sourceMode_;
561 double trackToleranceFreq_;
562 float trackTolerance_;
575 double raTrackingOffset_;
576 double decTrackingOffset_;
577 double raPhaseOffset_;
578 double decPhaseOffset_;
586 bool setSafeRangeCompleted_;
594 double optimumWrapTime_;
629 void trackTriplet( const ::std::string & source,
630 const carma::control::MjdTriplet & mjdTriplet,
631 bool resetTrackOffsets,
632 const std::string & userCatalog,
634 int preferredSequenceNo );
640 const carma::control::MjdTriplet & mjdTriplet,
641 bool resetTrackOffsets,
643 int preferredSequenceNo );
651 void updateWrapLimits();
661 void checkAgainstLimits(
const double azDegrees,
const double elDegrees,
662 const bool warnOnly );
668 void defaultWrapLimits();
::std::string getCarmaAntennaName() const
Returns antenna name as full carma name.
void setSzaEncoderZeros(double azEncoderZeroDegrees, double elEncoderZeroDegrees)
Set SZA encoder zeros.
void updateTrackTolerance(const float tolerance, const double freq)
Set the tracking threshold to the antennas.
AzWrapMode
Possible Azimuth Wrap modes.
enum carma::services::AzWrapTypeEnum AzWrapType
mirror drive mode wrap types
Semi-hand-forged extensions to the auto-generated classes for the Control subsystem.
void setSzaTilts(double haTiltDegrees, double latTiltDegrees, double elTiltDegrees)
Set SZA tilts.
void setEl(double elDegrees, int preferredSequenceNo)
Set antenna elevation.
void setSzaEncoderLimits(double azMinEncoderCount, double azMaxEncoderCount, double elMinEncoderCount, double elMaxEncoderCount)
Set SZA encoder limits.
Source is derived from CatalogEntry and is used to hold information for a particular entry from a sou...
void trackCurrentSourceWithOffsets(const carma::control::MjdTriplet mjdTriplet, const ::std::string userCatalog, carma::control::AzWrapMode azWrapMode, int preferredSequenceNo)
Continue tracking the current source with new equatorial offsets.
void setSafeRange(float azLow, float azHigh, float elLow, float elHigh)
Set the azimuth and elevation ranges within which this antenna is safe from collisions with other ant...
void trackingThreshold(float hpbw)
Set the tracking threshold.
void stow(antenna::common::DriveControl::Position position, int preferredSequenceNo)
Move the antenna one of the stow positions (zenith, service, safe).
Various type definitions for services classes.
void stop()
Stop the antenna at its current azimuth and elevation.
The Velocity class can represent an velocity in any units.
void setOvroMountPointingConstants(double m1, double m2, double m3, double m4, double m5)
Set OVRO mount pointing constants.
void updateWeather(double mjd, const services::Temperature &airTemp, const services::Pressure &atmPressure, double relhumid, const services::Temperature &dewpointTemp, const services::Velocity &windSpeed, const services::Angle &windDirection, bool logGoodSend)
Updates weather information to drive.
::std::string getTypedAntennaName() const
Returns antenna name as full type qualified name.
void setAzOffset(double azArcmin, int preferredSequenceNo)
Set antenna Az offset for astronomy or engineering.
void setMountOffset(double azArcmin, double elArcmin, int preferredSequenceNo)
Set mount offsets.
Ephemeris wraps the NOVAS library and any other ephemeris related functions into a simple to use clas...
void setAz(double azDegrees, int preferredSequenceNo)
Set antenna azimuth.
void setElOffset(double elArcmin, int preferredSequenceNo)
Set antenna El offset for astronomy or engineering.
void updateTracking(double mjd)
Updates tracking information to antenna,.
SourceMode getSourceMode() const
Method to get source mode of antenna - it can point at nothing, or at a source specified by RA/DEC...
void startTrack(const ::std::string source, const carma::control::MjdTriplet mjdTriplet, const ::std::string userCatalog, const carma::control::AzWrapMode azWrapMode, double time, int preferredSequenceNo)
For use the first time this drive tracks a given object.
The Temperature class represents a temperature in any unit.
::std::string getSourceName()
The Pressure class can represent any pressure in any units.
bool isActionComplete(const monitor::MonitorSystem &monsys, int monDataErrorLimit)
Compare next sequence number with one returned by the monitor system.
Manages connection to remote DO.
Location specifies a location (observatory if you wish) on planet earth, as longitude, latitude, and altitude above sea-level.
AntennaType
Enumeration of possible types for antennas.
AntennaType
Enumeration of possible types for antennas.
The Angle class can represent any angle in any units.
AzWrapMode
The azimuth drive can operate over more than a full circle, and the wrap logic dictates how the ambig...
void setBimaMountPointingConstants(::std::vector< double > dazCoefs,::std::vector< double > delCoefs)
Set BIMA mount pointing constants.
Typed class for managing connections to DOs.
Monitor system base class.
services::Location getLocation() const
Method to get antenna's location as longitude, latitude, altitude.
void setSzaMountPointingConstants(double azEncoderCountsPerTurn, double elEncoderCountsPerTurn, double azMinEncoderCount, double azMaxEncoderCount, double elMinEncoderCount, double elMaxEncoderCount, double azEncoderZeroDegrees, double elEncoderZeroDegrees, double haTiltDegrees, double latTiltDegrees, double elTiltDegrees, double opticalXCollimationDegrees, double opticalYCollimationDegrees, double opticalFlexureSinDegrees, double opticalFlexureCosDegrees, double radioXCollimationDegrees, double radioYCollimationDegrees, double radioFlexureSinDegrees, double radioFlexureCosDegrees)
Set SZA mount pointing constants.
void conditionallyUpdateTrackTolerance(const double freq)
Check to see if the HPBW has changed enough to warrant a threshold update, converting from hpbw to ar...
Manages antenna drive control DO connections.
void setLocation(const services::Location &location)
Method to set antenna's absolute location.
Source checker returns info on the location in the sky of a source at a given time, e.g.
services::Ephemeris getEphemeris() const
void setAzel(double azDegrees, double elDegrees, int preferredSequenceNo)
Set antenna azimuth and elevation.
void setOffset(double azArcmin, double elArcmin, int preferredSequenceNo)
Set antenna Az/El offsets for astronomy or engineering.
Declaration of carma::services::Ephemeris.
void checkModeForEquatOffset(void)
Check if the drive mode is in an appropriate state for calling setEquatOffset.
void setEquatOffset(double ra, double dec)
Defines equatorial offsets in ra and dec from the input source.
void startTrackX(const carma::services::Source source, const carma::control::MjdTriplet mjdTriplet, const carma::control::AzWrapMode azWrapMode, double time, int preferredSequenceNo)
Version of startTrack that takes a Source object instead of a source name and catalog.
Position
Enumerate valid fixed positions for Stow.
Abstract MonitorSubsystem base class.
unsigned short getCarmaAntennaNo() const
DriveHandle(unsigned short carmaAntNo, const services::Location &coords, monitor::MonitorSystem &monitorSystem, monitor::ControlSubsystemBase::Antenna &antenna)
Constructor.