CARMA C++
carma::antenna::ovro::DriveEngine Class Reference

Responsible for storing and maintaining drive parameters, calculating drive rate updates and regularly sending them to the drive hardware. More...

#include <carma/antenna/ovro/control/DriveEngine.h>

Public Types

enum  ApertureType {
  OPTICAL, RADIO1MM, RADIO3MM, RADIO1CM,
  APERTURE_COUNT
}
 
enum  WrapType { NO_TURN, ADD_TURN, SUBTRACT_TURN }
 Wrap states. More...
 

Public Member Functions

 DriveEngine (Drive &drive, const Encoder &azEncoder, const Encoder &elEncoder, const Tiltmeter &tiltmeter, carma::monitor::OvroSubsystem &mon)
 
void freezeTilt ()
 Freeze tilt ( debug ) More...
 
void selectAperture (ApertureType aperture)
 Select aperture. More...
 
void setAperturePointingConstants (ApertureType aperture, const carma::services::Angle &azOffset, const carma::services::Angle &elOffset, const carma::services::Angle &sag)
 Set aperture pointing constants These constants represent on the sky collimation errors for a particular aperture. More...
 
void setAz (const carma::services::Angle &azimuth)
 Set azimuth. More...
 
void setAzEl (const carma::services::Angle &angle, const carma::services::Angle &elevation)
 Set azimuth and elevation. More...
 
void setAzEncoderZero (const carma::services::Angle &azEncoderZero)
 Set Az Encoder Zero. More...
 
void setAzMaxRate (double azMaxRateInDegPerSec)
 Set azimuth maz rate on the sky. More...
 
void setAzMountOffset (const carma::services::Angle &azMountOffset)
 Set Az Mount Offset. More...
 
void setAzOffset (const carma::services::Angle &offset)
 Set azimuth offset. More...
 
void setEl (const carma::services::Angle &elevation)
 Set elevation. More...
 
void setElEncoderZero (const carma::services::Angle &azEncoderZero)
 Set El Encoder Zero. More...
 
void setElMaxRate (double elMaxRateInDegPerSec)
 Set elevation max rate. More...
 
void setElMountOffset (const carma::services::Angle &elMountOffset)
 Set El Mount Offset. More...
 
void setElOffset (const carma::services::Angle &offset)
 Set elevation offset. More...
 
void setEngineeringMode (bool enable)
 Set engineering mode. More...
 
void setLocation (const carma::services::Location &location)
 Set antenna location. More...
 
void setMountOffsets (const carma::services::Angle &azMountOffset, const carma::services::Angle &elMountOffset)
 Set both az and el mount offsets simultaneously. More...
 
void setMountPointingConstants (const carma::services::Angle &azEncoderZero, const carma::services::Angle &elEncoderZero, const carma::services::Angle &nonOrthogonalityOfAxes, const carma::services::Angle &azimuthVerticalityNorthSouth, const carma::services::Angle &azimuthVerticalityEastWest)
 Set mount pointing constants. More...
 
void setOffset (const carma::services::Angle &azOffset, const carma::services::Angle &elOffset)
 Set offset. More...
 
void setRaDec (const RaDecTriplet &raDecTriplet, WrapType wrap=NO_TURN)
 Set new Ra and Dec triplet. More...
 
void setRawDriveRates (float azRateInDegPerMin, float elRateInDegPerMin)
 Engineering command to set raw drive slew rates. More...
 
void setRawDriveVoltages (float azVoltage, float elVoltage)
 Engineering command to set raw drive motor control voltages. More...
 
void setSafeRange (const carma::services::Angle &azLow, const carma::services::Angle &azHigh, const carma::services::Angle &elLow, const carma::services::Angle &elHigh)
 Set anti-collision safe ranges. More...
 
void setSequenceNumber (unsigned long seqNo)
 Set sequence number. More...
 
void setSource (std::string source)
 Set source name. More...
 
void setTiltmeterZeros (const carma::services::Angle &aftForwardZero, const carma::services::Angle &leftRightZero)
 Set Tiltmeter Zeros. More...
 
void setTolerance (const carma::services::Angle &tolerance)
 Set acquisition tolerance. More...
 
void setWeather (double ambientTemp, double barometricPressure, double relativeHumidity, double dewpointTemp, double windSpeed, double windDirection)
 Set weather parameters needed for refraction corrections, snow track and wind track. More...
 
void snow ()
 Track a position 60 degrees into the wind in order to minimize snow buildup on the backing structure (where it is more difficult to remove. More...
 
void stop ()
 Stop. More...
 
void stowSafe ()
 Stow antenna to a safe position. More...
 
void stowZenith ()
 Stow antenna close to zenith. More...
 
void thawTilt ()
 Thaw tilt ( debug ) More...
 
void toggleBacklashCorrection (bool enable)
 Toggle backlash correction. More...
 
void updateConfigurationData ()
 Update Drive module configuration data from file. More...
 
void updateRaDec (const RaDecEpoch &raDecEpoch, WrapType wrap=NO_TURN)
 Update current Ra/Dec position with a new epoch. More...
 

Detailed Description

Responsible for storing and maintaining drive parameters, calculating drive rate updates and regularly sending them to the drive hardware.

Definition at line 51 of file DriveEngine.h.

Member Enumeration Documentation

Wrap states.

Definition at line 144 of file DriveEngine.h.

Member Function Documentation

void carma::antenna::ovro::DriveEngine::freezeTilt ( )

Freeze tilt ( debug )

void carma::antenna::ovro::DriveEngine::selectAperture ( ApertureType  aperture)

Select aperture.

Replaces current aperture pointing constants with those of the selected aperture.

Exceptions
IllegalStateExceptionif aperture constants have not been set.
Parameters
apertureNew desired aperture.
See Also
setAperturePointingConstants
void carma::antenna::ovro::DriveEngine::setAperturePointingConstants ( ApertureType  aperture,
const carma::services::Angle azOffset,
const carma::services::Angle elOffset,
const carma::services::Angle sag 
)

Set aperture pointing constants These constants represent on the sky collimation errors for a particular aperture.

Input constants are stored away for future use (i.e. you only need to call these once for each aperture).

void carma::antenna::ovro::DriveEngine::setAz ( const carma::services::Angle azimuth)

Set azimuth.

Parameters
azimuthAzimuth as an Angle object.
void carma::antenna::ovro::DriveEngine::setAzEl ( const carma::services::Angle angle,
const carma::services::Angle elevation 
)

Set azimuth and elevation.

Parameters
azimuthAzimuth as an Angle object.
elevationElevation as an Angle object.
void carma::antenna::ovro::DriveEngine::setAzEncoderZero ( const carma::services::Angle azEncoderZero)

Set Az Encoder Zero.

Also set via setMountPointingConstants.

void carma::antenna::ovro::DriveEngine::setAzMaxRate ( double  azMaxRateInDegPerSec)

Set azimuth maz rate on the sky.

Parameters
azMaxRateAzimuth max sky rate in degrees/second.
void carma::antenna::ovro::DriveEngine::setAzMountOffset ( const carma::services::Angle azMountOffset)

Set Az Mount Offset.

void carma::antenna::ovro::DriveEngine::setAzOffset ( const carma::services::Angle offset)

Set azimuth offset.

void carma::antenna::ovro::DriveEngine::setEl ( const carma::services::Angle elevation)

Set elevation.

Parameters
elevationElevation as an Angle object.
void carma::antenna::ovro::DriveEngine::setElEncoderZero ( const carma::services::Angle azEncoderZero)

Set El Encoder Zero.

Also set via setMountPointingConstants.

void carma::antenna::ovro::DriveEngine::setElMaxRate ( double  elMaxRateInDegPerSec)

Set elevation max rate.

Parameters
elMaxRateElevation max rate in degrees/second.
void carma::antenna::ovro::DriveEngine::setElMountOffset ( const carma::services::Angle elMountOffset)

Set El Mount Offset.

void carma::antenna::ovro::DriveEngine::setElOffset ( const carma::services::Angle offset)

Set elevation offset.

void carma::antenna::ovro::DriveEngine::setEngineeringMode ( bool  enable)

Set engineering mode.

In engineering mode, control of the drive is disabled completely.

Parameters
enableTrue to enable engineering mode, false to disable.
void carma::antenna::ovro::DriveEngine::setLocation ( const carma::services::Location location)

Set antenna location.

Parameters
locationConst reference to a location instance.
void carma::antenna::ovro::DriveEngine::setMountOffsets ( const carma::services::Angle azMountOffset,
const carma::services::Angle elMountOffset 
)

Set both az and el mount offsets simultaneously.

void carma::antenna::ovro::DriveEngine::setMountPointingConstants ( const carma::services::Angle azEncoderZero,
const carma::services::Angle elEncoderZero,
const carma::services::Angle nonOrthogonalityOfAxes,
const carma::services::Angle azimuthVerticalityNorthSouth,
const carma::services::Angle azimuthVerticalityEastWest 
)

Set mount pointing constants.

void carma::antenna::ovro::DriveEngine::setOffset ( const carma::services::Angle azOffset,
const carma::services::Angle elOffset 
)

Set offset.

void carma::antenna::ovro::DriveEngine::setRaDec ( const RaDecTriplet &  raDecTriplet,
WrapType  wrap = NO_TURN 
)

Set new Ra and Dec triplet.

Parameters
Vectorof Ra/Dec instants.
wrapWrap mode.
void carma::antenna::ovro::DriveEngine::setRawDriveRates ( float  azRateInDegPerMin,
float  elRateInDegPerMin 
)

Engineering command to set raw drive slew rates.

Be careful with this.

Parameters
azRateInDegPerMinAzimuth slew rate in degrees per minute.
elRateInDegPerMinElevation slew rate in degrees per minute.
void carma::antenna::ovro::DriveEngine::setRawDriveVoltages ( float  azVoltage,
float  elVoltage 
)

Engineering command to set raw drive motor control voltages.

This is an engineering command which sets raw motor drive voltages and should be used with the utmost care.

Parameters
azRawVoltageAzimuth raw voltage in volts.
elRawVoltageElevation raw voltage in volts.
void carma::antenna::ovro::DriveEngine::setSafeRange ( const carma::services::Angle azLow,
const carma::services::Angle azHigh,
const carma::services::Angle elLow,
const carma::services::Angle elHigh 
)

Set anti-collision safe ranges.

The stow safe position is calculated as the middle of these ranges. This routine must be called prior to calling stowSafe.

Parameters
azLowSafe azimuth range low value (range inclusive).
azHighSafe azimuth range high value (range inclusive).
elLowSafe elevation range low value (range inclusive).
elHighSafe elevation range high value (range inclusive).
void carma::antenna::ovro::DriveEngine::setSequenceNumber ( unsigned long  seqNo)

Set sequence number.

The drive engine does nothing with this number except store it and write it to the monitor system.

void carma::antenna::ovro::DriveEngine::setSource ( std::string  source)

Set source name.

Parameters
sourceSource name.
void carma::antenna::ovro::DriveEngine::setTiltmeterZeros ( const carma::services::Angle aftForwardZero,
const carma::services::Angle leftRightZero 
)

Set Tiltmeter Zeros.

void carma::antenna::ovro::DriveEngine::setTolerance ( const carma::services::Angle tolerance)

Set acquisition tolerance.

void carma::antenna::ovro::DriveEngine::setWeather ( double  ambientTemp,
double  barometricPressure,
double  relativeHumidity,
double  dewpointTemp,
double  windSpeed,
double  windDirection 
)

Set weather parameters needed for refraction corrections, snow track and wind track.

Parameters
ambientTempAmbient temperature in Celcius.
barometricPressureBarometric pressure in millibars.
relativeHumidityRelative humidity in percent.
dewpointTempDewpoint temperature in Celsius.
windSpeedWind speed in miles/hour.
windDirectionDirection wind is coming from, in degrees, with north at 0, increasing to the east. This is opposite the direction the wind is blowing.
void carma::antenna::ovro::DriveEngine::snow ( )

Track a position 60 degrees into the wind in order to minimize snow buildup on the backing structure (where it is more difficult to remove.

void carma::antenna::ovro::DriveEngine::stop ( )

Stop.

void carma::antenna::ovro::DriveEngine::stowSafe ( )

Stow antenna to a safe position.

The safe position is defined to be the middle of the safe range.

Precondition
Must call setSafeRange before calling this.
Exceptions
IllegalStateExceptionif setSafeRange not called prior.
See Also
setSafeRange
void carma::antenna::ovro::DriveEngine::stowZenith ( )

Stow antenna close to zenith.

void carma::antenna::ovro::DriveEngine::thawTilt ( )

Thaw tilt ( debug )

void carma::antenna::ovro::DriveEngine::toggleBacklashCorrection ( bool  enable)

Toggle backlash correction.

void carma::antenna::ovro::DriveEngine::updateConfigurationData ( )

Update Drive module configuration data from file.

void carma::antenna::ovro::DriveEngine::updateRaDec ( const RaDecEpoch &  raDecEpoch,
WrapType  wrap = NO_TURN 
)

Update current Ra/Dec position with a new epoch.

Parameters
RaDecEpochRa/Dec at specified time.
wrapWrap mode.

The documentation for this class was generated from the following file: