Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Support for Quectel-specific NMEA Sentences (PQTM) in pynmea2 #169

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3081228
fixed path error in read_file example
adedolapoadegboye Oct 28, 2024
92abbac
updated sutup.py
adedolapoadegboye Oct 28, 2024
ce63ef2
corrected typo in readme
adedolapoadegboye Oct 28, 2024
b19078d
updated nmea.py to support parsing of concantenated PQTM messages
adedolapoadegboye Oct 28, 2024
8fddd61
updated nmea.py to support parsing of concantenated PQTM messages
adedolapoadegboye Oct 28, 2024
de51176
updated nmea.py to support parsing of concantenated PQTM messages
adedolapoadegboye Oct 28, 2024
4beb131
Added support for popular PQTM messages
adedolapoadegboye Oct 29, 2024
bcd903b
Code cleanup
adedolapoadegboye Oct 29, 2024
42c3d3c
Code cleanup
adedolapoadegboye Oct 30, 2024
a4d91fe
corrected typo in readme
adedolapoadegboye Oct 28, 2024
68d9433
Added support for popular PQTM messages
adedolapoadegboye Oct 29, 2024
6e7ca0c
Code cleanup
adedolapoadegboye Oct 30, 2024
40c5ae8
Merge branch 'master' of https://github.com/adedolapoadegboye/pynmea2
adedolapoadegboye Oct 30, 2024
0888a9f
Remove tracked backup files ending with ~
adedolapoadegboye Oct 30, 2024
cfad466
Removed pycache files
adedolapoadegboye Oct 30, 2024
10f4c1e
Removed pycache files
adedolapoadegboye Oct 30, 2024
80cf27f
cleanup
adedolapoadegboye Oct 30, 2024
b624343
replaced subtype with sentence_type for consistency
adedolapoadegboye Oct 30, 2024
9cd131d
replaced subtype with sentence_type for consistency
adedolapoadegboye Nov 7, 2024
efeee76
added support for more pqtm messages
adedolapoadegboye Nov 7, 2024
f21e34c
Added more messages
adedolapoadegboye Nov 8, 2024
58f2d36
Remove __pycache__ from tracking
adedolapoadegboye Nov 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ nosetests.xml
.mr.developer.cfg
.project
.pydevproject

# Pycharm backup files
*~
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The `pynmea2` homepage is located at <http://github.com/Knio/pynmea2>

## Compatibility

`pynmea2` is compatable with Python 2.7 and Python 3.4+
`pynmea2` is compatible with Python 2.7 and Python 3.4+

![Python version](https://img.shields.io/pypi/pyversions/pynmea2.svg?style=flat)
[![Build status](https://github.com/Knio/pynmea2/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/Knio/pynmea2/actions/workflows/ci.yml?query=branch%3Amaster+)
Expand Down
2 changes: 1 addition & 1 deletion examples/read_file.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pynmea2

file = open('examples/data.log', encoding='utf-8')
file = open('data.log', encoding='utf-8') # Replaced example/data.log with data.log

for line in file.readlines():
try:
Expand Down
10 changes: 9 additions & 1 deletion pynmea2/nmea.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@ def parse(line, check=False):
raise ChecksumError(
'strict checking requested but checksum missing', data)


# For PQTM messages, extract the manufacturer (always "QTM") and subtype from concatenated type
if sentence_type.startswith("PQTM") and len(sentence_type) > 4:
manufacturer = "QTM"
sentence_type = sentence_type[4:] # Extract "SAVEPAR" part
data.insert(0, sentence_type) # Add sentence_type to data for class handling
manufacturer += sentence_type # Create full type for lookup

talker_match = NMEASentence.talker_re.match(sentence_type)
if talker_match:
talker = talker_match.group('talker')
Expand Down Expand Up @@ -242,4 +250,4 @@ def __init__(self, manufacturer, data):
self.data = list(data)

def identifier(self):
return 'P%s' % (self.manufacturer)
return 'P%s' % self.manufacturer
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions pynmea2/types/proprietary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
from . import ubx
from . import vtx
from . import nor
from . import qtm

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading