CARMA C++
|
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... | |
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.
Wrap states.
Definition at line 144 of file DriveEngine.h.
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.
IllegalStateException | if aperture constants have not been set. |
aperture | New desired aperture. |
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.
azimuth | Azimuth as an Angle object. |
void carma::antenna::ovro::DriveEngine::setAzEl | ( | const carma::services::Angle & | angle, |
const carma::services::Angle & | elevation | ||
) |
Set azimuth and elevation.
azimuth | Azimuth as an Angle object. |
elevation | Elevation 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.
azMaxRate | Azimuth 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.
elevation | Elevation 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.
elMaxRate | Elevation 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.
enable | True to enable engineering mode, false to disable. |
void carma::antenna::ovro::DriveEngine::setLocation | ( | const carma::services::Location & | location | ) |
Set antenna location.
location | Const 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.
Vector | of Ra/Dec instants. |
wrap | Wrap mode. |
void carma::antenna::ovro::DriveEngine::setRawDriveRates | ( | float | azRateInDegPerMin, |
float | elRateInDegPerMin | ||
) |
Engineering command to set raw drive slew rates.
Be careful with this.
azRateInDegPerMin | Azimuth slew rate in degrees per minute. |
elRateInDegPerMin | Elevation 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.
azRawVoltage | Azimuth raw voltage in volts. |
elRawVoltage | Elevation 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.
azLow | Safe azimuth range low value (range inclusive). |
azHigh | Safe azimuth range high value (range inclusive). |
elLow | Safe elevation range low value (range inclusive). |
elHigh | Safe 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.
source | Source 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.
ambientTemp | Ambient temperature in Celcius. |
barometricPressure | Barometric pressure in millibars. |
relativeHumidity | Relative humidity in percent. |
dewpointTemp | Dewpoint temperature in Celsius. |
windSpeed | Wind speed in miles/hour. |
windDirection | Direction 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.
IllegalStateException | if setSafeRange not called prior. |
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.
RaDecEpoch | Ra/Dec at specified time. |
wrap | Wrap mode. |