PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 3 години
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # TinyGPS upgrade for NMEA Data Protocol v3.x and GLONASS
  2. This update adds support for newer NMEA-capable GPS devices that implement the [v3.x GNSS spec](http://geostar-navi.com/files/docs/geos3/geos_nmea_protocol_v3_0_eng.pdf) as well as devices that support [GLONASS](https://en.wikipedia.org/wiki/GLONASS).
  3. <center><table><tr valign='center'><td><img src='http://blog.newsplore.com/wp-content/uploads/2015/09/gps-notrack.jpg' width='200px'/></td><td><img src="http://blog.newsplore.com/wp-content/uploads/2015/09/gps-track.jpg" width='200px'/></tr><tr align='center'><td>Acquiring position</td><td>Tracking</td></tr></table></center>
  4. #### The following new sentences are now supported:
  5. 1. NMEA GPS sentence:
  6. * GPS Satellites in view [GPGSV](http://aprs.gids.nl/nmea/#gsv)
  7. 2. GNSS sentences:
  8. * GNRMC (same with GPRMC)
  9. * GNGNS
  10. 3. GLONASS sentences:
  11. * GLGSV
  12. #### Tracking satellites in view for both GPS and GLONASS constellations.
  13. This allows for building e.g. an advanced GUI that shows the satellites in view and their respective strength both when searching and when tracking.
  14. The data is accessible via a new method: `uint32_t[] trackedSattelites()` that returns an array of uint32 that (to keep the additional memory footprint at a minimum) encodes the useful data as follows (check [GPGSV](http://aprs.gids.nl/nmea/#gsv) for a comprehensive explanation ):
  15. * bit 0-7: sattelite ID
  16. * bit 8-14: SNR (dB), max 99dB
  17. * bit 15: this sattelite is used in solution (not implemented yet)
  18. The uint32 array size is 24, that is, it tracks up to 12 satellites for each constellation, GPS and GLONASS. 12 is the maximum number of satellites in view per constellation at any given point on Earth.
  19. ```c
  20. ...
  21. char buf[32];
  22. uint32_t* satz = tinygps.trackedSatellites();
  23. uint8_t sat_count = 0;
  24. for(int i=0;i<24;i++)
  25. {
  26. if(satz[i] != 0) //exclude zero SNR sats
  27. {
  28. sat_count++;
  29. sprintf(buf, "PRN %d: %ddB ", satz[i]>>8, (satz[i]&0xFF)>>1);
  30. Serial.println(buf);
  31. }
  32. }
  33. ```
  34. This code produces an output of this form: ```PRN 21: 31dB PRN 11: 25dB PRN 71: 24dB ...``` where satellite ID and the strength are displayed for each satellite in view.
  35. Additional notes from NMEA protocol v3.0:
  36. > GPS satellites are identified by their PRN numbers, which range from 1 to 32.
  37. > The numbers 65-96 are reserved for GLONASS satellites. GLONASS satellites are identified by 64+satellite slot number. The slot numbers are 1 through 24 for the full constellation of 24 satellites, this gives a range of 65 through 88. The numbers 89 through 96 are available if slot numbers above 24 are allocated to on-orbit spares.
  38. The array is grouped by constellations with GPS first.
  39. #### GNS mode indicator
  40. Fix data now includes a field that shows which constellations are used when tracking, Accessible via a new ```char[] constellations()``` method that returns a char array on the following spec:
  41. > Mode Indicator:
  42. A variable length valid character field type with the first two characters currently defined. The first character indicates the use of GPS satellites, the second character indicates the use of GLONASS satellites. If another satellite system is added to the standard, the mode indicator will be extended to three characters, new satellite systems shall always be added on the right, so the order of characters in the Mode Indicator is: GPS, GLONASS, other satellite systems in the future.
  43. The characters shall take one of the following values:
  44. > * N = No fix
  45. > * A = Autonomous mode
  46. > * D = Differential mode
  47. > * P = Precise mode is used to compute position fix
  48. > * R = Real Time Kinematic
  49. > * F = Float RTK
  50. > * E = Estimated (dead reckoning) mode
  51. > * M = Manual input mode
  52. > * S = Simulator mode.
  53. For example, a return of ```AA``` when calling ```constellations()``` means that both GPS and GLONASS are used when the device is tracking, ```AN``` means only GPS is used, etc.
  54. #### Time and date available when the GPS is not tracking
  55. Now the time and date are also updated even when the device is not tracking since a valid date and time is computed when enough satellites are in view. Use with caution as it may yield false date and time.
  56. Blogged [here](http://blog.newsplore.com/2015/09/03/a-tinygps-upgrade-adding-nmea-v3-0-and-glonass-support).