Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gps.location.isValid() method returns true when fix is lost #12

Closed
sycophantic opened this issue Dec 19, 2015 · 2 comments
Closed

gps.location.isValid() method returns true when fix is lost #12

sycophantic opened this issue Dec 19, 2015 · 2 comments

Comments

@sycophantic
Copy link

I'm not sure if this a feature or a bug. It appears that gps.location.isValid() returns true even when the fix is lost for some time. Does it not reset if a fix is lost?

Using if (gps.location.isValid() && gps.location.age() < 2000) is my work around.

@stilldavid
Copy link

This is a feature - the library doesn't know if the location that the GPS is reporting is valid or not beyond the checksum passing.

Your workaround is the correct way of handling outdated (and potentially wrong, thought not "invalid") fixes.

@mikalhart
Copy link
Owner

@stilldavid is correct. isValid() simply means that the location information contains valid (though possibly stale) data. isValid() returns FALSE until the very first NMEA sentence with a fix is parsed. From then on it returns TRUE forever.

slippyr4 added a commit to slippyr4/TinyGPSPlus that referenced this issue Jan 11, 2018
add support for fix mode (RMC mikalhart#12) (NMEA 2.3+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants