Skip to content

Commit 8f9771f

Browse files
committed
add unicore support
1 parent 59b79d9 commit 8f9771f

8 files changed

Lines changed: 26 additions & 18 deletions

File tree

RELEASE_NOTES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# PyGPSClient Release Notes
22

3+
### RELEASE 1.6.3
4+
5+
1. Add support for Unicore UNI binary data output messages via `pyunigps>=0.1.2` and `pygnssutils>=1.1.22`.
6+
37
### RELEASE 1.6.2
48

59
1. Add support for Unicore Secondary Antenna and Attitude (IMU) NMEA sentences e.g. UM98n "GGAH", "HPD" (requires pynmeagps>=1.1.0).

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ classifiers = [
4949
"Topic :: Scientific/Engineering :: GIS",
5050
]
5151

52-
dependencies = ["requests>=2.28.0", "Pillow>=9.0.0", "pygnssutils>=1.1.21"]
52+
dependencies = ["requests>=2.28.0", "Pillow>=9.0.0", "pygnssutils>=1.1.22"]
5353

5454
[project.scripts]
5555
pygpsclient = "pygpsclient.__main__:main"

src/pygpsclient/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
:license: BSD 3-Clause
99
"""
1010

11-
__version__ = "1.6.2"
11+
__version__ = "1.6.3"

src/pygpsclient/app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,14 @@
4848
from types import NoneType
4949

5050
from pygnssutils import GNSSMQTTClient, GNSSNTRIPClient, MQTTMessage
51-
from pygnssutils.gnssreader import ( # UNI_PROTOCOL, # TODO
51+
from pygnssutils.gnssreader import (
5252
NMEA_PROTOCOL,
5353
POLL,
5454
QGC_PROTOCOL,
5555
RTCM3_PROTOCOL,
5656
SBF_PROTOCOL,
5757
UBX_PROTOCOL,
58+
UNI_PROTOCOL,
5859
)
5960
from pygnssutils.socket_server import ClientHandler, ClientHandlerTLS, SocketServer
6061
from pynmeagps import NMEAMessage
@@ -63,6 +64,7 @@
6364
from pysbf2 import SBFMessage
6465
from pyspartn import SPARTNMessage
6566
from pyubx2 import UBXMessage
67+
from pyunigps import UNIMessage
6668
from serial import SerialException, SerialTimeoutException
6769

6870
from pygpsclient._version import __version__ as VERSION
@@ -97,7 +99,6 @@
9799
STATUSPRIORITY,
98100
TTY_PROTOCOL,
99101
UNDO,
100-
UNI_PROTOCOL,
101102
)
102103
from pygpsclient.gnss_status import GNSSStatus
103104
from pygpsclient.helpers import (
@@ -913,8 +914,8 @@ def process_data(self, raw_data: bytes, parsed_data: object, marker: str = ""):
913914
msgprot = SBF_PROTOCOL
914915
elif isinstance(parsed_data, QGCMessage):
915916
msgprot = QGC_PROTOCOL
916-
# elif isinstance(parsed_data, UNIMessage):
917-
# msgprot = UNI_PROTOCOL
917+
elif isinstance(parsed_data, UNIMessage):
918+
msgprot = UNI_PROTOCOL
918919
elif isinstance(parsed_data, UBXMessage):
919920
msgprot = UBX_PROTOCOL
920921
elif isinstance(parsed_data, RTCMMessage):

src/pygpsclient/globals.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
PNTCOL = "#FF8000" # default plot point color
5454

5555
# Protocols to be used in protocol mask (others defined in pygnssutils.gnss_reader.py)
56-
UNI_PROTOCOL = 32 # provisional - awaiting pygnssutils.gnssreader updates for Unicore
5756
SPARTN_PROTOCOL = 256
5857
MQTT_PROTOCOL = 512
5958
TTY_PROTOCOL = 1024
@@ -251,8 +250,8 @@
251250
TOPIC_RXM = "/pp/ubx/0236/ip"
252251
TRACK = "track"
253252
TRACEMODE_WRITE = "write"
254-
TTYOK = ("OK", "$R:")
255-
TTYERR = ("ERROR", "$R?")
253+
TTYOK = ("OK", "$R:", "RESPONSE: OK")
254+
TTYERR = ("ERROR", "$R?", "RESPONSE: PARSING FAILD")
256255
TTYMARKER = "TTY<<"
257256
UBXPRESETS = "ubxpresets"
258257
UBXSIMULATOR = "ubxsimulator"

src/pygpsclient/helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
atttyp,
6060
)
6161
from pyubx2 import version as UBXVERSION
62+
from pyunigps import version as UNIVERSION
6263
from requests import get
6364

6465
from pygpsclient._version import __version__ as VERSION
@@ -107,6 +108,7 @@
107108
"pygnssutils": PGVERSION,
108109
"pyubx2": UBXVERSION,
109110
"pysbf2": SBFVERSION,
111+
"pyunigps": UNIVERSION,
110112
"pyqgc": QGCVERSION,
111113
"pynmeagps": NMEAVERSION,
112114
"pyrtcm": RTCMVERSION,

src/pygpsclient/settings_child_frame.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,11 +456,11 @@ def _do_layout(self):
456456
self._chk_nmea.grid(column=1, row=0, padx=0, pady=0, sticky=W)
457457
self._chk_ubx.grid(column=2, row=0, padx=0, pady=0, sticky=W)
458458
self._chk_rtcm.grid(column=3, row=0, padx=0, pady=0, sticky=W)
459-
self._chk_sbf.grid(column=1, row=1, padx=0, pady=0, sticky=W)
460-
self._chk_qgc.grid(column=2, row=1, padx=0, pady=0, sticky=W)
461-
self._chk_spartn.grid(column=3, row=1, padx=0, pady=0, sticky=W)
462-
self._chk_tty.grid(column=1, row=2, padx=0, pady=0, sticky=W)
463-
# self._chk_unicore.grid(column=2, row=2, padx=0, pady=0, sticky=W) # TODO
459+
self._chk_unicore.grid(column=1, row=1, padx=0, pady=0, sticky=W)
460+
self._chk_sbf.grid(column=2, row=1, padx=0, pady=0, sticky=W)
461+
self._chk_qgc.grid(column=3, row=1, padx=0, pady=0, sticky=W)
462+
self._chk_spartn.grid(column=1, row=2, padx=0, pady=0, sticky=W)
463+
self._chk_tty.grid(column=2, row=2, padx=0, pady=0, sticky=W)
464464
self._lbl_consoledisplay.grid(column=0, row=3, padx=2, pady=2, sticky=W)
465465
self._spn_conformat.grid(
466466
column=1, row=3, columnspan=2, padx=1, pady=2, sticky=W
@@ -536,6 +536,7 @@ def reset(self):
536536
self._prot_ubx.set(cfg.get("ubxprot_b"))
537537
self._prot_sbf.set(cfg.get("sbfprot_b"))
538538
self._prot_qgc.set(cfg.get("qgcprot_b"))
539+
self._prot_unicore.set(cfg.get("uniprot_b"))
539540
self._prot_rtcm.set(cfg.get("rtcmprot_b"))
540541
self._prot_spartn.set(cfg.get("spartnprot_b"))
541542
self._prot_tty.set(cfg.get("ttyprot_b"))
@@ -588,7 +589,7 @@ def _on_update_qgcprot(self, var, index, mode):
588589

589590
def _on_update_uniprot(self, var, index, mode):
590591
"""
591-
Action on updating unicoreprot.
592+
Action on updating uniprot.
592593
"""
593594

594595
if not self._prot_tty.get():

src/pygpsclient/stream_handler.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ class to read and parse incoming data from the receiver. It places
4747
from tkinter import Frame, Label, Tk
4848

4949
from certifi import where as findcacerts
50-
from pygnssutils import ( # UNI_PROTOCOL # TODO
50+
from pygnssutils import (
5151
NMEA_PROTOCOL,
5252
QGC_PROTOCOL,
5353
RTCM3_PROTOCOL,
5454
SBF_PROTOCOL,
5555
UBX_PROTOCOL,
56+
UNI_PROTOCOL,
5657
GNSSError,
5758
GNSSReader,
5859
)
@@ -322,8 +323,8 @@ def _errorhandler(err: Exception):
322323
| UBX_PROTOCOL
323324
| SBF_PROTOCOL
324325
| QGC_PROTOCOL
325-
| RTCM3_PROTOCOL,
326-
# | UNI_PROTOCOL, # TODO
326+
| RTCM3_PROTOCOL
327+
| UNI_PROTOCOL,
327328
quitonerror=ERR_LOG,
328329
bufsize=DEFAULT_BUFSIZE,
329330
msgmode=settings["msgmode"],

0 commit comments

Comments
 (0)