CARMA C++
carma::control::SubarrayControlImpl::TrackerThread Class Reference

Implementation of SAT as thread. More...

#include <carma/control/SubarrayTrackerThread.h>

Public Member Functions

long getAntennaTrackPeriod () const
 Returns antenna tracker thread period - set during construction. More...
 
long getAntennaWeatherPeriod () const
 Returns antenna weather update period - set during construction. More...
 
double getAntInterpolationInterval () const
 Returns antenna tracking interpolation interval as a fraction of a day. More...
 
long getDelayEngineWeatherPeriod () const
 Returns delay engine weather update period - set during construction. More...
 
double getInterpolationInterval () const
 Returns interferometry interpolation interval as a fraction of a day. More...
 
double getLastAntUpdate () const
 
double getLastIntferUpdate () const
 
monitor::CarmaMonitorSystemgetMonitorSystem () const
 Returns internal CARMA Monitor System object. More...
 
long getTrackerPeriod () const
 Returns tracker thread period - set during construction. More...
 
void operator() ()
 Thread functor method. More...
 
void setLastAntUpdate (double mjd)
 Set time of last antenna tracking position update. More...
 
void setLastIntferUpdate (double mjd)
 Set time of last interferometry sky position update. More...
 
 TrackerThread (SubarrayControlImpl &saCI, monitor::CarmaMonitorSystem &carmaMonitor, const unsigned long period=TRACKER_DEFAULT_UPDATE_INTERVAL, const unsigned long antennaWeatherPeriod=TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL, const unsigned long delayEngineWeatherPeriod=TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL, const unsigned long antennaTrackPeriod=TRACKER_DEFAULT_ANTENNA_TRACK_UPDATE_INTERVAL)
 Constructor. More...
 
void updateTracking ()
 Calls updateTracking on each antenna, and then calls computeDelay on delay engine. More...
 
 ~TrackerThread ()
 Destructor. More...
 

Static Public Attributes

static const unsigned long TRACKER_DEFAULT_ANTENNA_TRACK_UPDATE_INTERVAL = 8 * 60
 
static const unsigned long TRACKER_DEFAULT_UPDATE_INTERVAL = 20
 
static const unsigned long TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL = 4 * 60
 

Detailed Description

Implementation of SAT as thread.

See design document for CARMA Control package for details.

Critical method is updateTracking - all the work is done there, invoked periodically by action. Period is deteremined by TRACKER_UPDATE_INTERVAL which is currently set to 20 seconds. The update is synchronized to aboslute ,kd time, an integral number of TRACKER_UPDATE_INTERVALS. The quadratic interpolator will be filled with 3 samples that are -0.5T, +0.5T, and 1.5T from the current time, allowing interpolation from 0T to 1.0T without ever being near the boundary where precision could cause an error.

TrackerThread::updateTracking sends topocentric RA/Dec to antennas for RA/Dec specified sources, and Az/El for Az/El specified targets, in addition to Ut1-Utc corrections. It also sends geocentric Ra/Dec for each antenna) to delay engine for RA/Dec specified sources and Az/El for each antenna to delay engine for Az/El specified targets.

Definition at line 56 of file SubarrayTrackerThread.h.

Constructor & Destructor Documentation

carma::control::SubarrayControlImpl::TrackerThread::TrackerThread ( SubarrayControlImpl &  saCI,
monitor::CarmaMonitorSystem carmaMonitor,
const unsigned long  period = TRACKER_DEFAULT_UPDATE_INTERVAL,
const unsigned long  antennaWeatherPeriod = TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL,
const unsigned long  delayEngineWeatherPeriod = TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL,
const unsigned long  antennaTrackPeriod = TRACKER_DEFAULT_ANTENNA_TRACK_UPDATE_INTERVAL 
)
explicit

Constructor.

Constructs tracker thread for a set of antennas, a specified delay engine and (possibly) an initial source.

Parameters
carmaMonitor,referenceto full CARMA monitor system - used to read in fresh values from the monitor stream.
period,constlong periodicity of tracker thread firing set to TRACKER_DEFAULT_UPDATE_INTERVAL. Measured in seconds.
antennaWeatherPeriod,constlong periodicity of weather update to antennas, set to TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL. Measured in seconds.
delayEngineWeatherPeriod,constlong periodicity of weather update to delay engine, set to TRACKER_DEFAULT_WEATHER_UPDATE_INTERVAL. Measured in seconds.
antennaTrackPeriod,constlong periodicity of tracking update to antennas, set to TRACKER_DEFAULT_ANTENNA_TRACK_UPDATE_INTERVAL. Measured in seconds.
carma::control::SubarrayControlImpl::TrackerThread::~TrackerThread ( )

Destructor.

Member Function Documentation

long carma::control::SubarrayControlImpl::TrackerThread::getAntennaTrackPeriod ( ) const

Returns antenna tracker thread period - set during construction.

Value is returned in seconds.

Returns
const long value of antenna tracking period in seconds.
long carma::control::SubarrayControlImpl::TrackerThread::getAntennaWeatherPeriod ( ) const

Returns antenna weather update period - set during construction.

Value is returned in seconds.

Returns
const long value of antenna weather update period in seconds.
double carma::control::SubarrayControlImpl::TrackerThread::getAntInterpolationInterval ( ) const

Returns antenna tracking interpolation interval as a fraction of a day.

Returns
const double value of antenna interpolation interval, as a fraction of a day.
long carma::control::SubarrayControlImpl::TrackerThread::getDelayEngineWeatherPeriod ( ) const

Returns delay engine weather update period - set during construction.

Value is returned in seconds.

Returns
const long value of delay engine weather update period in seconds.
double carma::control::SubarrayControlImpl::TrackerThread::getInterpolationInterval ( ) const

Returns interferometry interpolation interval as a fraction of a day.

Returns
const double value of interferometry interpolation interval, as a fraction of a day.
double carma::control::SubarrayControlImpl::TrackerThread::getLastAntUpdate ( ) const
Returns
time of last antenna tracking position update as an MJD.
double carma::control::SubarrayControlImpl::TrackerThread::getLastIntferUpdate ( ) const
Returns
The time of last interferometry sky position update, as an MJD
monitor::CarmaMonitorSystem& carma::control::SubarrayControlImpl::TrackerThread::getMonitorSystem ( ) const

Returns internal CARMA Monitor System object.

Returns
monitor::CarmaMonitorSystem object reference
long carma::control::SubarrayControlImpl::TrackerThread::getTrackerPeriod ( ) const

Returns tracker thread period - set during construction.

Value is returned in seconds.

Returns
const long value of thread period in seconds.
void carma::control::SubarrayControlImpl::TrackerThread::operator() ( )

Thread functor method.

To be passed in to boost::thread constructor.

void carma::control::SubarrayControlImpl::TrackerThread::setLastAntUpdate ( double  mjd)

Set time of last antenna tracking position update.

Input truncated to align with the effective interval.

Parameters
mjdThe time to set the ant track update to.
void carma::control::SubarrayControlImpl::TrackerThread::setLastIntferUpdate ( double  mjd)

Set time of last interferometry sky position update.

Input truncated to align with the effective interval.

Parameters
mjdThe time to set the interferometry update to.
void carma::control::SubarrayControlImpl::TrackerThread::updateTracking ( )

Calls updateTracking on each antenna, and then calls computeDelay on delay engine.

setAntennaLOFreq should already have been called by constructor of SubarrayControlImpl.


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