Qwiic GPS Breakout XA1110¶
Python module for the Qwiic GPS Breakout XA1110 (Qwiic).
This package should be used in conjunction with the overall SparkFun qwiic Python Package. New to qwiic? Take a look at the entire SparkFun qwiic ecosystem.
Supported Platforms¶
The Qwiic Titan GPS Python package current supports the following platforms:
Platforms to be tested¶
Dependencies¶
This package depends on the Qwiic I2C driver: Qwiic_I2C_Py
Documentation¶
The SparkFun Qwiic Titan GPS module documentation is hosted at ReadTheDocs
Installation¶
PyPi Installation¶
This repository is hosted on PyPi as the sparkfun-qwiic-titan-gps package. On systems that support PyPi installation via pip, this library is installed using the following commands
For all users (note: the user must have sudo privileges):
sudo pip install sparkfun-qwiic-titan-gps
sudo pip install pynmea2
For the current user:
sudo pip install sparkfun-qwiic-titan-gps
sudo pip install pynmea2
Local Installation¶
To install, make sure the setuptools package is installed on the system.
Direct installation at the command line:
python setup.py install
To build a package for use with pip:
python setup.py sdist
A package file is built and placed in a subdirectory called “dist”. This package file can be installed using pip.
cd dist
pip install sparkfun_qwiic_titan_gps-<version>.tar.gz
Example Use¶
def run_example():
print("SparkFun u-blox GPS!")
qwiicGPS = qwiic_titan_gps.QwiicTitanGps()
if qwiicGPS.connected is False:
print("Could not connect to to the SparkFun GPS Unit. Double check that\
it's wired correctly.", file=sys.stderr)
return
qwiicGPS.begin()
while True:
if qwiicGPS.get_nmea_data() is True:
print("Latitude: {}, Longitude: {}, Time: {}".format(
qwiicGPS.gnss_messages['Latitude'],
qwiicGPS.gnss_messages['Longitude'],
qwiicGPS.gnss_messages['Time']))
sleep(1)
if __name__ == '__main__':
try:
run_example()
except (KeyboardInterrupt, SystemExit) as exErr:
print("Ending Basic Example.")
sys.exit(0)
See the examples directory for more detailed use examples.