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: