only_retain_earliest_entry

HSTB.kluster.fqpr_vessel.only_retain_earliest_entry(data)

Compare all timestamps in the data, if you find duplicate values associated with two timestamps, only retain the earliest timestamp of the two. Expects data in the format

{sensor_name1: {utc timestamp1: value, utc timestamp2: value, …},

sensor_name2: {utc timestamp1: value, utc timestamp2: value, …}, …}

Parameters

data (dict) – dictionary of timestamped xyzrph entries to search through

Returns

dictionary object with the duplicate entries removed, retaining the earliest entry of all duplicates

Return type

dict