trkwsPOS_CAL

Section: Devices and Network Interfaces (4)
Updated: 2012-04-23 10:11
Index Return to man pages list
 

NAME

trkwsPOS_CAL - class to handle new axis position events

 

SYNOPSIS


#include "trkwsPOS_CALC.h"

trkwsPOS_CALC myCalcInstance(dbPoint);

 

PARENT CLASS


public fndOBJECT
public eccsERROR_CLASS

 

DESCRIPTION


This class is able to handle events for a new axis position.
It is meant to be used as a collaborator of trkwsCON_MAIN_TASK.
When an instance of the class is created (and it is Enabled()), it attach events
on the alt and az LCU image points to monitor for axis' position updates.

When an event for a new position is received, its timestamp and values are
read and stored in a circular buffer.

Then the circular buffers for the tracking axis are searched for matching
values and the actual telescope global position is calculated and saved
in the database.

If everything goes fine, a new telescope position is calculated and written on the
database performing the necessary backward calculations (see ActPosDbEventCB()).
If something goes wrong, an alarm is rised and 0 values are written in the
database.

To give the system the possibility of getting properly synchronized at startup
or in case of small errors, a bonus of trkwsERROR_BONUS_SIZE errors is given, i.e
no error is really generated for the firs trkwsERROR_BONUS_SIZE consecutive errors.

In order not to flod the system with errors, error logging is also stopped if there
are more than trkwsMAX_ERROR_COUNT consecutive errors.

 

PUBLIC METHODS


  trkwsPOS_CALC(const dbSYMADDRESS dbPoint);
  virtual ~trkwsPOS_CALC();

  ccsCOMPL_STAT Enable();
  ccsCOMPL_STAT Disable();

  virtual evhCB_COMPL_STAT ActPosDbEventCB(evtEVENT_MSG &msg, void *udata);

 

PROTECTED METHODS


  ccsCOMPL_STAT SetInvalid(vltINT32 code, vltDOUBLE time = 0);
  ccsCOMPL_STAT SetValid();

 

PRIVATE DATA MEMBERS


  Symbolic address for the root point
    dbSYMADDRESS    dbPoint;

  Objects to handle the LCU images, dynamically created
    trkwsPOS_READ_LIST *altLcu;
    trkwsPOS_READ_LIST *azLcu;

  Database attributes to be accessed in wirte mode for update

    eccsDB_INT32  posStatus;
    eccsDB_DOUBLE syncTimestamp;
    eccsDB_DOUBLE rotPosActual;
    eccsDB_DOUBLE refAlpha;
    eccsDB_DOUBLE refDelta;

    This attributes are written at once and form a consistent data set.
    vltDOUBLE altitude;
    vltDOUBLE azimuth;
    vltDOUBLE alpha2000Readback;
    vltDOUBLE delta2000Readback;
    vltDOUBLE alpha2000DegReadback;
    vltDOUBLE delta2000DegReadback;
    vltDOUBLE alphaCurrentReadback;
    vltDOUBLE deltaCurrentReadback;
    vltDOUBLE alphaReadback;
    vltDOUBLE deltaReadback;
    vltDOUBLE alphaEncoder;
    vltDOUBLE deltaEncoder;
    vltDOUBLE siderealTime;
    vltDOUBLE hourAngle;
    vltDOUBLE decDeviation;
    vltDOUBLE raDeviation;

  Database attributes to be accessed in read mode for calculations

    eccsDB_DOUBLE maxTimeDifference;
    eccsDB_DOUBLE epoch;
    eccsDB_DOUBLE dut1;
    eccsDB_DOUBLE wavelen;
    eccsDB_DOUBLE temperature;
    eccsDB_DOUBLE pressure;
    eccsDB_DOUBLE humidity;
    eccsDB_DOUBLE lapseRate;
    eccsDB_DOUBLE longitude;
    eccsDB_DOUBLE latitude;
    eccsDB_DOUBLE height;

  Internal flags and variables

    vltLOGICAL enabled;

    vltINT32   errorCounter;
    vltINT32   errorCounterRotatorAddr;
    vltINT32   errorBonus;
    vltDOUBLE  lastTimeStamp;
    vltLOGICAL alreadyInvalid;



 

Index

NAME
SYNOPSIS
PARENT CLASS
DESCRIPTION
PUBLIC METHODS
PROTECTED METHODS
PRIVATE DATA MEMBERS

This document was created by man2html, using the manual pages.
Time: 10:11:26 GMT, April 23, 2012