kopia lustrzana https://github.com/OpenRTX/OpenRTX
Extended GPS support to UV-380 module
rodzic
3438006ef5
commit
6b24895ef3
openrtx/src
|
@ -24,6 +24,8 @@
|
|||
#include <state.h>
|
||||
#include <strings.h>
|
||||
|
||||
#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:
|
||||
|
|
Ładowanie…
Reference in New Issue