From 8f5ec2679c8ca2088680d16e2ff034d5b3159c90 Mon Sep 17 00:00:00 2001 From: Alessio Morale Date: Thu, 18 Aug 2016 19:27:06 +0200 Subject: [PATCH] LP-385 - add supports for fractional part of second in gps time --- flight/modules/GPS/UBX.c | 2 +- shared/uavobjectdefinition/gpstime.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/flight/modules/GPS/UBX.c b/flight/modules/GPS/UBX.c index 19ad46127..e25f3d5dc 100644 --- a/flight/modules/GPS/UBX.c +++ b/flight/modules/GPS/UBX.c @@ -439,7 +439,7 @@ static void parse_ubx_nav_timeutc(struct UBXPacket *ubx, __attribute__((unused)) GpsTime.Hour = timeutc->hour; GpsTime.Minute = timeutc->min; GpsTime.Second = timeutc->sec; - + GpsTime.MilliSecond = (int16_t)timeutc->nano / 1000000; GPSTimeSet(&GpsTime); } else { // Time is not valid, nothing to do diff --git a/shared/uavobjectdefinition/gpstime.xml b/shared/uavobjectdefinition/gpstime.xml index 1408ba2d8..665d9c45e 100644 --- a/shared/uavobjectdefinition/gpstime.xml +++ b/shared/uavobjectdefinition/gpstime.xml @@ -7,6 +7,7 @@ +