CARMA C++
carma::interferometry::DelayEngine Class Reference

DelayEngine interface. More...

#include <carma/interferometry/DelayEngine.h>

Public Member Functions

DelayFrameVec computeDelays (void)
 Initiation a delay calculation. More...
 
 DelayEngine ()
 constructor More...
 
bool selfTest (bool verbose)
 Perform an internal selftest to compute a geometric delay for an antenna configuration with a known answer. More...
 
void setAdjustableDelay (unsigned short antennaNo, double delay)
 Set the value for the user-definable delay offset. More...
 
void setAllAntennaLOFreqs (const services::Frequency &LO1freq)
 Set the LO1 frequency for all antennas to the same value. More...
 
void setAntennaAzEl (unsigned short antennaNo, double mjd, double pntaz, double pntel, double phsaz, double phsel)
 Tell the DelayEngine parameters required to determine delay information for an antenna pointed to a fixed azimuth and elevation. More...
 
void setAntennaCoordinates (unsigned short antennaNo, double x, double y, double z, services::AntennaCoordinateType acType, double axisMis)
 
void setAntennaCoordinates (unsigned short antennaNo, const services::Location &location, const services::Length &axisMis)
 Set the antenna coordinates. More...
 
void setAntennaDelays (unsigned short antennaNo, double antDelay, double opticsDelayMM, double opticsDelayCM, double loCableDelayMM, double loCableDelayCM)
 Set the value for the pad-to-antenna, and other antenna specific delays. More...
 
void setAntennaLOFreq (unsigned short antennaNo, const services::Frequency &LO1freq)
 This is the primary method for telling the DelayEngine about the source being tracked. More...
 
void setAntennaRaDec (unsigned short antennaNo, double mjd, double pntra, double pntdec, double phsra, double phsdec, bool logAction, const std::string &source)
 
void setArrayReferencePoint (const services::Location &location)
 
void setAxisMisalignment (unsigned short antennaNo, const services::Length &axisMis)
 Set the axis misalignment value. More...
 
void setDelayOffset (unsigned short antennaNo, double delay)
 Set the value for the antenna's delay offset. More...
 
void setPadDelay (unsigned short antennaNo, double delay)
 Set the value for the array-center-to-pad delay. More...
 
void setRxDelayPol1 (unsigned short antennaNo, double delay)
 Set the receiver offset for polarization state 1. More...
 
void setRxDelayPol2 (unsigned short antennaNo, double delay)
 Set the receiver offset for polarization state 2. More...
 
void setWeather (double airTemp, double atmPressure, double relHumid)
 Set the current weather parameters, needed to calculated the tropospheric delay. More...
 
void setWeather (const services::Temperature &airTemp, const services::Pressure &atmPressure, double relHumid)
 Set weather using conformable quantities. More...
 
void testAgainstBima (void)
 Print out the delays from CARMA and BIMA code. More...
 
void useAdjustableDelay (unsigned short antennaNo, bool useit)
 Tell the DelayEngine whether to use the adjustable delay for a given antenna. More...
 
void useGeometricDelay (unsigned short antennaNo, bool useit)
 Tell the DelayEngine whether to use the geometric delay for a given antenna. More...
 
void useHeightDelay (unsigned short antennaNo, bool useit)
 Tell the DelayEngine whether to use the additional refractive height delay for a given antenna. More...
 
void useIonosphericDelay (unsigned short antennaNo, bool useit)
 Tell the DelayEngine whether to use the ionospheric delay for a given antenna. More...
 
void useThermalDelay (unsigned short antennaNo, bool useit)
 Tell the DelayEngine whether to use the thermal delay for a given antenna. More...
 
void useTroposphericDelay (unsigned short antennaNo, bool useit)
 Tell the DelayEngine whether to use the tropospheric delay for a given antenna. More...
 
 ~DelayEngine ()
 destructor More...
 

Detailed Description

DelayEngine interface.

Interferometry information is generated as delays for altering the total path length (in terms of nanoseconds) of the light wave front from a source. The delays are determined by information given to the Delay Engine from the Sub-Array Tracker.

Delays are then computed for wave front altering parameters such as atmospheric refraction (including ionospheric and tropospheric effects), thermal displacement of antenna heights and geometric corrections based the positions of the antennas on the ground.

The time-tagged, antenna-based delay values are passed to LobeRotator and Correlator subsystems every 20 seconds (the rate is determined by the SAT). When discontinuity occurs, due to source or frequency change, three sets of delays are sent in rapid succession.

The timing of this delay loop is not critical, as long as values are published approximately every 20 seconds, the client subsystem interpolators will function accurately.

A typical invocation is as follows:

using namespace carma::interferometry;
using namespace carma::util;

DelayEngine delayEngine
delayEngine.setArrayReferencePoint( location );
delayEngine.setWeather( temperature, pressure, relhumid );
delayEngine.setAntennaLOFreq( antNumber, frequency ) delayEngine.setAntennaCoordinates( antNumber, x, y, z,
acType, axisMis );
delayEngine.setDelayOffset( antNumber, offset );
delayEngine.setAntennaRaDec( antNumber, mjd, pntRa, pntDec,
phsRa, phsDec );
delayEngine.setDelayOffset( offset, antNumber ); delayEngine.computeDelays();

Note setArrayReferencePoint and setAntennaLOFreq must be called before setAntennaSource or setAntennaRaDec because the reference point and frequency are needed to computed the actual current sky position (refraction included). An exception will be thrown if the methods are called out of order.

For AZ/EL tracking the method setAntennaAzEl() is provided.

See Also
http://www.mmarray.org/project/WP/Interferometry
Author
Marc Pound

Check that OVRO and BIMA define axis misalignment D_a using the same +/- convention. change compute elevation to allow EL > 90. Have callers modify the result if necessary, since elevation always used in trig function: sin(EL) = sin(180-EL). cos(EL) = - cos(180-EL).

Definition at line 103 of file DelayEngine.h.

Constructor & Destructor Documentation

carma::interferometry::DelayEngine::DelayEngine ( )

constructor

carma::interferometry::DelayEngine::~DelayEngine ( )

destructor

Member Function Documentation

DelayFrameVec carma::interferometry::DelayEngine::computeDelays ( void  )

Initiation a delay calculation.

To keep interpolations downstream valid, this method must be called by the Subarray Tracker at least every 20 seconds, normally after the appropriate set or use calls.

bool carma::interferometry::DelayEngine::selfTest ( bool  verbose)

Perform an internal selftest to compute a geometric delay for an antenna configuration with a known answer.

Parameters
verbosetrue if you want some intermediate messages
Returns
true if self test passed, false if not.
void carma::interferometry::DelayEngine::setAdjustableDelay ( unsigned short  antennaNo,
double  delay 
)

Set the value for the user-definable delay offset.

By convention (10/2008), this parameter will be used for the "global" delay centering term used for all antennas in a subarray.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
delayDelay value in nanoseconds.
Returns
none.
See Also
Equation 23 of interferometry design document.
void carma::interferometry::DelayEngine::setAllAntennaLOFreqs ( const services::Frequency LO1freq)

Set the LO1 frequency for all antennas to the same value.

Parameters
LO1freqThe LO1 frequency, represented by a Frequency object
void carma::interferometry::DelayEngine::setAntennaAzEl ( unsigned short  antennaNo,
double  mjd,
double  pntaz,
double  pntel,
double  phsaz,
double  phsel 
)

Tell the DelayEngine parameters required to determine delay information for an antenna pointed to a fixed azimuth and elevation.

This method should be used when looking at the transmitter or when doing drift scans of celestial objects.

The phase center AZ and EL are assumed to be identical to the pointing center AZ and EL.

The frequency is used to compute refraction effects. The azimuth and elevation are used in tropospheric and geometric delay computations. and delay computations.

Calling this method turns resets the delay computation for the given antenna to use AZ and EL , rather than RA and DEC. It also sets the TrackState monitor point for this antenna to the string "AZEL". To change back, setAntennaRaDec must be called.

This method should be called about once per 30 seconds by the SubArray Tracker.

No distance is given in this method call because we don't do horizontal parallax correction for AZEL pointing mode.

NOTE: pntaz is never used by the DelayEngine code, should we eliminate it as a parameter or keep it for symmetry?

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
mjdModified Julian day number for input parameters
pntazThe pointing center azimuth for the antenna, radians
pntelThe pointing center elevation for the antenna, radians
phsazThe phase center azimuth for the antenna, radians
phselThe phase center elevation for the antenna, radians input parameter since the last call for this antenna
Returns
none.
void carma::interferometry::DelayEngine::setAntennaCoordinates ( unsigned short  antennaNo,
double  x,
double  y,
double  z,
services::AntennaCoordinateType  acType,
double  axisMis 
)

Tell the DelayEngine the position for the given antenna, either absolute or relative to the array center. Axis misalignment is also stuck in here because we need it.

The first three parameters specify the location of the antenna. They may be in one of the three common coordinate systems: Topocentric (X,Y,Z); (Longitude, Latitude, Altitude); or (Up, East, North). The fourth parameter acType indicates which coordinate system was entered. You must first specify the array reference position with a previous call to setArrayReferencePoint(). If you do not, an exception is is thrown because there is not enough info to calculate needed quantities.

Antenna (X,Y,Z) positions are in the Equatorial coordinate system defined in Thompson, Moran, and Swension, 1st edition, equation 4.15. To wit: X in the plane defined by the terrestrial poles and the reference point of the array, Y toward the east and Z toward the North Celestial Pole. The XY plane is parallel to the earth's equator, Z is parallel to the earth's spin axis.

Antenna (L,L,A) are The longitude/latitude/altitude coordinate system. Longitude increases from 0 at Greenwich, England in an easterly direction, and decreases in a westerly direction. East longitudes are correctly described as positive numbers between 0 and 180 degrees. West longitudes are negative numbers between 0 and -180 degrees.

Antenna (U, E, N): This Up, East, North coordinate system is useful for specifying locations relative to a given LLA point. Coordinates are in a tangent plane at the specified LLA point, with N pointing due north, E pointing due east, and U pointing straight up along a radial vector from the center of the earth, and passing through the given LLA point.

Parameters
antennaNoThe unique id for the antenna. Must be > 0 && < 23.
xAntenna X position in meters relative to array reference point OR the Longitude in radians OR the Up in meters
yAntenna Y position in meters relative to array reference point OR the Latitude in radians OR the East in meters
zAntenna Z position in meters relative to array reference point OR the Altitude in meters OR the North in meters
AntennaCoordinateTypeacType Specifies what you put in for the first 3 parameters, one of: ANTCOORD_TOPO_XYZ, ANTCOORD_GEO_XYZ, ANTCOORD_LLA, ANTCOORD_UEN.
axisMisthe axis misalignment value in meters
Returns
none.
See Also
services::AntennaCoordinateType
carma::services::setArrayReferencePoint
setArrayReferencePoint
Exceptions
carma::util::ErrorException
void carma::interferometry::DelayEngine::setAntennaCoordinates ( unsigned short  antennaNo,
const services::Location location,
const services::Length axisMis 
)

Set the antenna coordinates.

Parameters
antennaNoThe unique id for the antenna. Must be > 0 && < 23.
locationThe antenna coordinates as a Location
axisMisthe axis misalignment value as a Length
void carma::interferometry::DelayEngine::setAntennaDelays ( unsigned short  antennaNo,
double  antDelay,
double  opticsDelayMM,
double  opticsDelayCM,
double  loCableDelayMM,
double  loCableDelayCM 
)

Set the value for the pad-to-antenna, and other antenna specific delays.

The antenna delay is always used in calculating the total delay; there is no bool "use" parameter to toggle it on and off.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
antDelayDelay value in nanoseconds.
opticsDelayMMOptics delay for mm receivers in nanoseconds.
opticsDelayCMOptics delay for cm receiver in nanoseconds.
loCableDelayMMLO cable delay for mm receivers in nanoseconds.
loCableDelayCMLO cable delay for cm receiver in nanoseconds.
Returns
none.
void carma::interferometry::DelayEngine::setAntennaLOFreq ( unsigned short  antennaNo,
const services::Frequency LO1freq 
)

This is the primary method for telling the DelayEngine about the source being tracked.

Separate pointing and phase centers are allowed; these are specified as offsets to the nominal source position. These offsets are sky offsets not coordinate offsets, following the same convention as SubarrayControl and Ephemeris. To convert an RA coordinate offset to a sky offset, multiply by cos(dec) The pointing offsets naturally provide for mosaicking.

Calling this method turns resets the delay computation for the given antenna to use RA and DEC, rather than AZ and EL. It also sets the TrackState monitor point for this antenna to the string "RADEC". To change back, setAntennaAzEl must be called.

This method should be called about once per 20 seconds by the SubArray Tracker.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
nameA string indicating the source name. The source must be in the CARMA catalog or be a known solar system body.
mjdModified Julian day number for input parameters
raPointingOffsetthe right ascension pointing center offset from the source position, in radians.
decPointingOffsetthe declination pointing center offset from the source position, in radians
raPhaseOffsetthe right ascension phase center offset from the source position, in radians
decPhaseOffsetthe declination phase center offset from the source position, in radians input parameter since the last call for this antenna.
Returns
none.
Exceptions
theEphemeris class will throw an exception if the source is not in the CARMA catalog. void setAntennaSource( unsigned short antennaNo, const std::string& name, double mjd, double raPointingOffset, double decPointingOffset, double raPhaseCenterOffset, double decPhaseCenterOffset );

Set the LO1 frequency, the multiplier and divisor to be passed to the lobe rotator. The frequency is also used in the calculation of refraction effects.

This method must be called by Control for delay computation to succeed. The LO1 frequency does not default.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
LO1freqThe LO1 frequency, represented by a Frequency object
void carma::interferometry::DelayEngine::setAntennaRaDec ( unsigned short  antennaNo,
double  mjd,
double  pntra,
double  pntdec,
double  phsra,
double  phsdec,
bool  logAction,
const std::string &  source 
)

Another way of specifying source position. This method tells the DelayEngine the position parameters required to determine delay information for an antenna which is tracking an RA,Dec position. Positions are FK5 for the current epoch, with any proper motion applied. Precession, nutation, polar motion, aberration, parallax, and any equatorial offsets have also been applied. Refraction has not been applied. The topocentric RA and DEC in the current equinox of the source are used to compute the pointing elevation of the antennas which is then also used in tropospheric and geometric delay computations. The Ephemeris class is used internally to convert RA,DEC to AZ,EL coordinates.

Calling this method turns resets the delay computation for the given antenna to use RA and DEC, rather than AZ and EL. It also sets the TrackState monitor point for this antenna to the string "RADEC". To change back, setAntennaAzEl must be called.

This method should be called about once per 20 seconds by the SubArray Tracker.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
mjdModified Julian day number for input parameters
pntraThe topocentric Pointing center RA in the current equinox for the source being observed, radians
pntdecThe topocentric Pointing center Dec in the current equinox for the source being observed, radians
phsraThe topocentric Phase center RA in the current equinox for the source being observed, radians
phsdecThe topocentric Phase center Dec in the current equinox for the source being observed, radians input parameter since the last call for this antenna
sourceThe source name
Returns
none.
void carma::interferometry::DelayEngine::setArrayReferencePoint ( const services::Location location)

Change the array reference point as Antenna (Longitude, Latitude, Altitude) coordinates. This coordinate is also by definition (X=0, Y=0, Z=0). Antenna coordinates in setAntennaCoordinates are with respect to the array reference point. This method must be called prior to setAntennaCoordinates() or an exception will be thrown by that method.

A call to setArrayReferencePoint() will result in the discontinuity flag being set to true. That is, this call will be treated like a call to setAntennaCoordinates and a new triplet will be sent automatically to clients on the next call to computeDelays.


Parameters
locationthe location object giving the geographic coordinates of the reference point.
See Also
setAntennaCoordinates
void carma::interferometry::DelayEngine::setAxisMisalignment ( unsigned short  antennaNo,
const services::Length axisMis 
)

Set the axis misalignment value.

Parameters
antennaNoThe unique id for the antenna. Must be > 0 && < 23.
axisMisthe axis misalignment value as a Length
void carma::interferometry::DelayEngine::setDelayOffset ( unsigned short  antennaNo,
double  delay 
)

Set the value for the antenna's delay offset.

This can be used to "tweaking up" the delays after, adjustable delay, pad delay, and antennaDelay are set. The delay offset is always used in calculating the total delay; there is no bool "use" parameter to toggle it on and off.

Parameters
antennaNoThe unique id for the antenna. Must be non-negative. Zero means all antennas.
delayDelay offset in nanoseconds.
Returns
none.
See Also
Equation 23 of interferometry design document.
void carma::interferometry::DelayEngine::setPadDelay ( unsigned short  antennaNo,
double  delay 
)

Set the value for the array-center-to-pad delay.

The pad delay is always used in calculating the total delay; there is no bool "use" parameter to toggle it on and off.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
delayDelay value in nanoseconds.
Returns
none.
void carma::interferometry::DelayEngine::setRxDelayPol1 ( unsigned short  antennaNo,
double  delay 
)

Set the receiver offset for polarization state 1.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
delayDelay value in nanoseconds.
Returns
none.
void carma::interferometry::DelayEngine::setRxDelayPol2 ( unsigned short  antennaNo,
double  delay 
)

Set the receiver offset for polarization state 2.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
delayDelay value in nanoseconds.
Returns
none.
void carma::interferometry::DelayEngine::setWeather ( double  airTemp,
double  atmPressure,
double  relHumid 
)

Set the current weather parameters, needed to calculated the tropospheric delay.

Note the air temperature is in Celsius so that this method signature matches other CARMA **weather(...) methods (e.g. DriveControl).

Parameters
airTempThe ambient air temperature in Celsius
atmPressureThe atmospheric pressure in millibars
relHumidThe relative humidity in percent.
Returns
none.
void carma::interferometry::DelayEngine::setWeather ( const services::Temperature airTemp,
const services::Pressure atmPressure,
double  relHumid 
)

Set weather using conformable quantities.

Parameters
airTempThe ambient air temperature.
atmPressureThe atmospheric pressure.
relHumidThe relative humidity in percent.
void carma::interferometry::DelayEngine::testAgainstBima ( void  )

Print out the delays from CARMA and BIMA code.

void carma::interferometry::DelayEngine::useAdjustableDelay ( unsigned short  antennaNo,
bool  useit 
)

Tell the DelayEngine whether to use the adjustable delay for a given antenna.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
useitTrue or false value.
Returns
none.
See Also
Equation 23 of interferometry design document.
void carma::interferometry::DelayEngine::useGeometricDelay ( unsigned short  antennaNo,
bool  useit 
)

Tell the DelayEngine whether to use the geometric delay for a given antenna.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
useitTrue or false value.
Returns
none.
See Also
Equation 23 of interferometry design document.
void carma::interferometry::DelayEngine::useHeightDelay ( unsigned short  antennaNo,
bool  useit 
)

Tell the DelayEngine whether to use the additional refractive height delay for a given antenna.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
useitTrue or false value.
Returns
none.
void carma::interferometry::DelayEngine::useIonosphericDelay ( unsigned short  antennaNo,
bool  useit 
)

Tell the DelayEngine whether to use the ionospheric delay for a given antenna.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
useitTrue or false value.
Returns
none.
See Also
Equation 23 of interferometry design document.
void carma::interferometry::DelayEngine::useThermalDelay ( unsigned short  antennaNo,
bool  useit 
)

Tell the DelayEngine whether to use the thermal delay for a given antenna.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
useitTrue or false value.
Returns
none.
See Also
Equation 23 of interferometry design document.
void carma::interferometry::DelayEngine::useTroposphericDelay ( unsigned short  antennaNo,
bool  useit 
)

Tell the DelayEngine whether to use the tropospheric delay for a given antenna.

Parameters
antennaNoThe unique id for the antenna. Must be > 0.
useitTrue or false value.
Returns
none.
See Also
Equation 23 of interferometry design document.

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