Skip to content

Commit 5ca607f

Browse files
committed
Add support for Multi-GNSS NMEA sentences.
1 parent e51002a commit 5ca607f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

decode_aprs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,14 +920,14 @@ 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 || strncmp((char *)info, "$GNRMC,", 7) == 0)
924924
{
925925
float speed_knots = G_UNKNOWN;
926926

927927
(void) dwgpsnmea_gprmc ((char*)info, A->g_quiet, &(A->g_lat), &(A->g_lon), &speed_knots, &(A->g_course));
928928
A->g_speed_mph = DW_KNOTS_TO_MPH(speed_knots);
929929
}
930-
else if (strncmp((char*)info, "$GPGGA,", 7) == 0)
930+
else if (strncmp((char*)info, "$GPGGA,", 7) == 0 || strncmp((char *)info, "$GNGGA,", 7) == 0)
931931
{
932932
float alt_meters = G_UNKNOWN;
933933
int num_sat = 0;

dwgpsnmea.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ 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 || strncmp(gps_msg, "$GNRMC", 6) == 0) {
278278

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

@@ -318,7 +318,7 @@ static void * read_gpsnmea_thread (void *arg)
318318
}
319319

320320
}
321-
else if (strncmp(gps_msg, "$GPGGA", 6) == 0) {
321+
else if (strncmp(gps_msg, "$GPGGA", 6) == 0 || strncmp(gps_msg, "$GNGGA", 6) == 0) {
322322
int nsat;
323323

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

0 commit comments

Comments
 (0)