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

Conversation

adedolapoadegboye
Copy link

Pull Request Description: Add Support for Quectel-specific NMEA Sentences in pynmea2

Description

This PR introduces support for Quectel-specific NMEA sentences by adding new proprietary sentence classes under the QTM namespace. These classes enable parsing and handling of device-specific messages, such as GNSS status, configuration settings, geofencing, and more. This extends the library's capabilities for devices like Quectel's LC29H GNSS module.

Changes Introduced

  • New Classes:

    • QTM: Base class for Quectel proprietary sentences.
    • Specific message types:
      • QTMVERNO: GNSS module version information.
      • QTMSAVEPAR: Save receiver parameters.
      • QTMRESTOREPAR: Restore receiver parameters.
      • QTMEPE: Outputs estimated positioning error.
      • QTMCFGGEOFENCE: Configure geofences.
      • QTMGEOFENCESTATUS: Geofence status.
      • QTMCFGSVIN: Survey-in mode configuration.
      • QTMSVINSTATUS: Survey-in status.
      • QTMCFGRCVRMODE: Receiver mode configuration.
      • QTMDOP: DOP values for GNSS accuracy.
      • QTMPL: GNSS protection levels.
      • QTMCFGSBAS: SBAS configuration.
      • QTMCFGCNST: GNSS constellation configuration.
      • QTMCFGFIXRATE: Configure GNSS fix rate.
      • QTMVEL: Velocity information.
      • QTMCFGODO: Configure the odometer feature.
      • QTMODO: Odometer status.
  • Tests Added:

    • Unit tests for each newly implemented proprietary message.
    • Located in tests/test_qtm.py.
    • Ensures accurate parsing and handling of valid and edge-case data.

How it Works

  • Dynamic Message Mapping: The QTM base class dynamically assigns the appropriate subclass based on the first data element (manufacturer + data[0]).
  • Custom Parsers: Each proprietary message class extracts and validates specific fields, such as build_date, epe_north, geofence state, and others.
  • Enhanced Repr Methods: Custom __repr__ implementations for better debugging and logging outputs.

Checklist

  • New tests added for each message type.
  • All tests pass locally with pytest.

@coveralls
Copy link

Coverage Status

coverage: 98.124% (+0.2%) from 97.972%
when pulling 9cd131d on adedolapoadegboye:master
into f298742 on Knio:master.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't commit these files

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants