From 6b24895ef3d8eb2c2a84af215400924b1593170e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Izzo?= Date: Wed, 24 Feb 2021 08:04:49 +0100 Subject: [PATCH] Extended GPS support to UV-380 module --- openrtx/src/gps.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/openrtx/src/gps.c b/openrtx/src/gps.c index 6714468d..a868b938 100644 --- a/openrtx/src/gps.c +++ b/openrtx/src/gps.c @@ -24,6 +24,8 @@ #include #include +#define KNOTS2KMH 1.852f + /** * This function parses a GPS NMEA sentence and updates radio state */ @@ -47,6 +49,8 @@ void gps_taskFunc(char *line, __attribute__((unused)) int len, state_t *state) // Synchronize RTC with GPS UTC clock if(state->settings.gps_set_time) rtc_setTime(state->gps_data.timestamp); + state->gps_data.tmg_true = minmea_tofloat(&frame.course); + state->gps_data.speed = minmea_tofloat(&frame.speed) * KNOTS2KMH; } break; case MINMEA_SENTENCE_GGA: