Skip to content

location: Rewrite parse_nmea_timestamp

Teemu Ikonen requested to merge tpikonen/geoclue:nmea-timestamp-refactor into master

I needed a function which reads the time from NMEA timestamps (instead of time + date from current parse_nmea_timestamp) for a feature I'm working on (NMEA trace replay support, see here).

This MR adds such a function and rewrites parse_nmea_timestamp in gclue-location.c to use it. It tries to preserve precision as long as feasible, so the return value of parse_nmea_timestamp is changed to higher precision and callers adapted.

It would be useful to propagate fractional seconds also to the clients, since this is supported in the API (see gclue-service-location.c, line 166), but that's something for another time.

Merge request reports