module documentation

Test cases for using NMEA sentences.

Class AltitudeFixerTests Tests that NMEA representations of altitudes are correctly converted.
Class BogusSentenceTests Tests for verifying predictable failure for bogus NMEA sentences.
Class BrokenSentenceCallbackTests Tests for broken NMEA sentence callbacks.
Class CallbackTests Tests if the NMEA protocol correctly calls its sentence callback.
Class ChecksumTests NMEA sentence checksum verification tests.
Class CoordinateFixerTests Tests turning NMEA coordinate notations into something more pleasant.
Class DatestampFixerTests No class docstring; 5/5 methods documented
Class FixerTestMixin Mixin for tests for the fixers on nmea.NMEAAdapter that adapt from NMEA-specific notations to generic Python objects.
Class FixUnitsTests Tests for the generic unit fixing method, nmea.NMEAAdapter._fixUnits.
Class GSVSequenceTests Tests for the interpretation of GSV sequences.
Class InvalidFixTests Tests that data being reported from a bad or incomplete fix isn't used. Although the specification dictates that GPSes shouldn't produce NMEA sentences with real-looking values for altitude or position in them unless they have at least some semblance of a GPS fix, this is widely ignored.
Class NMEAReceiverSetup A mixin for tests that need an NMEA receiver (and a protocol attached to it).
Class NMEAReceiverTests Tests for the NMEA receiver.
Class NMEASentenceTests Tests for nmea.NMEASentence objects.
Class NMEATestReceiver An NMEA receiver for testing.
Class ParsingTests Tests if raw NMEA sentences get parsed correctly.
Class PositionErrorFixerTests Position errors in NMEA are passed as dilutions of precision (DOP). This is a measure relative to some specified value of the GPS device as its "reference" precision. Unfortunately, there are very few ways of figuring this out from just the device (sans manual).
Class SpeedFixerTests Tests that NMEA representations of speeds are correctly converted.
Class SplitTests Checks splitting of NMEA sentences.
Class TimestampFixerTests Tests conversion from NMEA timestamps to datetime.time objects.
Class ValidFixTests Tests that data reported from a valid fix is used.
Class VariationFixerTests Tests if the absolute values of magnetic variations on the heading and their sign get combined correctly, and if that value gets combined with a heading correctly.
Constant GPGGA Undocumented
Constant GPGLL Undocumented
Constant GPGLL_PARTIAL Undocumented
Constant GPGSA Undocumented
Constant GPGSV_EMPTY_MIDDLE Undocumented
Constant GPGSV_FIRST Undocumented
Constant GPGSV_LAST Undocumented
Constant GPGSV_MIDDLE Undocumented
Constant GPGSV_SEQ Undocumented
Constant GPGSV_SINGLE Undocumented
Constant GPHDT Undocumented
Constant GPRMC Undocumented
Function _coordinateSign Return the sign of a coordinate.
Function _coordinateType Return the type of a coordinate.
Function _nmeaFloat Builds an NMEA float representation for a given angle in degrees and decimal minutes.

Undocumented

Value
b'$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47'

Undocumented

Value
b'$GPGLL,4916.45,N,12311.12,W,225444,A*31'
GPGLL_PARTIAL: bytes = (source)

Undocumented

Value
b'$GPGLL,3751.65,S,14507.36,E*77'

Undocumented

Value
b'$GPGSA,A,3,19,28,14,18,27,22,31,39,,,,,1.7,1.0,1.3*34'
GPGSV_EMPTY_MIDDLE: bytes = (source)

Undocumented

Value
b'$GPGSV,1,1,11,03,03,111,00,,,,,,,,,13,06,292,00*75'
GPGSV_FIRST = (source)

Undocumented

GPGSV_LAST = (source)

Undocumented

GPGSV_MIDDLE = (source)

Undocumented

GPGSV_SEQ = (source)

Undocumented

Value
b'\n$GPGSV,3,1,11,03,03,111,00,04,15,270,00,06,01,010,00,13,06,292,00*74\n$GPGSV
,3,2,11,14,25,170,00,16,57,208,39,18,67,296,40,19,40,246,00*74\n$GPGSV,3,3,11,22
,42,067,42,24,14,311,43,27,05,244,00,,,,*4D\n'.split()
GPGSV_SINGLE: bytes = (source)

Undocumented

Value
b'$GPGSV,1,1,11,03,03,111,00,04,15,270,00,06,01,010,00,,,,*4b'

Undocumented

Value
b'$GPHDT,038.005,T*3B'

Undocumented

Value
b'$GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A'
def _coordinateSign(hemisphere): (source)

Return the sign of a coordinate.

This is 1 if the coordinate is in the northern or eastern hemispheres, -1 otherwise.

Parameters
hemisphere:strNMEA shorthand for the hemisphere. One of "NESW".
Returns
intThe sign of the coordinate value.
def _coordinateType(hemisphere): (source)

Return the type of a coordinate.

This is Angles.LATITUDE if the coordinate is in the northern or southern hemispheres, Angles.LONGITUDE otherwise.

Parameters
hemisphere:strNMEA shorthand for the hemisphere. One of "NESW".
Returns
The type of the coordinate (Angles.LATITUDE or Angles.LONGITUDE)
def _nmeaFloat(degrees, minutes): (source)

Builds an NMEA float representation for a given angle in degrees and decimal minutes.

Parameters
degrees:intThe integer degrees for this angle.
minutes:floatThe decimal minutes value for this angle.
Returns
strThe NMEA float representation for this angle.