Skip to content

[sources/parsley] Add global relative timestamp support to parsley source #395

@ChrisYx511

Description

@ChrisYx511

Sub issue of #393
Currently, the messages outputted by Parsley are in the following format:

['CAN/Parsley', 1746896237.84619, {
    'board_type_id': 'PROCESSOR',
    'board_inst_id': 'GENERIC',
    'msg_prio': 'LOW', 
    'msg_type': 'SENSOR_IMU_Z',
    'data': {
        'time': 40.523, 
        'imu_id': 'IMU_PROC_ALTIMU10', 
        'linear_accel': -0.247314453125, 
        'angular_velocity': -0.244140625
     }
}]

Notice we get a UNIX timestamp from the computer the source is running on, which is unreliable due to jitter and receiving delays and a board time in the payload that is that is prone to overflows and resets, but is relatively accurate.

The goal would be to add a third timestamp into a field called calculated_relative_time, where, on startup the source gets a timestamp from the system clock, and then flushes the timestamp obtained from each board as a relative timestamp whenever it is reset.

See point 5 in design doc for exact design, reach out to @ChrisYx511 for any questions.

Metadata

Metadata

Assignees

Labels

designDesign-related

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions