I'm having some trouble configuring my EM-406A to output. About half of the time, the output is just junk. I have 3+ satellites in view, have tried all sorts of different baud rates, and searched all over and can't seem to figure it out. Here's some example output:
Current GPS: 2911.3540,08102.7931
Current GPS: ,,*1.3540,08102.7931
Current GPS: 2911.3528,08102.7938
Current GPS: 179,14,09,,044,15,24
Current GPS: 179,14,09,,044,15,24
Current GPS: 22,30,27,,12,,,,,,,3
Current GPS: 2911.3511,08102.7968
As you can see, the first, third and last are the only correct outputs. Here's the code I'm using on the Mega:
byteGPS = 0;i = 0;while(byteGPS != 42) { // read the GGA sentencebyteGPS = mySerial.read();inBuffer[i]=byteGPS;i++;}k = 1;m1 = 0;m2 = 0;while(inBuffer[k] != 42) {k++;if(k > 17 && k < 27) {//Serial.print(inBuffer[k]); // write the GGA sentencecurrentGPSlat[m1] = inBuffer[k];m1++;}if(k > 29 && k < 40) {//Serial.print(inBuffer[k]); // write the GGA sentencecurrentGPSlong[m2] = inBuffer[k];m2++;}
Even when I'm just outputing the NMEA string, I get either a bunch of commas, or junk in general.
Any troubleshooting advice would be appriciated!
Replies
I think I have the same issue as John. My 406a was giving me the same garbage ( binary ) fresh out of the box.
John did you ever get this working with "putting-your-em406-gps-back-in" ?
NB: the delivery of my GPS took about 3 days... So unless they set it to binary at the suppliers before shipping I dont know what to say...
thanks!
mac
The EM406 is not in binary mode. It is blinking red as soon as it locks.