GPS coordinates are changing a lot while in one place.. why?

All I am doing is getting the latitude/longitude while my phone is on the desk. It is using the fine location and not course. And I have the location enabled on my samsung galaxy s4. It is bouncing all around up to 12 feet from my current location. Should it be line this? Below is the code I am using.

Thanks,

Warren

local locationHandler = function( event ) -- Check for error (user may have turned off location services) if ( event.errorCode ) then native.showAlert( "GPS Location Error", event.errorMessage, {"OK"} ) print( "Location error: " .. tostring( event.errorMessage ) ) else lat2 = event.latitude lon2 = event.longitude lblText5.text = lat2 lblText6.text = lon2 end end Runtime:addEventListener( "location", locationHandler )

The GPS is inherently error prone.  The more satellites the receiver can see, the better.  It needs at least 3 to triangulate your position.  Also the GPS signal isn’t very strong and being indoors can limit the signals received.   Your device’s clock accuracy factors in as well.  Here is an explanation of the various errors that can manifest themselves:

http://www.montana.edu/gps/understd.html#GPS_Error

So yes, it’s perfectly normal for the GPS to report slightly different positions while just sitting still.

Rob

The GPS is inherently error prone.  The more satellites the receiver can see, the better.  It needs at least 3 to triangulate your position.  Also the GPS signal isn’t very strong and being indoors can limit the signals received.   Your device’s clock accuracy factors in as well.  Here is an explanation of the various errors that can manifest themselves:

http://www.montana.edu/gps/understd.html#GPS_Error

So yes, it’s perfectly normal for the GPS to report slightly different positions while just sitting still.

Rob