Skip to content

Commit 79df808

Browse files
committed
Issue 151 - Add support for Multi-GNSS NMEA sentences.
1 parent c552652 commit 79df808

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

decode_aprs.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -920,14 +920,16 @@ static void aprs_ll_pos_time (decode_aprs_t *A, unsigned char *info, int ilen)
920920

921921
static void aprs_raw_nmea (decode_aprs_t *A, unsigned char *info, int ilen)
922922
{
923-
if (strncmp((char*)info, "$GPRMC,", 7) == 0)
923+
if (strncmp((char*)info, "$GPRMC,", 7) == 0 ||
924+
strncmp((char*)info, "$GNRMC,", 7) == 0)
924925
{
925926
float speed_knots = G_UNKNOWN;
926927

927928
(void) dwgpsnmea_gprmc ((char*)info, A->g_quiet, &(A->g_lat), &(A->g_lon), &speed_knots, &(A->g_course));
928929
A->g_speed_mph = DW_KNOTS_TO_MPH(speed_knots);
929930
}
930-
else if (strncmp((char*)info, "$GPGGA,", 7) == 0)
931+
else if (strncmp((char*)info, "$GPGGA,", 7) == 0 ||
932+
strncmp((char*)info, "$GNGGA,", 7) == 0)
931933
{
932934
float alt_meters = G_UNKNOWN;
933935
int num_sat = 0;

dwgpsnmea.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ static void * read_gpsnmea_thread (void *arg)
274274

275275
/* Process sentence. */
276276

277-
if (strncmp(gps_msg, "$GPRMC", 6) == 0) {
277+
if (strncmp(gps_msg, "$GPRMC", 6) == 0 ||
278+
strncmp(gps_msg, "$GNRMC", 6) == 0) {
278279

279280
f = dwgpsnmea_gprmc (gps_msg, 0, &info.dlat, &info.dlon, &info.speed_knots, &info.track);
280281

@@ -318,7 +319,8 @@ static void * read_gpsnmea_thread (void *arg)
318319
}
319320

320321
}
321-
else if (strncmp(gps_msg, "$GPGGA", 6) == 0) {
322+
else if (strncmp(gps_msg, "$GPGGA", 6) == 0 ||
323+
strncmp(gps_msg, "$GNGGA", 6) == 0) {
322324
int nsat;
323325

324326
f = dwgpsnmea_gpgga (gps_msg, 0, &info.dlat, &info.dlon, &info.altitude, &nsat);

0 commit comments

Comments
 (0)