Hello,
I have written a sketch as below. I am able to find the results from Serial monitor. But I seuspect the data is not what I am expecting. The data I am receiving as like below :
$GPGGA,084047.00,,,,,0,00,99.99,,,,,,*69
This is where I am confused. Can anyone suggest is my data which is showing showing above at serialMonitor is correct? As I am not able to find the Longitude and latitude.
Sketch:
#include <Adafruit_GPS.h>
#include <String.h>
#include <SoftwareSerial.h>
SoftwareSerial myserial(3,2); //This is a serial port where TX[3 port] and RX[2 port] are connected
Adafruit_GPS GPS(&myserial); //Create the GPS object
String NMEA1; // Hold the GPS data
String NMEA2; // Hold the GPS data
char c;
void setup() {
Serial.begin(115200); //Turn on serial Monitor
GPS.begin(9600); // Turn on GPS at 9600 Baud rate Speed
GPS.sendCommand("$PGCMD,33,0*6D"); //Turns off the antenna for garbage value
GPS.sendCommand(PMTK_SET_NMEA_UPDATE_1HZ); //To keep the data sort successfullt
GPS.sendCommand(PMTK_SET_NMEA_OUTPUT_RMCGGA); // Only RMC and GGA will taken into consideration
delay(3000);
}
void loop() {
readGPS();
}
void readGPS(){
while(!GPS.newNMEAreceived()){
c=GPS.read();
}
GPS.parse(GPS.lastNMEA());
NMEA1=GPS.lastNMEA();
while(!GPS.newNMEAreceived()){
c=GPS.read();
}
GPS.parse(GPS.lastNMEA());
NMEA2=GPS.lastNMEA();
Serial.println(NMEA1);
Serial.println(NMEA2);
Serial.println("");
}
Please Suggest..
Thanks-
Pokhraj