Merge pull request #12 from tcinbis/master

Added support for Beitian BN-880 module
pull/13/head
Calvin McCoy 2018-03-18 20:29:47 -07:00 zatwierdzone przez GitHub
commit a6eda80ef4
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 22 dodań i 8 usunięć

Wyświetl plik

@ -62,11 +62,20 @@ $ python tests.py
### Currently Supported Sentences
* GPRMC
* GLRMC
* GNRMC
* GPGLL
* GLGLL
* GPGGA
* GLGGA
* GNGGA
* GPVTG
* GLVTG
* GNVTG
* GPGSA
* GLGSA
* GPGSV
* GLGSV
### Position Data
@ -215,16 +224,20 @@ Test scripts are included to help get started with using micropyGPS on the [pybo
Adjusting the baud rate and update rate of the receiver can be easily accomplished with my companion [MTK_command] script
An example of how to hookup the pyboard to the Adafruit [Ultimate GPS Breakout] (minus the PPS signal needed in the external interrupt example) is shown below.
An example of how to hookup the pyboard to the Adafruit [Ultimate GPS Breakout] (minus the PPS signal needed in the external interrupt example) is shown below.
![hookup](http://i.imgur.com/yd4Mjka.jpg?1)
![hookup](http://i.imgur.com/yd4Mjka.jpg?1)
## ESP32
You can follow the setup instructions for the pyboard. The only difference is, that you shoud use micropyGPS as a [frozen module]. Otherwise there will be exceptions, because there is not enough heap space available.
## Other Platforms
As mentioned above, micropyGPS also runs on Python3.x (that's where most of the development was done!). This is useful for testing code or just parsing existing log files.
Beyond the pyBoard, micropyGPS should run on other embedded platforms that have an Python3 interpreter such as the Raspberry Pi and BeagleBone boards. These other devices are currently untested.
Beyond the pyBoard and ESP32, micropyGPS should run on other embedded platforms that have an Python3 interpreter such as the Raspberry Pi and BeagleBone boards. These other devices are currently untested.
[Micropython]:https://micropython.org/
[frozen module]:https://learn.adafruit.com/micropython-basics-loading-modules/frozen-modules
[NMEA-0183]:http://aprs.gids.nl/nmea/
[TinyGPS]:http://arduiniana.org/libraries/tinygps/
[pyboard]:http://docs.micropython.org/en/latest/pyboard/pyboard/quickref.html

Wyświetl plik

@ -495,24 +495,23 @@ class MicropyGPS(object):
if self.gps_segments[sats]:
try:
sat_id = int(self.gps_segments[sats])
except ValueError:
except (ValueError,IndexError):
return False
try: # elevation can be null (no value) when not tracking
elevation = int(self.gps_segments[sats+1])
except ValueError:
except (ValueError,IndexError):
elevation = None
try: # azimuth can be null (no value) when not tracking
azimuth = int(self.gps_segments[sats+2])
except ValueError:
except (ValueError,IndexError):
azimuth = None
try: # SNR can be null (no value) when not tracking
snr = int(self.gps_segments[sats+3])
except ValueError:
except (ValueError,IndexError):
snr = None
# If no PRN is found, then the sentence has no more satellites to read
else:
break
@ -809,6 +808,8 @@ class MicropyGPS(object):
'GPGSA': gpgsa, 'GLGSA': gpgsa,
'GPGSV': gpgsv, 'GLGSV': gpgsv,
'GPGLL': gpgll, 'GLGLL': gpgll,
'GNGGA': gpgga, 'GNRMC': gprmc,
'GNVTG': gpvtg,
}
if __name__ == "__main__":