Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://www.apo.nmsu.edu/Telescopes/TCC/UDPPackets.html
Дата изменения: Fri Nov 7 21:52:59 2014 Дата индексирования: Sat Apr 9 23:23:34 2016 Кодировка: Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п п |
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:
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 |
Size | int4 | Number of bytes in this packet (including this header). |
Type | int4 | A code identifying the type of packet; codes are defined where? |
MajorVers | int4 | Major 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. |
MinorVers | int4 | Minor 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 |
TAIDate | double | Date at which data was or will be current (TAI, MJD seconds) |
SlewEndtime | double | Date at which current/last slew ends/ended (TAI, MJD seconds); NaN if the telescope is not slewing (or, possibly, tracking). |
CoordSys(8) | byte | Coordinate system (as a string) |
Epoch | double | Epoch (decimal year; Besselian for FK5, Julian otherwise). |
ObjNetPos(2) | pos, vel double | Net target position in user coordinates; axis 1,2 (e.g. RA,Dec or Az,Alt). |
Boresight(2) | pos, vel double | Boresight position (instrument x,y). |
RotType | padded int4 | User-specified type of rotation; see rotation type codes. |
RotPos | pos, vel double | User-specified rotation angle; the exact meaning depends on RotType. |
ObjInstAng | pos, vel double | Orientation of the object with respect to the instrument. |
SpiderInstAng | pos, vel double | Orientation of the secondary spider with respect to the instrument. |
TCCPos(3) | pos, vel double | Mount position of (azimuth, altitude, instrument rotator) axes, as requested by the TCC. |
SecFocus | double | User-set secondary mirror focus offset. |
AxisCmdState(3) | padded int4 | Commanded state of (azimuth, altitude, instrument rotator) axes; see axis commanded state codes. |
AxisErrCode(3) | padded int4 | Error 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 double | Actual mount position, velocity and time as reported by the azimuth, altitude and rotator axis controllers. |
AxisStatusWord(3) | padded int4 | Status 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.
RotType | Description |
---|---|
0 | None |
1 | Object |
2 | Horizon |
3 | Physical |
4 | Mount |
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.
AxisCmdState | Description |
---|---|
-1 | NotAvailable: axis is not available |
0 | Halted |
1 | Drifting |
2 | Slewing |
3 | Halting |
4 | Tracking |
5 | BadCode: 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.
AxisErrCode | Description |
---|---|
-3 | HaltRequested: halt requested |
-2 | NoRestart: axis left halted via /NoRestart |
-1 | NotAvailable: axis not available |
0 | OK (no error) |
1 | MinPos: position too small |
2 | MaxPos: position too large |
3 | MaxVel: velocity to large |
4 | MaxAccel: acceleration too large |
5 | MaxJerk: jerk too large |
6 | CannotCompute: could not compute the position |
7 | ControllerErr: could not communicate with the axis controller |
8 | TCCBug: a TCC bug |
9 | BadCode: unknown error code |
Notes:
Added AxisErrCode, ActMount and AxisStatusWord fields.
Added reference to tcc35m-1-p and made minor tweaks to the text.
Added AxisCmdState field.
Added SecFocus field.
New packet format.