Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.apo.nmsu.edu/Telescopes/TCC/UDPPackets.html
Дата изменения: Fri Nov 7 21:52:59 2014
Дата индексирования: Sat Apr 9 23:23:34 2016
Кодировка:

Поисковые слова: arp 220
TCC UDP Packets

UDP Packets Sent by the TCC

Contents

Introduction

The TCC broadcasts UDP packets containing position information. These packets are broadcast 1/second (even if the axes are halted). Remember that UDP is not a reliable protocol, so integrity of the packets cannot be guaranteed.

The broadcast port depends on the telescope. As of 2007-09-04 these ports are:

Packet Format

The format of version 2.3 (major.minor) packets is as follows:

Each packet contains two components: a header, followed immediately by data.
Packet Header
Variable Type Description
Sizeint4Number of bytes in this packet (including this header).
Typeint4A code identifying the type of packet; codes are defined where?
MajorVersint4Major version number; incremented if packet is changed in a way that is more than simply an extension. Users should check that the major version number is exactly as expected.
MinorVersint4Minor version number; incremented if packet data is extended. Users should check that the minor version number is no smaller than expected.
Packet Data
Variable Type Description
TAIDatedoubleDate at which data was or will be current (TAI, MJD seconds)
SlewEndtimedoubleDate at which current/last slew ends/ended (TAI, MJD seconds); NaN if the telescope is not slewing (or, possibly, tracking).
CoordSys(8)byteCoordinate system (as a string)
EpochdoubleEpoch (decimal year; Besselian for FK5, Julian otherwise).
ObjNetPos(2)pos, vel doubleNet target position in user coordinates; axis 1,2 (e.g. RA,Dec or Az,Alt).
Boresight(2)pos, vel doubleBoresight position (instrument x,y).
RotTypepadded int4User-specified type of rotation; see rotation type codes.
RotPospos, vel doubleUser-specified rotation angle; the exact meaning depends on RotType.
ObjInstAngpos, vel doubleOrientation of the object with respect to the instrument.
SpiderInstAngpos, vel doubleOrientation of the secondary spider with respect to the instrument.
TCCPos(3)pos, vel doubleMount position of (azimuth, altitude, instrument rotator) axes, as requested by the TCC.
SecFocusdoubleUser-set secondary mirror focus offset.
AxisCmdState(3)padded int4Commanded state of (azimuth, altitude, instrument rotator) axes; see axis commanded state codes.
AxisErrCode(3)padded int4Error code of each axis; if the TCC has commanded a halt, this explains why (azimuth, altitude, instrument rotator) axes; see axis error codes.
ActMount(3)pos, vel, time doubleActual mount position, velocity and time as reported by the azimuth, altitude and rotator axis controllers.
AxisStatusWord(3)padded int4Status word reported by azimuth, altitude and rotator axis controller. Invalid if the corresponding axis does not exist.

"padded int4" means the data is contained in the first 4 bytes and the last 4 bytes are padding for data alignment. The padding bytes will probably be 0 but please do not rely on that.

"pos, vel double" is position, velocity as a pair of double precision numbers. Position is in degrees, velocity in deg/sec, and the time is given by the TAIDate field.

"pos, vel, time double" is position, velocity and time as three double precision numbers. Position is in degrees, velocity in deg/sec and time is TAI (MJD, seconds).

Rotation type codes are as follows (as defined in tinc:axedef.for). The corresponding names are described in TCC Commands: Rotate.
RotTypeDescription
0None
1Object
2Horizon
3Physical
4Mount

Axis commanded state codes are as follows. This corresponds to TCC Message Keyword AxisCmdState, but with integer values (as defined in tcc include file basics.h) instead of strings.
AxisCmdStateDescription
-1NotAvailable: axis is not available
0Halted
1Drifting
2Slewing
3Halting
4Tracking
5BadCode: unknown command state

Axis commanded state codes are as follows. This corresponds to TCC Message Keyword AxisErrCode, but with integer values (as defined in tcc include file basics.h) instead of strings.
AxisErrCodeDescription
-3HaltRequested: halt requested
-2NoRestart: axis left halted via /NoRestart
-1NotAvailable: axis not available
0OK (no error)
1MinPos: position too small
2MaxPos: position too large
3MaxVel: velocity to large
4MaxAccel: acceleration too large
5MaxJerk: jerk too large
6CannotCompute: could not compute the position
7ControllerErr: could not communicate with the axis controller
8TCCBug: a TCC bug
9BadCode: unknown error code

Notes:

Version History

2.4 2014-09

Added AxisErrCode, ActMount and AxisStatusWord fields.

2.3.1 2015-05

Added reference to tcc35m-1-p and made minor tweaks to the text.

2.3 2009-01

Added AxisCmdState field.

2.2 2000-10

Added SecFocus field.

2.1 1995-10

New packet format.