I have a GP-635T connected to a Arduino UNO. I am running the full example for the TinyGPSPlus library. After a short interval, i start getting valid data. I have the unit hanging out the window, so it is exposed to the sky. But no satellites and no altitude readings. Can someone point me in the right direction, here is what i get:
Your GPS unit is probably configured so that it does not output the sentences that give the number of satellites, etc. TinyGPS cannot report data that it does not have. You should echo all the sentences that come from the GPS to the serial monitor, so that you can understand what is happening.
Another concern is the "checksum failure" column in the output, which suggests a problem of some sort.
I don't seem to be getting all the messages. First, here is the Arduino code i am using:
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
/*
This sample code demonstrates just about every built-in operation of TinyGPS++ (TinyGPSPlus).
It requires the use of SoftwareSerial, and assumes that you have a
4800-baud serial GPS device hooked up on pins 4(rx) and 3(tx).
*/
static const int RXPin = 0, TXPin = 1;
static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial ss(RXPin, TXPin);
// For stats that happen every 5 seconds
unsigned long last = 0UL;
void setup()
{
Serial.begin(115200);
ss.begin(GPSBaud);
Serial.println(F("KitchenSink.ino"));
Serial.println(F("Demonstrating nearly every feature of TinyGPS++"));
Serial.print(F("Testing TinyGPS++ library v. ")); Serial.println(TinyGPSPlus::libraryVersion());
Serial.println(F("by Mikal Hart"));
Serial.println();
}
void loop()
{
// Dispatch incoming characters
while (ss.available() > 0)
{
char c;
c = ss.read();
Serial.write(c);
gps.encode(c);
}
if (gps.location.isUpdated())
{
Serial.print(F("LOCATION Fix Age="));
Serial.print(gps.location.age());
Serial.print(F("ms Raw Lat="));
Serial.print(gps.location.rawLat().negative ? "-" : "+");
Serial.print(gps.location.rawLat().deg);
Serial.print("[+");
Serial.print(gps.location.rawLat().billionths);
Serial.print(F(" billionths], Raw Long="));
Serial.print(gps.location.rawLng().negative ? "-" : "+");
Serial.print(gps.location.rawLng().deg);
Serial.print("[+");
Serial.print(gps.location.rawLng().billionths);
Serial.print(F(" billionths], Lat="));
Serial.print(gps.location.lat(), 6);
Serial.print(F(" Long="));
Serial.println(gps.location.lng(), 6);
// added just to see satallite data
Serial.print(F("SATELLITES Fix Age="));
Serial.print(gps.satellites.age());
Serial.print(F("ms Value="));
Serial.println(gps.satellites.value());
}
else if (gps.date.isUpdated())
{
Serial.print(F("DATE Fix Age="));
Serial.print(gps.date.age());
Serial.print(F("ms Raw="));
Serial.print(gps.date.value());
Serial.print(F(" Year="));
Serial.print(gps.date.year());
Serial.print(F(" Month="));
Serial.print(gps.date.month());
Serial.print(F(" Day="));
Serial.println(gps.date.day());
}
else if (gps.time.isUpdated())
{
Serial.print(F("TIME Fix Age="));
Serial.print(gps.time.age());
Serial.print(F("ms Raw="));
Serial.print(gps.time.value());
Serial.print(F(" Hour="));
Serial.print(gps.time.hour());
Serial.print(F(" Minute="));
Serial.print(gps.time.minute());
Serial.print(F(" Second="));
Serial.print(gps.time.second());
Serial.print(F(" Hundredths="));
Serial.println(gps.time.centisecond());
}
else if (gps.speed.isUpdated())
{
Serial.print(F("SPEED Fix Age="));
Serial.print(gps.speed.age());
Serial.print(F("ms Raw="));
Serial.print(gps.speed.value());
Serial.print(F(" Knots="));
Serial.print(gps.speed.knots());
Serial.print(F(" MPH="));
Serial.print(gps.speed.mph());
Serial.print(F(" m/s="));
Serial.print(gps.speed.mps());
Serial.print(F(" km/h="));
Serial.println(gps.speed.kmph());
}
else if (gps.course.isUpdated())
{
Serial.print(F("COURSE Fix Age="));
Serial.print(gps.course.age());
Serial.print(F("ms Raw="));
Serial.print(gps.course.value());
Serial.print(F(" Deg="));
Serial.println(gps.course.deg());
}
else if (gps.altitude.isUpdated())
{
Serial.print(F("ALTITUDE Fix Age="));
Serial.print(gps.altitude.age());
Serial.print(F("ms Raw="));
Serial.print(gps.altitude.value());
Serial.print(F(" Meters="));
Serial.print(gps.altitude.meters());
Serial.print(F(" Miles="));
Serial.print(gps.altitude.miles());
Serial.print(F(" KM="));
Serial.print(gps.altitude.kilometers());
Serial.print(F(" Feet="));
Serial.println(gps.altitude.feet());
}
else if (gps.satellites.isUpdated())
{
Serial.print(F("SATELLITES Fix Age="));
Serial.print(gps.satellites.age());
Serial.print(F("ms Value="));
Serial.println(gps.satellites.value());
}
else if (gps.hdop.isUpdated())
{
Serial.print(F("HDOP Fix Age="));
Serial.print(gps.hdop.age());
Serial.print(F("ms Value="));
Serial.println(gps.hdop.value());
}
else if (millis() - last > 5000)
{
Serial.println();
if (gps.location.isValid())
{
static const double LONDON_LAT = 51.508131, LONDON_LON = -0.128002;
double distanceToLondon =
TinyGPSPlus::distanceBetween(
gps.location.lat(),
gps.location.lng(),
LONDON_LAT,
LONDON_LON);
double courseToLondon =
TinyGPSPlus::courseTo(
gps.location.lat(),
gps.location.lng(),
LONDON_LAT,
LONDON_LON);
Serial.print(F("LONDON Distance="));
Serial.print(distanceToLondon/1000, 6);
Serial.print(F(" km Course-to="));
Serial.print(courseToLondon, 6);
Serial.print(F(" degrees ["));
Serial.print(TinyGPSPlus::cardinal(courseToLondon));
Serial.println(F("]"));
}
Serial.print(F("DIAGS Chars="));
Serial.print(gps.charsProcessed());
Serial.print(F(" Sentences-with-Fix="));
Serial.print(gps.sentencesWithFix());
Serial.print(F(" Failed-checksum="));
Serial.print(gps.failedChecksum());
Serial.print(F(" Passed-checksum="));
Serial.println(gps.passedChecksum());
if (gps.charsProcessed() < 10)
Serial.println(F("WARNING: No GPS data. Check wiring."));
last = millis();
Serial.println();
}
}
After about 20 minutes outdoors, here is all i get in the way of messages;
$GPRMC,163110.00,A,2856.08049,N,08200.10719,W,0.171,,110314,,,A6F
$GPVTG,,T,,M01.K2$A3.,60N,5G,,2,25,5,91,28,,,8,4
S,2097,2,3,34
S,,14,053,,312FP,60,801,10A
LOCATION Fix Age=134ms Raw Lat=+28[+934674833 billionths], Raw Long=-82[+1786500 billionths], Lat=28.934675 Long=-82.001785
SATELLITES Fix Age=4294967295ms Value=0
DATE Fix Age=148ms Raw=110314 Year=2014 Month=3 Day=11
TIME Fix Age=154ms Raw=16311000 Hour=16 Minute=31 Second=10 Hundredths=0
SPEED Fix Age=159ms Raw=17 Knots=0.17 MPH=0.20 m/s=0.09 km/h=0.31
COURSE Fix Age=165ms Raw=0 Deg=0.00
$GPRMC,163111.00,A,2856.08041,N,08200.10721,W,0.130,,110314,,,A68
$GPVTG,,T,,M00.K2GA302.0NM3P,2712,1,2,,58,,02,0*$V2,46,15532,5$V324,26,1,6109
G2.0N2.2,10A
LOCATION Fix Age=133ms Raw Lat=+28[+934673500 billionths], Raw Long=-82[+1786833 billionths], Lat=28.934673 Long=-82.001785
SATELLITES Fix Age=4294967295ms Value=0
DATE Fix Age=148ms Raw=110314 Year=2014 Month=3 Day=11
TIME Fix Age=153ms Raw=16311100 Hour=16 Minute=31 Second=11 Hundredths=0
SPEED Fix Age=158ms Raw=13 Knots=0.13 MPH=0.15 m/s=0.07 km/h=0.24
COURSE Fix Age=164ms Raw=0 Deg=0.00
$GPRMC,163112.00,A,2856.08035,N,08200.10722,W,0.019,,110314,,,A61
$GPVTG,,T,,M.,0K2$A108.3,,5G,,7,2515,,1,27,028,$S2,09,1553,35$V3,42,6,1,1,02
G2.0N2.211,LOCATION Fix Age=133ms Raw Lat=+28[+934672500 billionths], Raw Long=-82[+1787000 billionths], Lat=28.934673 Long=-82.001785
SATELLITES Fix Age=4294967295ms Value=0
DATE Fix Age=147ms Raw=110314 Year=2014 Month=3 Day=11
TIME Fix Age=152ms Raw=16311200 Hour=16 Minute=31 Second=12 Hundredths=0
SPEED Fix Age=158ms Raw=1 Knots=0.01 MPH=0.01 m/s=0.01 km/h=0.02
COURSE Fix Age=164ms Raw=0 Deg=0.00
$GPRMC,163113.00,A,2856.08025,N,08200.10724,W,0.193,,110314,,,A64
$GPVTG,,T,,M1,8A
P1105858,
G,42,,2,,3..,,163,667G,,1,,18,9,4,,G,,5127,310611*$L88,807W3.A0LOCATION Fix Age=133ms Raw Lat=+28[+934670833 billionths], Raw Long=-82[+1787333 billionths], Lat=28.934671 Long=-82.001785
SATELLITES Fix Age=4294967295ms Value=0
DATE Fix Age=148ms Raw=110314 Year=2014 Month=3 Day=11
TIME Fix Age=153ms Raw=16311300 Hour=16 Minute=31 Second=13 Hundredths=0
SPEED Fix Age=157ms Raw=19 Knots=0.19 MPH=0.22 m/s=0.10 km/h=0.35
COURSE Fix Age=163ms Raw=0 Deg=0.00
$GPRMC,163114.00,A,2856.08017,N,08200.10726,W,0.129,,110314,,,A61
$GPVTG,,T,,M1N3,
P,108010,APA2,8214,.1218,66,,0$S2,49,7657235$V3,4,262,21,09
P207800,3.,4LOCATION Fix Age=134ms Raw Lat=+28[+934669500 billionths], Raw Long=-82[+1787667 billionths], Lat=28.934669 Long=-82.001785
SATELLITES Fix Age=4294967295ms Value=0
DATE Fix Age=148ms Raw=110314 Year=2014 Month=3 Day=11
TIME Fix Age=153ms Raw=16311400 Hour=16 Minute=31 Second=14 Hundredths=0
SPEED Fix Age=157ms Raw=12 Knots=0.12 MPH=0.14 m/s=0.06 km/h=0.22
COURSE Fix Age=164ms Raw=0 Deg=0.00LONDON Distance=6995.200683 km Course-to=43.804058 degrees [NE]
DIAGS Chars=110209 Sentences-with-Fix=706 Failed-checksum=406 Passed-checksum=709
The only messages i seem to be getting are: $GPRMC and $GPVTG.
Then you need to configure the GPS unit to provide the messages you want. The data sheet or instruction manual will have the details.
In the data sheet, in the last part about the evaluation board, it states that the GPS module should be positioned so that the antenna is pointed upwards. 'Dangling out the window' probably does not satisfy that.
