Skip to content

Commit

Permalink
add RMC sentence evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
= committed Feb 2, 2025
1 parent 3968104 commit 352f8b8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions hcxpcapngtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -5819,7 +5819,6 @@ while((nlen = fgetline(fh_nmeain, NMEA_MAX, linein)) != -1)
}
nmeagoodcscount++;
nres = linein;
printf("Original string: %s\n", linein);
nfc = 0;
while ((nfield[nfc] = strsep(&nres, ",*")) != NULL)
{
Expand Down Expand Up @@ -5847,6 +5846,12 @@ while((nlen = fgetline(fh_nmeain, NMEA_MAX, linein)) != -1)
else if(memcmp(nrmc, nfield[0] +3, 3) == 0)
{
nmearmccount++;
if(strlen(nfield[1]) == 0) continue;
if(strlen(nfield[3]) == 0) continue;
if(strlen(nfield[4]) == 0) continue;
if(strlen(nfield[5]) == 0) continue;
if(strlen(nfield[6]) == 0) continue;
if(strlen(nfield[9]) == 0) continue;
}
else if(memcmp(ntxt, nfield[0] +3, 3) == 0)
{
Expand All @@ -5856,9 +5861,6 @@ while((nlen = fgetline(fh_nmeain, NMEA_MAX, linein)) != -1)
{
nmeavtgcount++;
}

// for(int x = 0; x < nfc; x++) printf("Token: %s\n", nfield[x]);
printf("cs: %0x %0x\n", ccs, ncs);
}
fclose(fh_nmeain);
return true;
Expand Down

0 comments on commit 352f8b8

Please sign in to comment.