Skip to content

Record timestamp adjustments #65

Description

@Gara-Dorta

I think that every time that there is a clock adjustment via a status request the old and new times should be stored in a text file in the midge.
This should improve the accuracy of the time stamps, as it would allow distributing the correction across an interval in the post processing of the data.
The draw back would be the extra computational cost of writing the file to the sdcard. To clarify what I mean let me add two examples:

Now:

| data 0    | data 1     | data 2    | data 3    | data 4   |
| time 0    | time 1     | time 5    | time 6    | time 7   |

At data 2, when get a clock adjustment and now the time distance between data 1 and data 2 is a large gap.

With this feature:

Clock adjustment file

index, prev time, new time
2,  time 2, time 5

New data after postprocessing

| data 0    | data 1     | data 2    | data 3    | data 4   |
| time 0    | time 2.5   | time 5    | time 6    | time 7   |

If we know that there was a clock adjustment it data 2 when can distribute the clock difference uniformly across all previous samples, so that there is no longer such a large gap between data 1 and data 2.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions