Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-26382

Please add a timestamp to the telemetry published by the Rotator low-level controller

    XMLWordPrintable

    Details

      Description

      It would be helpful to have a timestamp field added to the telemetry struct output by the low-level MT Rotator controller. My preferred format is that used by SAL: TAI unix seconds as double precision (float isn't accurate enough).

      This would provide a reference point for reported velocity.

      It would also allow computing a measured rotator velocity using (pos1 - pos0) /( t1 - t0) – which seems likely to avoid the oddities we see in the two actual velocities that are presently being reported.

      I assume the low-level Rotator controller has easy access to TAI time; it certainly should, as it is necessary in order to properly handle tracking commands.

        Attachments

          Issue Links

            Activity

            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            The following is the timestamp maintained in the rotator Simulink model:
            https://github.com/lsst-ts/ts_rotator_controller/blob/master/src/smlnkModel/rotator_smlnk_Controller.c#L778

            Not sure this is what we want or not. May need to check with Simulink model to see the details.

            Based on the code, this rotatorTelemetry_signal.Time_UnixSec is the same value of ddsTlm.header.mjd. Maybe this is the value you are looking for:
            https://github.com/lsst-ts/ts_rotator_controller/blob/master/src/sys.c#L380

            Show
            ttsai Te-Wei Tsai added a comment - - edited The following is the timestamp maintained in the rotator Simulink model: https://github.com/lsst-ts/ts_rotator_controller/blob/master/src/smlnkModel/rotator_smlnk_Controller.c#L778 Not sure this is what we want or not. May need to check with Simulink model to see the details. Based on the code, this rotatorTelemetry_signal.Time_UnixSec is the same value of ddsTlm.header.mjd . Maybe this is the value you are looking for: https://github.com/lsst-ts/ts_rotator_controller/blob/master/src/sys.c#L380
            Hide
            ttsai Te-Wei Tsai added a comment -

            If you want to use "(pos1 - pos0) /( t1 - t0)" to calculate the velocity, you may need to be very careful because this formula will be affected by the noise pretty much.

            Show
            ttsai Te-Wei Tsai added a comment - If you want to use "(pos1 - pos0) /( t1 - t0)" to calculate the velocity, you may need to be very careful because this formula will be affected by the noise pretty much.
            Hide
            rowen Russell Owen added a comment -

            Thank you. I had forgotten about the header. Yes, that will do, though I would much rather have TAI time than unix (UTC-ish) time. TAI is our standard time system. See also DM-26451 where it is much more important.

            To get TAI you just have to call to clock_gettime(CLOCK_TAI, &unixTAI).

            Do you think (pos1 - pos0) /( t1 - t0) will be worse than the two velocities you are presently providing? It seems to avoid the weird behavior around 0 velocity in your graphs, and those two velocities are also noisy.

            Show
            rowen Russell Owen added a comment - Thank you. I had forgotten about the header. Yes, that will do, though I would much rather have TAI time than unix (UTC-ish) time. TAI is our standard time system. See also DM-26451 where it is much more important. To get TAI you just have to call to clock_gettime(CLOCK_TAI, &unixTAI) . Do you think (pos1 - pos0) /( t1 - t0) will be worse than the two velocities you are presently providing? It seems to avoid the weird behavior around 0 velocity in your graphs, and those two velocities are also noisy.
            Hide
            rowen Russell Owen added a comment -

            If you are willing to report TAI instead of standard unix time then can we use this ticket for that purpose? Feel free to edit the title and description. Or we can close this and open a separate ticket if you prefer.

            Show
            rowen Russell Owen added a comment - If you are willing to report TAI instead of standard unix time then can we use this ticket for that purpose? Feel free to edit the title and description. Or we can close this and open a separate ticket if you prefer.
            Hide
            ttsai Te-Wei Tsai added a comment - - edited

            Consider this ticket to be invalid because of the duplication of DM-26451. The publish of velocity from the low-level controller is done in DM-25994.

            Show
            ttsai Te-Wei Tsai added a comment - - edited Consider this ticket to be invalid because of the duplication of DM-26451 . The publish of velocity from the low-level controller is done in DM-25994 .
            Hide
            rowen Russell Owen added a comment -

            As long as the time in the telemetry header is the correct time at which the position and velocity were measured, I agree it is much better to use the time in the header than to add a new time field to the telemetry.

            Show
            rowen Russell Owen added a comment - As long as the time in the telemetry header is the correct time at which the position and velocity were measured, I agree it is much better to use the time in the header than to add a new time field to the telemetry.

              People

              Assignee:
              ttsai Te-Wei Tsai
              Reporter:
              rowen Russell Owen
              Watchers:
              Russell Owen, Te-Wei Tsai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Start date:
                End date:

                  Jenkins

                  No builds found.