Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sparkfun/qwiic_ublox_gps_py
https://github.com/sparkfun/qwiic_ublox_gps_py
gps library python sparkfun
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sparkfun/qwiic_ublox_gps_py
- Owner: sparkfun
- License: other
- Created: 2019-09-27T18:18:27.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-11-04T21:24:11.000Z (2 months ago)
- Last Synced: 2024-12-30T23:15:42.140Z (10 days ago)
- Topics: gps, library, python, sparkfun
- Language: Python
- Homepage: https://qwiic-ublox-gps-py.readthedocs.io/en/latest/index.html
- Size: 222 KB
- Stars: 73
- Watchers: 11
- Forks: 41
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Qwiic_Ublox_Gps_Py
----
SparkFun GPS-RTK2 - ZED-F9P (GPS-15136)
SparkFun GPS-RTK - NEO-M8P-2 (GPS-15005)
SparkFun ZOE-M8Q Breakout (GPS-15193)
SparkFun SAM-M8Q Breakout (GPS-15210)
SparkFun GPS-RTK Dead Reckoning - ZED-F9R (GPS-22693)
SparkFun GPS-RTK Dead Reckoning Phat- ZED-F9R (GPS-16475)
SparkFun GPS Dead Reckoning - NEO-M9N (GPS-15733)This is a Python module for the SparkFun GPS products based on u-blox GPS modules.
This package is included in the overall [SparkFun qwiic Python Package](https://github.com/sparkfun/Qwiic_Py). While the module itself does not use I2C, it may none the less join the ranks when the Raspberry Pi has better support for clock stretching. None the less, a Qwiic connector has been included onboard so the GPS module can be used with our along side SparkFun's Qwiic products.## Contents
* [Supported Platforms](#supported-platforms)
* [Dependencies](#dependencies)
* [Installation](#installation)
* [Documentation](#documentation)
* [Example Use](#example-use)Supported Platforms
--------------------
The u-blox gps Python package currently supports the following platforms:
* [Raspberry Pi](https://www.sparkfun.com/search/results?term=raspberry+pi)Documentation
-------------
The SparkFun u-blox gps module documentation is hosted at [ReadTheDocs](https://qwiic-ublox-gps-py.readthedocs.io/en/latest/index.html)Installation
-------------### PyPi Installation
This repository is hosted on PyPi as the [sparkfun-ublox_gps](https://pypi.org/project/) package. On systems that support PyPi installation via pip, this library is installed using the following commandsFor all users (note: the user must have sudo privileges):
```sh
sudo pip install sparkfun-ublox-gps
```
For the current user:```sh
sudo pip install sparkfun-ublox-gps
```### Local Installation
To install, make sure the setuptools package is installed on the system.Direct installation at the command line:
```sh
python setup.py install
```To build a package for use with pip:
```sh
python setup.py sdist
```
A package file is built and placed in a subdirectory called dist. This package file can be installed using pip.
```sh
cd dist
pip install sparkfun_ublox_gps-.tar.gz
```
Example Use
---------------```python
from ublox_gps import UbloxGps
import serial
# Can also use SPI here - import spidev
# I2C is not supportedport = serial.Serial('/dev/serial0', baudrate=38400, timeout=1)
gps = UbloxGps(port)def run():
try:
print("Listenting for UBX Messages.")
while True:
try:
coords = gps.geo_coords()
print(coords.lon, coords.lat)
except (ValueError, IOError) as err:
print(err)
finally:
port.close()if __name__ == '__main__':
run()
```### Examples Directory
---
* geo_coords_ex1.py
* Simple example showing how to get and print out latitude, longitude, and
heading.
* gps_time_ex2.py
* Simple example showing how to UTC time and how to check its' validity.
* dead_reckoning_ex3.py
* Simple example showing how to use dead reckoning on dead reckoning modules.
Make sure to take a look at our [hookup guide](https://learn.sparkfun.com/tutorials/sparkfun-gps-rtk-dead-reckoning-zed-f9r-hookup-guide) for a detailed explanation on
where to attach the module and how to calibrate it.
* stream_nmea_gps_ex4.py
* Simple example showing how to stream NMEA data from Ublox Modules.
* modifying_configuration_settings_ex5.py
* Simple example showing how change the configuration settings for the Ublox
Module.
* using_spi_ex6.py
* Simple example showing how to use SPI.
Module.### Attribution
---
This code is dependent on the work by [daylomople](https://github.com/dalymople) and the awesome parsing capabilities of [ubxtranslator](https://github.com/dalymople/ubxtranslator).### To Do
---
* [ ] Some bugs associated with SPI writes.
* [ ] Add more Classes and Messages to `sparkfun_predefines.py` so that a
greater variety of messages can be parsed.
* [ ] Fix bug when getting configuration settings.