Skip to content

Commit 0fbeae7

Browse files
JianyuWang0623xiaoxiang781216
authored andcommitted
uORB/sensor: Add timestamp for GNSS data
Add timestamp for GNSS measurements and clock, for matching. When recovering the combination of `GnssMeasurement` and `GnssClock` into [GnssData](https://android.googlesource.com/platform/hardware/libhardware/+/ refs/heads/android14-release/include/hardware/gps.h#1748), the reason for splitting is that the uORB buffer is not large enough to accommodate `GnssData`, since different topics cannot guarantee the same timing when publishing and subscribing data, we need an index to match. WARNING: A new member "timestamp" of type uint64_t has been added at the beginning of the struct "sensor_gnss_measurement" and "sensor_gnss_clock". Signed-off-by: wangjianyu3 <[email protected]>
1 parent d63bb6d commit 0fbeae7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

system/uorb/sensor/gnss.c

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ static const char sensor_gnss_format[] =
5757
UORB_DEBUG_FORMAT_SENSOR_GNSS ",firmware_version:%" PRIu32 "";
5858

5959
static const char sensor_gnss_clock_format[] =
60+
"timestamp:%" PRIu64 ","
6061
"flags:%" PRIx32 ",leap_second:%" PRId32 ",time_ns:%" PRId64 ","
6162
"time_uncertainty_ns:%hf,hw_clock_discontinuity_count:%" PRIu32 ","
6263
"full_bias_ns:%" PRId64 ",bias_ns:%hf,bias_uncertainty_ns:%hf,"
@@ -68,6 +69,7 @@ static const char sensor_gnss_geofence_event_format[] =
6869
"timestamp:%" PRId64 ",status:%" PRId32 ",transition:%" PRId32 "";
6970

7071
static const char sensor_gnss_measurement_format[] =
72+
"timestamp:%" PRIu64 ","
7173
"flags:%" PRIx32 ",svid:%" PRId32 ",constellation:%" PRIu32 ","
7274
"time_offset_ns:%hf,received_sv_time_in_ns:%" PRId64 ","
7375
"received_sv_time_uncertainty_in_ns:%" PRId64 ",state:%" PRIu32 ","

0 commit comments

Comments
 (0)