Skip to content

Commit

Permalink
Merge pull request #24 from lsst-ts/tickets/DM-26384
Browse files Browse the repository at this point in the history
DM-26384: Read telemetry timestamp from telemetry header
  • Loading branch information
r-owen committed Oct 29, 2020
2 parents e623ced + e8d9a82 commit 0d3df37
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
16 changes: 16 additions & 0 deletions doc/version_history.rst
Expand Up @@ -6,6 +6,22 @@
Version History
###############

v0.7.3
======

Changes:

* Use the time in the telemetry header to set the ``rotation`` telemetry topic's time stamp.

Requires:

* ts_hexrotcomm 0.7
* ts_salobj 5.11 or 6
* ts_simactuators 1
* ts_idl 1.4, or 2 with salobj 6
* ts_xml 6.2
* Rotator IDL files, e.g. made using ``make_idl_files.py Rotator``

v0.7.2
======

Expand Down
13 changes: 7 additions & 6 deletions python/lsst/ts/rotator/rotator_csc.py
Expand Up @@ -24,6 +24,8 @@
import argparse
import pathlib

import astropy.time

from lsst.ts import salobj
from lsst.ts import hexrotcomm
from lsst.ts.idl.enums import Rotator
Expand Down Expand Up @@ -244,11 +246,10 @@ def telemetry_callback(self, server):
server : `lsst.ts.hexrotcomm.CommandTelemetryServer`
TCP/IP server.
"""
# TODO DM-26384: use the new timestamp in the telemetry from
# the low-level controller, instead of this time.
# Also consider computing actual velocity using delta position
# and that (presumably accurate) timestamp.
curr_tai = salobj.current_tai()
tel_time = astropy.time.Time(
server.header.mjd, server.header.mjd_frac, format="mjd", scale="utc"
)
tel_tai_unix = salobj.tai_from_utc(tel_time)
if self._tracking_started_telemetry_counter > 0:
self._tracking_started_telemetry_counter -= 1
self.evt_summaryState.set_put(summaryState=self.summary_state)
Expand Down Expand Up @@ -279,7 +280,7 @@ def telemetry_callback(self, server):
/ 2,
debugActualVelocityA=server.telemetry.current_vel_ch_a_fb,
debugActualVelocityB=server.telemetry.current_vel_ch_a_fb,
timestamp=curr_tai,
timestamp=tel_tai_unix,
)
self.tel_electrical.set_put(
copleyStatusWordDrive=[
Expand Down

0 comments on commit 0d3df37

Please sign in to comment.