Python package for parsing and creating TSIP packets
Project description
About Python-TSIP
Python-TSIP is a Python package for parsing and creating TSIP packets. The Trimble Standard Interface Protocol (TSIP) is the binary protocol spoken by the GPS receivers sold by Trimble Navigation Ltd. (http://www.trimble.com).
Python-TSIP is available under the “BSD 2-Clause Simplified License”.
I am no longer actively maintaining this project but I am happy to accept merge requests!
Releases up to 0.3.2 supported only Python 2. Any later releases only support Python 3.
Github user pdaderko deserves all credit for making this library compatible with Python 3.
Status
Almost the full set of TSIP command and report packets understood by the Copernicus II receiver has been implemented but so far only some of them have been tested against the actual GPS. Presumably Trimble Thunderbolt and Thunderbolt-E are also supported as they appear to implement a subset of the commands/reports of the (newer) Copernicus II receiver. I don’t have access to any other Trimble products.
Example
The following code shows how to receive the current GPS time from the receiver.
Command packet 0x21 requests the current GPS time.
Report packet 0x41 contains the current GPS time. Its fields are accessible by index.
Simple example for Python 3:
import tsip
import serial
# Open serial connection to Trimble receiver
serial_conn = serial.Serial('/dev/ttyUSB0', 9600, timeout=1)
gps_conn = tsip.GPS(serial_conn)
# Prepare and send command packet 0x21
gps_conn.write(tsip.Packet(0x21))
while True:
try:
report = gps_conn.read()
if report[0] == 0x41: #got response to 0x21
print(f"GPS time of week .......: {report[1]}")
print(f"Extended GPS week number: {report[2]}")
print(f"GPS UTC offset .........: {report[3]}")
break
else: #some other packet received, output packet number
print(f"Received packet: {hex(report[0])}")
except ValueError:
pass #ignore failed reads
More examples can be found in the docs/examples/ folder but they haven’t been updated to work with Python 3.
History
0.4.1 (01-Dec-2025)
Python 3 is now supported.
Python 2 is no longer supported.
0.3.2 (28-Oct-2017)
Added Report Packet 0x58: GPS System Data from the Receiver.
Fixed Report Packet 0x47: Signals Levels for Tracked Satellites.
Fixed Report Packet 0x6D: Satellite Selection List.x
Added docs/examples/example2.py wich provides a more comprehensive template program than the example in the README.
0.3.1 (26-Sep-2017)
Fixed README.rst so it renders properly on PyPi.
0.3.0 (26-Sep-2017)
Argument to tsip.Packet() can now also be a tuple or list (inspired by Criss Swaim).
Changed development status from alpha to beta.
Cleaned up lots of code to satisfy flake8.
0.2.0 (03-Dec-2015)
Rewritten from scratch.
Implements almost complete set of TSIP commands supported by Trimble Copernicus II and Thunderbolt/Thunderbolt-E GPS receivers.
0.1.0 (20-Jun-2015)
First release on PyPI.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tsip-0.4.1.tar.gz.
File metadata
- Download URL: tsip-0.4.1.tar.gz
- Upload date:
- Size: 48.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
087408d33572040e7364a00d0f707db4c2b1c160d12eddaad9b04b1f67756522
|
|
| MD5 |
5406466a7713296873644d258eeaf29a
|
|
| BLAKE2b-256 |
7072f346697fac3a4ea3e575b28c8e9b6d8cd839bc58a49dee931affe5ef8ef6
|
File details
Details for the file tsip-0.4.1-py2.py3-none-any.whl.
File metadata
- Download URL: tsip-0.4.1-py2.py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b18599c0f563758a0144319352a8c59eb18f8b9d4e83d813af009a74d67d9a1
|
|
| MD5 |
6a80e427956998f20d97b301376d5057
|
|
| BLAKE2b-256 |
764b9ffb9997974583bace788ffddf6c85046ece2e7e21ca2cabaf210753d169
|