Lat and Long not updating with tinyGPS

I'm doing something wrong with tinyGPS. I'm printing the Lat and Long from tinyGPS and it's very accurate (I put the coordinates in google maps) but the values don't change as I walk 50' or so. Any ideas?

#include <TinyGPS.h>
#include <NewSoftSerial.h>
TinyGPS gps;
NewSoftSerial nss(6, 7);
void getgps(TinyGPS &gps);

void setup()
{

Serial.begin(9600);
//Serial.print("Im Serial");
// delay(1000);
// Serial.println("");
nss.begin(38400);
}

void loop()
{

while (nss.available()) // While there is data on the RX pin...
{
int c = nss.read(); // load the data into a variable...
if(gps.encode(c)) // if there is a new valid sentence...
{
getgps(gps); // then grab the data.

}
}

}

void getgps(TinyGPS &gps)
{
float latitude, longitude;

gps.f_get_position(&latitude, &longitude);
delay(200);

Serial.print("Lat/Long: ");
Serial.print(latitude,8);
Serial.print(", ");
Serial.println(longitude,8);

}

TinyGPS is collecting serial data from the serial port that the GPS is connected to. That you print the data to 8 decimal places does not imply/add accuracy. The accuracy of the lat/lon values is a function of the specific GPS you are using.

Hmmm, I don't see where you told us which GPS you are using.

I also don't see where you indicate whether or not the fix you are printing is valid.

50' may not be enough to affect the actual lat/lon information that the GPS returns.

OK, Thanks!

GPS is MediaTek MT3329 GPS 10Hz (it's currently set at 1Hz... the default)

With this board http://store.diydrones.com/MediaTek_MT3329_GPS_10Hz_Adapter_Basic_p/mt3329-02.htm

When I use the software utility from the manufacturer, I see the coordinates changing as I walk around (well within 50'). This is what made me think I'm doing something wrong with tinyGPS/my Arduino code.

Thanks!

There are other methods in the TinyGPS library, besides the f_get_position() method. Add some of them to getgps(), to show whether the fix is actually valid, whether the time changes, etc. You have the hardware; we don't. There is nothing obviously wrong with the code, except for assuming 8 decimal places of accuracy.

I added fix age and time. They are both updating. I also checked for nss.overflow() and it returns 0.

I noticed that when I restart the GPS, the coordinates change while walking for about 30 seconds. after that they stop changing even though fix age and time are still changing.

PaulS:
50' may not be enough to affect the actual lat/lon information that the GPS returns.

That is what the problem was. I got in a car and slowly moved up the street. At first no change, then rapid coordinate updates.

Does GPS go into some kind of sleep mode?

Thanks!

Does GPS go into some kind of sleep mode?

Generally, no. Specifically, you'd have to read the instructions for yours to see if that is happening. If the fix time is updating, though, the GPS can't really be sleeping, can it?

What is more likely is that there is some setup involved that tells the GPS that it needs to do some thing every so often. The sample application did that. Your sketch does not.