}

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:

  • SDSS 2.5m telescope (tcc25m): port 1200
  • 3.5m telescope (tcc35m): port 1235

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:

  • See the TCC Message Keywords Dictionary for full definitions of most items in the "data" section of the packet.
  • pos, vel double is a structure containing two doubles: "pos" and "vel"; it contains the same information as the TCC's "coordinates" (p,v,t triplets), but with time given by the "TAIDate" entry in the packet.
  • Comparing SlewEndtime and TAIDate will tell you if the telescope is still slewing (as of when the packet data was generated).
  • CoordSys and Epoch are guaranteed not to change unless SlewEndtime also changes.

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.