Logging additional sensors w/GPS shield on Mega

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

Hi,

I'm fairly new to Arduinos and programming. I'm digging through the SD_GPSLogger code trying to find where I should insert my programs for gathering and recording other sensors. Most are analog but a few will be I2C based. This is going onto a Mega2560. The GPS unit is a Lassen IQ (had to be, it is going up to 100k feet in altitude). Any help is appreciated :)

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Logging additional sensors w/GPS shield on Mega

Post by adafruit_support_bill »

Do you have code written already to log your other sensors? If not, take a look at the DataLogger examples.

You should be able to insert your your code for the other sensors into the "loop()" function of the SD_GPSLogger sketch - assuming that you want to log GPS and other data at the same sample frequency.

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

Thanks for the quick response. All I've got for code on the other sensors is serial print commands so far. I'll look into the DataLogger examples for further help.

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

So I got a pile of other sensors working and logging but I'm having issues with the GPS itself. I currently have it connected via an FTDI cable. Here is what the serial print looks like:

$GPGGA,,,,,,0,02,,,,,,*64
$GPTVIG,,,,,,,,,,N*30

This keeps repeating. Is there something I'm missing?

User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by fat16lib »

Looks like no fix. I assume the second message is $GPVTG.

Other GPS modules are used at higher altitude in balloon flights http://showcase.netins.net/web/wallio/G ... s60kft.htm

The USA Defense Department limits are
Altitude: 18,000 m
Velocity: 515 m/s
Either limit may be exceeded, but not both.

You might look at the GPS library here http://code.google.com/p/beta-lib/downloads/list.

It was developed for the Adafruit shield with SiRF modules but the NMEA parsing classes may be useful.

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

I managed to get the GPS working on a Duemillanova 328 board. It is writing this string:

$GPGGA,171542.00,3716.7381,N,10753.3361,W,1,04,3.22,00019,M,-019,M,,*59
$GPVTG,226.4,T,214.9,M,001.8,N,003.3,K,A*26

So that is good. Following another user's suggestions I wired to pins 1 and 3 of the surface mount connector and ran those to pins 0, 1 with a pull up resistor. Doing that and uploading code to the older Arduino which only sets pin 4 (power) high, I can use Trimble's software to read the TSIP code. For whatever reason it won't let me alter any settings for the NMEA protocol but I'll talk to them about that.

The bad is even with altering the SD utility to having Mega a 1 as per instructions, it still doesn't want to work on the Mega. As mentioned earlier, the Mega is working fine to log other data to SD. With the GPS code it hangs after stating it is ready. Any thoughts?

EDIT: Looking at this data sheet, pin 3 should be being pulled high but based on my measurements it is floating when I haven't pulled it high with my own wiring.

http://www.sparkfun.com/datasheets/GPS/ ... ov2004.pdf

The GPS is working fine with it floating but I'll see if it behaves better with that pin pulled high.

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

IT WORKS!!!

I got rid of the soft serial library and ran the communications pins to Serial1 on the Mega. I replaced all occurences of gpsSerial with Serial1 (find/replace all). I've got pins 1, 3 from the GPS running to Serial2. I'll look through Trimble's data sheets to see what code I need to get additional data.

User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by fat16lib »

Looks like NewSoftSerial doesn't work with the Mega.

I looked at NewSoftSerial 11 (beta) which does "work" but with this restriction:
Note: Not all pins on the Mega and Mega 2560 support change interrupts, so only the following can be used for RX: 10, 11, 12, 13, 50, 51, 52, 53, 62, 63, 64, 65, 66, 67, 68, 69
10, 11, 12, 13 are often used for softSPI on the Mega and 50,51,52, 53 are hardware SPI.
62 - 69 are also analog pins.

Guess I will avoid using SoftSerial on the Mega in my GPS library.

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »


eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

I could use some more help. I've combined my GPS code with my sensor logging code and I'm getting very weird prints. The first serial print it only has a $ sign then my string of sensors. The second line it adds a little gps data then my string. It keeps doing this until it completes the GGA line then switches to the VTG line and does the same thing. Then it switches back to the GGA data and starts all over again. The log looks like a saw-tooth pattern. I think it has something to do with the write commands but I can't ferret it out. Here's the code I'm working with:

Code: Select all

#include <SD.h>
#include <Wire.h>
#include <avr/sleep.h>
#include "GPSconfig.h"
#define compassID (0x60)
#define accelID (0x53)
#define TO_READ (6)


// power saving modes
#define SLEEPDELAY 0
#define TURNOFFGPS 0
#define LOG_RMC_FIXONLY 0

// what to log
#define LOG_RMC 1 // RMC-Recommended Minimum Specific GNSS Data, message 103,04
#define LOG_GGA 1 // GGA-Global Positioning System Fixed Data, message 103,00
#define LOG_GLL 1 // GLL-Geographic Position-Latitude/Longitude, message 103,01
#define LOG_GSA 1 // GSA-GNSS DOP and Active Satellites, message 103,02
#define LOG_GSV 1 // GSV-GNSS Satellites in View, message 103,03
#define LOG_VTG 1 // VTG-Course Over Ground and Ground Speed, message 103,05


byte buff[TO_READ];    //6 bytes buffer for saving data read from the device
char str[512];         //string buffer to transform data before sending it to the serial port

#define ECHO_TO_SERIAL 1 // echo data to serial port
#define WAIT_TO_START 1 // Wait for serial input in setup()

// A simple data logger for the Arduino analog pins

// how many milliseconds between grabbing data and logging it. 1000 ms is once a second
#define LOG_INTERVAL 10 // mills between entries (reduce to take more/faster data)

// how many milliseconds before writing the logged data permanently to disk
// set it to the LOG_INTERVAL to write each time (safest)
// set it to 10*LOG_INTERVAL to write all data every 10 datareads, you could lose up to
// the last 10 reads if power is lost but it uses less power and is much faster!
#define SYNC_INTERVAL 3000 // mills between calls to flush() - to write data to the card
uint32_t syncTime = 0; // time of last sync()

// Set the GPSRATE to the baud rate of the GPS module. Most are 4800
// but some are 38400 or other. Check the datasheet!
#define GPSRATE 4800

// Set the pins used 
#define powerPin 4
#define greenLEDpin 5
#define redLEDpin 6
#define chipSelect 10

int tempPin0 = 0;        //the analog pin the TMP36's Vout (sense) pin is connected to
int tempPin1 = 1;        //the resolution is 10 mV / degree centigrade with a
int tempPin2 = 2;        //500 mV offset to allow for negative temperatures
int tempPin3 = 3;
int tempPin4 = 4;
int tempReading0;        // the analog reading from the sensor
int tempReading1;
int tempReading2;
int tempReading3;
int tempReading4;


#define aref_voltage 3.3 // we tie 3.3V to ARef and measure it with a multimeter!

#define BUFFSIZE 90
char buffer[BUFFSIZE];
uint8_t bufferidx = 0;
uint8_t fix = 0; // current fix data
uint8_t i;
File logfile;

// read a Hex value and return the decimal equivalent
uint8_t parseHex(char c) {
  if (c < '0')
    return 0;
  if (c <= '9')
    return c - '0';
  if (c < 'A')
    return 0;
  if (c <= 'F')
    return (c - 'A')+10;
}

// blink out an error code
void error(uint8_t errno) {
/*
  if (SD.errorCode()) {
    putstring("SD error: ");
    Serial.print(card.errorCode(), HEX);
    Serial.print(',');
    Serial.println(card.errorData(), HEX);
  }
  */
  while(1) {
    for (i=0; i<errno; i++) {
      digitalWrite(greenLEDpin, HIGH);
      digitalWrite(redLEDpin, HIGH);
      delay(100);
      digitalWrite(greenLEDpin, LOW);
      digitalWrite(redLEDpin, LOW);
      delay(100);
    }
    for (; i<10; i++) {
      delay(200);
    }
  }
}

void setup() {
  WDTCSR |= (1 << WDCE) | (1 << WDE);
  WDTCSR = 0;
  Serial.begin(9600);
  Serial.println("\r\nDatalogger");
  pinMode(greenLEDpin, OUTPUT);
  pinMode(redLEDpin, OUTPUT);
  pinMode(powerPin, OUTPUT);
  digitalWrite(powerPin, LOW);

  Wire.begin(); // connects to I2C for compass

#if WAIT_TO_START
  Serial.println("Type any character to start");
  while (!Serial.available());
#endif //WAIT_TO_START

  // make sure that the default chip select pin is set to
  // output, even if you don't use it:
  pinMode(10, OUTPUT);
  
  // see if the card is present and can be initialized:
  if (!SD.begin(chipSelect)) {
    Serial.println("Card init. failed!");
    error(1);
  }

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

  logfile = SD.open(buffer, FILE_WRITE);
  if( ! logfile ) {
    Serial.print("Couldnt create "); Serial.println(buffer);
    error(3);
  }
  Serial.print("Writing to "); Serial.println(buffer);
  
  // connect to the GPS at the desired rate
  Serial1.begin(GPSRATE);
  
  Serial.println("Ready!");
  
  Serial1.print(SERIAL_SET);
  delay(250);

  analogReference(EXTERNAL);

  writeTo(accelID, 0x2D, 0);      // get accelerometer running
  writeTo(accelID, 0x2D, 16);
  writeTo(accelID, 0x2D, 8);  

#if (LOG_DDM == 1)
     Serial1.print(DDM_ON);
#else
     Serial1.print(DDM_OFF);
#endif
  delay(250);
#if (LOG_GGA == 1)
    Serial1.print(GGA_ON);
#else
    Serial1.print(GGA_OFF);
#endif
  delay(250);
#if (LOG_GLL == 1)
    Serial1.print(GLL_ON);
#else
    Serial1.print(GLL_OFF);
#endif
  delay(250);
#if (LOG_GSA == 1)
    Serial1.print(GSA_ON);
#else
    Serial1.print(GSA_OFF);
#endif
  delay(250);
#if (LOG_GSV == 1)
    Serial1.print(GSV_ON);
#else
    Serial1.print(GSV_OFF);
#endif
  delay(250);
#if (LOG_RMC == 1)
    Serial1.print(RMC_ON);
#else
    Serial1.print(RMC_OFF);
#endif
  delay(250);

#if (LOG_VTG == 1)
    Serial1.print(VTG_ON);
#else
    Serial1.print(VTG_OFF);
#endif
  delay(250);

#if (USE_WAAS == 1)
    Serial1.print(WAAS_ON);
#else
    Serial1.print(WAAS_OFF);
#endif
}

void loop() {
  //Serial.println(Serial.available(), DEC);
  char c;
  uint8_t sum;

  // delay for the amount of time we want between readings
  delay((LOG_INTERVAL -1) - (millis() % LOG_INTERVAL));
  
  digitalWrite(greenLEDpin, HIGH);

  // read one 'line'
  if (Serial1.available()) {
    c = Serial1.read();
    //Serial.print(c, BYTE);
    if (bufferidx == 0) {
      while (c != '$')
        c = Serial1.read(); // wait till we get a $
    }
    buffer[bufferidx] = c;

    //Serial.print(c, BYTE);
    if (c == '\n') {
      //putstring_nl("EOL");
      //Serial.print(buffer);
      buffer[bufferidx+1] = 0; // terminate it

      if (buffer[bufferidx-4] != '*') {
        // no checksum?
        Serial.print('*', BYTE);
        bufferidx = 0;
        return;
      }
      // get checksum
      sum = parseHex(buffer[bufferidx-3]) * 16;
      sum += parseHex(buffer[bufferidx-2]);

      // check checksum
      for (i=1; i < (bufferidx-4); i++) {
        sum ^= buffer[i];
      }
      if (sum != 0) {
        //putstring_nl("Cxsum mismatch");
        Serial.print('~', BYTE);
        bufferidx = 0;
        return;
      }
      // got good data!

      if (strstr(buffer, "GPRMC")) {
        // find out if we got a fix
        char *p = buffer;
        p = strchr(p, ',')+1;
        p = strchr(p, ',')+1;       // skip to 3rd item

        if (p[0] == 'V') {
          digitalWrite(greenLEDpin, LOW);
          fix = 0;
        } else {
          digitalWrite(greenLEDpin, HIGH);
          fix = 1;
        }
      }
      if (LOG_RMC_FIXONLY) {
        if (!fix) {
          Serial.print('_', BYTE);
          bufferidx = 0;
          return;
        }
      }
      // rad. lets log it!
      Serial.print(buffer);
      Serial.print('#', BYTE);
      digitalWrite(redLEDpin, HIGH);      // sets the digital pin as output

      // Bill Greiman - need to write bufferidx + 1 bytes to getCR/LF
      bufferidx++;


      digitalWrite(redLEDpin, LOW);

      bufferidx = 0;

      // turn off GPS module?
      if (TURNOFFGPS) {
        digitalWrite(powerPin, HIGH);
      }

      sleep_sec(SLEEPDELAY);
      digitalWrite(powerPin, LOW);
      return;
    }
    bufferidx++;
    if (bufferidx == BUFFSIZE-1) {
       Serial.print('!', BYTE);
       bufferidx = 0;
    }
  } else {

  }


//-----------SENSORS-------SENSORS---------SENSORS----------



//-----------Compass CMPS10--------------------------

  Wire.beginTransmission(compassID);
  Wire.send(2);
  Wire.endTransmission();
  delay(10);
  Wire.requestFrom(compassID, 2);
  delay(10);
  int avail = Wire.available();
  unsigned int heading = ((unsigned int)Wire.receive()) << 8;
  heading = heading + ((unsigned int)Wire.receive());





//------------- Temp Sensors 0-4 ---------------------



//  analogRead(tempPin0);
//  delay(5);
  int tempReading0 = analogRead(tempPin0);
  
  // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0
//  float voltage0 = tempReading0 * aref_voltage / 1024;
//  float temperatureC0 = (voltage0 - 0.5) * 100 ;
//  float temperatureF0 = (temperatureC0 * 9 / 5) + 32;



//  analogRead(tempPin1);
//  delay(5);
  int tempReading1 = analogRead(tempPin1);
  
  // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0
//  float voltage1 = tempReading1 * aref_voltage / 1024;
//  float temperatureC1 = (voltage1 - 0.5) * 100 ;
//  float temperatureF1 = (temperatureC1 * 9 / 5) + 32;



//  analogRead(tempPin2);
//  delay(5);
  int tempReading2 = analogRead(tempPin2);
  
  // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0
//  float voltage2 = tempReading2 * aref_voltage / 1024;
//  float temperatureC2 = (voltage2 - 0.5) * 100 ;
//  float temperatureF2 = (temperatureC2 * 9 / 5) + 32;
  

//  analogRead(tempPin3);
//  delay(5);
  int tempReading3 = analogRead(tempPin3);
  
  // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0
//  float voltage3 = tempReading3 * aref_voltage / 1024;
//  float temperatureC3 = (voltage3 - 0.5) * 100 ;
//  float temperatureF3 = (temperatureC3 * 9 / 5) + 32;
  


//  analogRead(tempPin4);
//  delay(5);
  int tempReading4 = analogRead(tempPin4);
  
  // converting that reading to voltage, for 3.3v arduino use 3.3, for 5.0, use 5.0
//  float voltage4 = tempReading4 * aref_voltage / 1024;
//  float temperatureC4 = (voltage4 - 0.5) * 100 ;
//  float temperatureF4 = (temperatureC4 * 9 / 5) + 32;




//--------------ACCELEROMETER--------------
  int regAddress = 0x32;    //first axis-acceleration-data register on the ADXL345
  int x, y, z;
  
  readFrom(accelID, regAddress, TO_READ, buff); //read the acceleration data from the ADXL345
  
   //each axis reading comes in 10 bit resolution, ie 2 bytes.  Least Significat Byte first!!
   //thus we are converting both bytes in to one int
  x = (((int)buff[1]) << 8) | buff[0];   
  y = (((int)buff[3])<< 8) | buff[2];
  z = (((int)buff[5]) << 8) | buff[4];
  
  //we send the x y z values as a string to the serial port
  sprintf(str, "%d, %d, %d", x, y, z);  


//---------------PRINT---------------
  logfile.write((uint8_t *) buffer, bufferidx);
  logfile.print(heading);
  logfile.print(", ");  
  logfile.print(tempReading0);
  logfile.print(", ");  
  logfile.print(tempReading1);
  logfile.print(", ");  
  logfile.print(tempReading2);
  logfile.print(", ");  
  logfile.print(tempReading3);
  logfile.print(", ");  
  logfile.print(tempReading4);
  logfile.print(", ");
  logfile.print(str);
  logfile.println();
  
#if ECHO_TO_SERIAL
  Serial.write((uint8_t *) buffer, bufferidx);
  Serial.print(heading);
  Serial.print(", ");
  Serial.print(tempReading0);
  Serial.print(", ");
  Serial.print(tempReading1);
  Serial.print(", ");
  Serial.print(tempReading2);
  Serial.print(", ");
  Serial.print(tempReading3);
  Serial.print(", ");
  Serial.print(tempReading4);
  Serial.print(", ");
  Serial.print(str);
  Serial.println();
#endif


//---------DUMP FILES TO DISK----------

  digitalWrite(greenLEDpin, LOW);

  // Now we write data to disk! Don't sync too often - requires 2048 bytes of I/O to SD card
  // which uses a bunch of power and takes time
  if ((millis() - syncTime) < SYNC_INTERVAL) return;
  syncTime = millis();
  
  // blink LED to show we are syncing data to the card & updating FAT!
  digitalWrite(redLEDpin, HIGH);
  logfile.flush();
  delay(10);
  digitalWrite(redLEDpin, LOW);


}

void sleep_sec(uint8_t x) {
  while (x--) {
     // set the WDT to wake us up!
    WDTCSR |= (1 << WDCE) | (1 << WDE); // enable watchdog & enable changing it
    WDTCSR = (1<< WDE) | (1 <<WDP2) | (1 << WDP1);
    WDTCSR |= (1<< WDIE);
    set_sleep_mode(SLEEP_MODE_PWR_DOWN);
    sleep_enable();
    sleep_mode();
    sleep_disable();
  }
}

SIGNAL(WDT_vect) {
  WDTCSR |= (1 << WDCE) | (1 << WDE);
  WDTCSR = 0;
}

//---------------- Functions----------------------------
//Writes val to address register on device
void writeTo(int device, byte address, byte val) {
   Wire.beginTransmission(device); //start transmission to device 
   Wire.send(address);        // send register address
   Wire.send(val);        // send value to write
   Wire.endTransmission(); //end transmission
}

//reads num bytes starting from address register on device in to buff array
void readFrom(int device, byte address, int num, byte buff[]) {
  Wire.beginTransmission(device); //start transmission to device 
  Wire.send(address);        //sends address to read from
  Wire.endTransmission(); //end transmission
  
  Wire.beginTransmission(device); //start transmission to device
  Wire.requestFrom(device, num);    // request 6 bytes from device
  
  int i = 0;
  while(Wire.available())    //device may send less than requested (abnormal)
  { 
    buff[i] = Wire.receive(); // receive a byte
    i++;
  }
  Wire.endTransmission(); //end transmission
}

/* End code */

User avatar
adafruit_support_bill
 
Posts: 88142
Joined: Sat Feb 07, 2009 10:11 am

Re: Logging additional sensors w/GPS shield on Mega

Post by adafruit_support_bill »

Post a sample of the output too.

User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by fat16lib »

The problem is here:

Code: Select all

  // read one 'line'
  if (Serial1.available()) {
The comment is not correct. loop() reads one character at a time from the GPS, except for the '$'.

loop() reads a character, if one is available, and then falls into your sensor code.

You need to make the sensor code a function and call it at the end of one of the NMEA messages.

It would probably be better to rewrite the GPS stuff.

The GPS stuff is now old, ladyada did it when the Arduino was based on a 16 KB 168.

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

Here is what it is putting out:

Code: Select all

$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$G1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GP1839, 1023, 1023, 1023, 1023, 1023, 6, -38, 243
$GPG1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 243
$GPGG1840, 1023, 1023, 1023, 1023, 1023, 8, -38, 245
$GPGGA1840, 1023, 1023, 1023, 1023, 1023, 7, -36, 246
$GPGGA,1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,21841, 1023, 1023, 1023, 1023, 1023, 8, -38, 249
$GPGGA,231839, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,2331840, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$GPGGA,23351840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233521840, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPGGA,2335281840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233528.1840, 1023, 1023, 1023, 1023, 1023, 9, -36, 245
$GPGGA,233528.01840, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPGGA,233528.001841, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
$GPGGA,233528.00,1839, 1023, 1023, 1023, 1023, 1023, 8, -37, 244
$GPGGA,233528.00,31840, 1023, 1023, 1023, 1023, 1023, 8, -38, 246
$GPGGA,233528.00,371840, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPGGA,233528.00,3711840, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPGGA,233528.00,37151841, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$GPGGA,233528.00,3715.1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPGGA,233528.00,3715.81841, 1023, 1023, 1023, 1023, 1023, 8, -38, 243
$GPGGA,233528.00,3715.811840, 1023, 1023, 1023, 1023, 1023, 7, -37, 247
$GPGGA,233528.00,3715.8101840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233528.00,3715.81011840, 1023, 1023, 1023, 1023, 1023, 8, -38, 244
$GPGGA,233528.00,3715.8101,1840, 1023, 1023, 1023, 1023, 1023, 7, -38, 243
$GPGGA,233528.00,3715.8101,N1840, 1023, 1023, 1023, 1023, 1023, 8, -38, 244
$GPGGA,233528.00,3715.8101,N,1840, 1023, 1023, 1023, 1023, 1023, 7, -39, 243
$GPGGA,233528.00,3715.8101,N,11841, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
$GPGGA,233528.00,3715.8101,N,101839, 1023, 1023, 1023, 1023, 1023, 6, -36, 244
$GPGGA,233528.00,3715.8101,N,1071840, 1023, 1023, 1023, 1023, 1023, 8, -36, 245
$GPGGA,233528.00,3715.8101,N,10751841, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPGGA,233528.00,3715.8101,N,107591842, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPGGA,233528.00,3715.8101,N,10759.1840, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.71841, 1023, 1023, 1023, 1023, 1023, 6, -38, 246
$GPGGA,233528.00,3715.8101,N,10759.791840, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPGGA,233528.00,3715.8101,N,10759.7971841, 1023, 1023, 1023, 1023, 1023, 9, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.79771840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,1840, 1023, 1023, 1023, 1023, 1023, 8, -36, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W1841, 1023, 1023, 1023, 1023, 1023, 6, -38, 243
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,11840, 1023, 1023, 1023, 1023, 1023, 8, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,1840, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,01841, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,061840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1842, 1023, 1023, 1023, 1023, 1023, 6, -35, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,11840, 1023, 1023, 1023, 1023, 1023, 6, -37, 246
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.61841, 1023, 1023, 1023, 1023, 1023, 8, -37, 247
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.691840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,01842, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,021841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,0231840, 1023, 1023, 1023, 1023, 1023, 8, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02311839, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,023161839, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,1839, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 243
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 246
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-01841, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-011841, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-0191840, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 246
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M,1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 243
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M,,1840, 1023, 1023, 1023, 1023, 1023, 8, -36, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M,,*1840, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M,,*51840, 1023, 1023, 1023, 1023, 1023, 7, -36, 246
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M,,*541840, 1023, 1023, 1023, 1023, 1023, 7, -36, 243
$GPGGA,233528.00,3715.8101,N,10759.7977,W,1,06,1.69,02316,M,-019,M,,*54
1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 244
$1840, 1023, 1023, 1023, 1023, 1023, 7, -38, 246
$G1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 244
$GP1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPV1840, 1023, 1023, 1023, 1023, 1023, 6, -38, 245
$GPVT1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG1841, 1023, 1023, 1023, 1023, 1023, 8, -36, 244
$GPVTG,1840, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPVTG,01840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,001841, 1023, 1023, 1023, 1023, 1023, 6, -36, 242
$GPVTG,0001841, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPVTG,000.1842, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPVTG,000.01841, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPVTG,000.0,1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 246
$GPVTG,000.0,T1840, 1023, 1023, 1023, 1023, 1023, 7, -36, 246
$GPVTG,000.0,T,1841, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
$GPVTG,000.0,T,31841, 1023, 1023, 1023, 1023, 1023, 6, -36, 246
$GPVTG,000.0,T,341841, 1023, 1023, 1023, 1023, 1023, 8, -38, 244
$GPVTG,000.0,T,3481841, 1023, 1023, 1023, 1023, 1023, 8, -38, 245
$GPVTG,000.0,T,348.1841, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPVTG,000.0,T,348.41841, 1023, 1023, 1023, 1023, 1023, 6, -37, 244
$GPVTG,000.0,T,348.4,1840, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPVTG,000.0,T,348.4,M1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 246
$GPVTG,000.0,T,348.4,M,1841, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPVTG,000.0,T,348.4,M,01841, 1023, 1023, 1023, 1023, 1023, 5, -36, 244
$GPVTG,000.0,T,348.4,M,001836, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPVTG,000.0,T,348.4,M,0001840, 1023, 1023, 1023, 1023, 1023, 7, -38, 244
$GPVTG,000.0,T,348.4,M,000.1841, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPVTG,000.0,T,348.4,M,000.01840, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPVTG,000.0,T,348.4,M,000.0,1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPVTG,000.0,T,348.4,M,000.0,N1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 247
$GPVTG,000.0,T,348.4,M,000.0,N,01841, 1023, 1023, 1023, 1023, 1023, 6, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,001841, 1023, 1023, 1023, 1023, 1023, 6, -37, 246
$GPVTG,000.0,T,348.4,M,000.0,N,0001841, 1023, 1023, 1023, 1023, 1023, 6, -36, 247
$GPVTG,000.0,T,348.4,M,000.0,N,000$1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$G1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GP1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPG1840, 1023, 1023, 1023, 1023, 1023, 6, -37, 246
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGG1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA1841, 1023, 1023, 1023, 1023, 1023, 8, -39, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,1840, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,21840, 1023, 1023, 1023, 1023, 1023, 6, -38, 246
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,231840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,2331840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,23351841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233531840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,2335301841, 1023, 1023, 1023, 1023, 1023, 7, -38, 243
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.01840, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.001841, 1023, 1023, 1023, 1023, 1023, 6, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,31840, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,371841, 1023, 1023, 1023, 1023, 1023, 6, -36, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3711841, 1023, 1023, 1023, 1023, 1023, 7, -39, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,37151841, 1023, 1023, 1023, 1023, 1023, 8, -38, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$1839, 1023, 1023, 1023, 1023, 1023, 6, -38, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1843, 1023, 1023, 1023, 1023, 1023, 10, -40, 240
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$11841, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$1842, 1023, 1023, 1023, 1023, 1023, 8, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 247
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$1840, 1023, 1023, 1023, 1023, 1023, 7, -38, 243
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 246
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$1840, 1023, 1023, 1023, 1023, 1023, 7, -38, 246
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,1841, 1023, 1023, 1023, 1023, 1023, 6, -36, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,31840, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$1840, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$1842, 1023, 1023, 1023, 1023, 1023, 7, -36, 243
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$1839, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$1840, 1023, 1023, 1023, 1023, 1023, 9, -39, 251
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 247
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M71842, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$1840, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 243
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$11841, 1023, 1023, 1023, 1023, 1023, 8, -36, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$1842, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$1841, 1023, 1023, 1023, 1023, 1023, 8, -38, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$01841, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$0*1840, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$0*$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$0*$$1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 246
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$0*$$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$GPVTG,000.0,T,348.4,M,000.0,N,000$GPGGA,233530.00,3715$$1$$$$$,3$$$$M7$$$$$1$$$$$0*$$$$1842, 1023, 1023, 1023, 1023, 1023, 7, -36, 244
1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 246
$1842, 1023, 1023, 1023, 1023, 1023, 8, -36, 244
$01842, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$001842, 1023, 1023, 1023, 1023, 1023, 8, -37, 243
$00$1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$00$$1841, 1023, 1023, 1023, 1023, 1023, 7, -36, 245
$00$$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$00$$$$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 246
$00$$$$$1842, 1023, 1023, 1023, 1023, 1023, 7, -38, 244
$00$$$$$*1840, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$00$$$$$*,1841, 1023, 1023, 1023, 1023, 1023, 8, -38, 245
$00$$$$$*,$1841, 1023, 1023, 1023, 1023, 1023, 7, -37, 244
$00$$$$$*,$$1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 244
$00$$$$$*,$$$1842, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$00$$$$$*,$$$$1841, 1023, 1023, 1023, 1023, 1023, 8, -38, 244
$00$$$$$*,$$$$$1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 246
$00$$$$$*,$$$$$$1840, 1023, 1023, 1023, 1023, 1023, 8, -38, 243
$00$$$$$*,$$$$$$01841, 1023, 1023, 1023, 1023, 1023, 8, -37, 246
$00$$$$$*,$$$$$$0,1841, 1023, 1023, 1023, 1023, 1023, 8, -37, 245
$00$$$$$*,$$$$$$0,A1840, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$00$$$$$*,$$$$$$0,A$1841, 1023, 1023, 1023, 1023, 1023, 7, -38, 243
$00$$$$$*,$$$$$$0,A$$1840, 1023, 1023, 1023, 1023, 1023, 6, -37, 242
$00$$$$$*,$$$$$$0,A$$$1842, 1023, 1023, 1023, 1023, 1023, 6, -36, 246
$00$$$$$*,$$$$$$0,A$$$$1842, 1023, 1023, 1023, 1023, 1023, 7, -37, 243
$00$$$$$*,$$$$$$0,A$$$$$1842, 1023, 1023, 1023, 1023, 1023, 7, -37, 246
$00$$$$$*,$$$$$$0,A$$$$$$1840, 1023, 1023, 1023, 1023, 1023, 6, -36, 244
$00$$$$$*,$$$$$$0,A$$$$$$,1842, 1023, 1023, 1023, 1023, 1023, 8, -38, 242
$00$$$$$*,$$$$$$0,A$$$$$$,11840, 1023, 1023, 1023, 1023, 1023, 7, -37, 245
$00$$$$$*,$$$$$$0,A$$$$$$,131841, 1023, 1023, 1023, 1023, 1023, 7, -38, 245
$00$$$$$*,$$$$$$0,A$$$$$$,13$1841, 1023, 1023, 1023, 1023, 1023, 6, -37, 244
$00$$$$$*,$$$$$$0,A$$$$$$,13$$1841, 1023, 1023, 1023, 1023, 1023, 8, -39, 244
$00$$$$$*,$$$$$$0,A$$$$$$,13$$$1842, 1023, 1023, 1023, 1023, 1023, 6, -36, 247
$00$$$$$*,$$$$$$0,A$$$$$$,13$$$$1841, 1023, 1023, 1023, 1023, 102
What you're saying about reading one piece at a time makes sense. I'm really not sure how to rewrite the GPS code though. How would I make it call everything at once? That would really be the best solution for me but I don't even know where to begin.

User avatar
fat16lib
 
Posts: 595
Joined: Wed Dec 24, 2008 1:54 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by fat16lib »

Your post is just what I expected. A character is added and then everything is printed.

Reading a NMEA message is not too hard. Here is how I do it in my GPS library.

This will be work for any GPS in NMEA mode.

The function read() is the GPS serial read function, Serial1.read() in your case.

Code: Select all

//------------------------------------------------------------------------------
/**
 * Read a NMEA message
 *
 * \param[in] buf buffer for message
 * \param[in] size length of buffer in bytes.
 *
 * \return true for success or false if the message is too long.
 */
bool SiRfGps::readMsg(char* buf, uint16_t size) {
  int c;
  uint16_t n = 0;

  if (size == 0) return false;
  
  while (read() != '$');
  buf[n++] = '$';

  while (1) {
    while ((c = read()) < 0);
    if (n >= (size - 1)) {
      buf[size-1] = '\0';
      return false;
    }
    if (c == '\n') {
      buf[n] = '\0';
      return true;
    }
    if (c != '\r') buf[n++] = c;
  }
}
I then check sum the message like this:

Code: Select all

//------------------------------------------------------------------------------
static uint8_t hexToNibble(char c) {
  if (isdigit(c)) return c - '0';
  return isupper(c) ? c + 10 - 'A' : c + 10 -'a';
}
//------------------------------------------------------------------------------
/** Verify NMEA sentence checksum
 * \param[in] str The sentence to be checked.
 * \return true if checksum is vaild else false.
 */
bool verifyNmeaChecksum(const char *str) {
  uint8_t sum = '$';
  while (*str && *str != '*') sum ^= *str++;
  if (*str++ != '*') return false;
  if ((sum >> 4) != hexToNibble(*str++)) return false;
  return (sum & 0XF) == hexToNibble(*str);
}

eclipsh
 
Posts: 16
Joined: Tue Jul 05, 2011 7:48 pm

Re: Logging additional sensors w/GPS shield on Mega

Post by eclipsh »

You rock. Thanks so much for the help.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”