Skip to content

Commit

Permalink
Add gps_time numpy element if measurements are timestamped in GPS time.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Dec 3, 2024
1 parent 29ac75c commit aebb1a4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions python/fusion_engine_client/messages/measurement_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@ def to_numpy(cls, messages):
'p1_time': p1_time,
}

idx = time_source == SystemTimeSource.GPS_TIME
if np.any(idx):
gps_time = np.full_like(time_source, np.nan)
gps_time[idx] = measurement_time[idx]
result['gps_time'] = gps_time

idx = time_source == SystemTimeSource.TIMESTAMPED_ON_RECEPTION
if np.any(idx):
system_time = np.full_like(time_source, np.nan)
Expand Down

0 comments on commit aebb1a4

Please sign in to comment.