![]() ![]() failed_checksum – the number of sentences that failed the checksum test.sentences – the number of valid $GPGGA and $GPRMC sentences processed.chars – the number of characters fed to the object. ![]() Gps.stats(&chars, &sentences, &failed_checksum) It provides statistics that help with troubleshooting. The stats method provides a clue whether you are getting good data or not. Gps.get_datetime(&date, &time, &fix_age) retrieves +/- lat/long in 100000ths of a degree Unsigned short sentences, failed_checksum Unsigned long fix_age, time, date, speed, course ![]() To test whether the data returned is stale, examine the (optional) parameter “fix_age” which returns the number of milliseconds since the data was encoded. You can then query the object to get various tidbits of data. (TinyGPS does not handle retrieving serial data from a GPS unit.) When encode() returns “true”, a valid sentence has just changed the TinyGPS object’s internal state. To use, simply create an instance of an object like this:įeed the object serial NMEA data one character at a time using the encode() method. To keep resource consumption low, the library avoids any mandatory floating point dependency and ignores all but a few key GPS fields. TinyGPS is designed to provide most of the NMEA GPS functionality I imagine an Arduino user would want – position, date, time, altitude, speed and course – without the large size that seems to accompany similar bodies of code. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |