ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Changing Time stamps from Monotonic to Real-Time

    VOXL 2
    time imu camera
    2
    4
    27
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Aaron PorterA
      Aaron Porter
      last edited by Aaron Porter

      Hello,

      This is probably more of a question that is probably designed to make everything on the voxl2 stop working correctly but I am going to ask it anyways.

      What would happen if we changed the code to use the real-time clock instead of Monotonic for voxl-camera-server and the voxl-imu-server?

      Would the other services not function correctly? Would they have to also be changed to Real-time clocks? Is everything going to work smoothly like before?

      Not sure where IMU-server is located, otherwise I would try it out and post here but I see Camera server can access real-time but it is not used.

      Thank you for your time,
      Aaron Porter

      Eric KatzfeyE 1 Reply Last reply Reply Quote 0
      • Eric KatzfeyE
        Eric Katzfey ModalAI Team @Aaron Porter
        last edited by

        @Aaron-Porter Why would you want to do that?

        Aaron PorterA 1 Reply Last reply Reply Quote 0
        • Aaron PorterA
          Aaron Porter @Eric Katzfey
          last edited by

          @Eric-Katzfey

          A second device use NTP + PPS for time sync. the problem is that the second device uses the Real-Time clock when time stamping its data. The goal is to sync up the data from the second device with the camera-server, and IMU data generated but the VOXL2. The Problem is that camera-server and imu-server use Monotonic. There is an obvious offset between real-time and monotonic but that varies from the offset +/- 150 ms. This wouldn't be a huge deal but using that data with that level of deviation cause problems with the postprocessing.

          So the current thought is if it is possible to just use the real-time instead of monotonic then there will still be an offset but should be far more consistent especially when using Pulse-per-second (PPS).

          Thank you,
          Aaron Porter

          Eric KatzfeyE 1 Reply Last reply Reply Quote 0
          • Eric KatzfeyE
            Eric Katzfey ModalAI Team @Aaron Porter
            last edited by

            @Aaron-Porter Using CLOCK_REALTIME can be bad because it can move around. That can lead to errors when the clock jumps and it makes it seem like a deadline has passed that hasn't, etc. So, it would be much better if the application using CLOCK_REALTIME switches to CLOCK_MONOTONIC instead.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Powered by NodeBB | Contributors