How to serial.print specific information from $GPGGA, $GPRMC, $PGTOP data

Where do you find information how to select specific information from the GPS data like GPS.hour, GPS.latitude, GPS.altitude.
Any guids out there to show me this?
Like:

  • Quality of the GPS fix
  • Number of satellites being used
  • GPS antenna altitude in meters
  • geoidal separation in meters
  • age of the deferrential correction data
  • deferential station`s ID
  • Horizontal dillution of precision
  • etc

Any guids out there to show me this?

The TinyGPS (or TinyGPS++) library already knows how to parse GPS data.

Have a look at http://www.learncpp.com/, and do a search for strtok().

Using that, you can split a string into pieces, delimited by a character (in the case of a GPS, the character you want to split it on is a comma).

Then it's a simple matter of accessing the appropriate string in the resulting array.

Using that, you can split a string into pieces, delimited by a character (in the case of a GPS, the character you want to split it on is a comma).

The problem with using strtok() to parse a comma-delimited string is that strtok() expects something to be between each pair of commas. The GPS will output two (or more) commas when there is no value to go between them. strtok() has real problems with

$Gxxxxx,,,,,,,,,*

I tryed using;

    char *stringptr = GPS.lastNMEA();
    uint8_t stringsize = strlen(stringptr);
    if (stringsize != logfile.write((uint8_t *)stringptr, stringsize))    //write the string to the SD file
      error(4);
    if (strstr(stringptr, "RMC"))   logfile.flush();
    Serial.println();

and store setup to SD;

// RAW GPS code
  char filename[15];
  strcpy(filename, "RAWLOG00.TXT");
  for (uint8_t i = 0; i < 100; i++) {
    filename[6] = '0' + i/10;
    filename[7] = '0' + i%10;
    // create if does not exist, do not open existing, write, sync after write
    if (! SD.exists(filename)) {
      break;
    }
  }

  logfile = SD.open(filename, FILE_WRITE);
  if( ! logfile ) {
    Serial.print("Couldnt create "); Serial.println(filename);
    error(3);
  }
  Serial.print("Writing to "); Serial.println(filename);

I am going to use GGA and RMC for a more complete logging.
Only need to find out how to select what I need and set a text to explane it to Excel users