twisted.positioning.test.test_nmea
module documentationtwisted.positioning.test
Test cases for using NMEA sentences.
Class | NMEATestReceiver | An NMEA receiver for testing. |
Class | CallbackTests | Tests if the NMEA protocol correctly calls its sentence callback. |
Class | BrokenSentenceCallbackTests | Tests for broken NMEA sentence callbacks. |
Class | SplitTests | Checks splitting of NMEA sentences. |
Class | ChecksumTests | NMEA sentence checksum verification tests. |
Class | NMEAReceiverSetup | A mixin for tests that need an NMEA receiver (and a protocol attached to it). |
Class | GSVSequenceTests | Tests for the interpretation of GSV sequences. |
Class | BogusSentenceTests | Tests for verifying predictable failure for bogus NMEA sentences. |
Class | NMEASentenceTests | Tests for nmea.NMEASentence
objects. |
Class | ParsingTests | Tests if raw NMEA sentences get parsed correctly. |
Class | FixUnitsTests | Tests for the generic unit fixing method, nmea.NMEAAdapter._fixUnits . |
Class | FixerTestMixin | Mixin for tests for the fixers on nmea.NMEAAdapter
that adapt from NMEA-specific notations to generic Python objects. |
Class | TimestampFixerTests | Tests conversion from NMEA timestamps to datetime.time
objects. |
Class | DatestampFixerTests | No class docstring; 5/5 methods documented |
Class | CoordinateFixerTests | Tests turning NMEA coordinate notations into something more pleasant. |
Class | AltitudeFixerTests | Tests that NMEA representations of altitudes are correctly converted. |
Class | SpeedFixerTests | Tests that NMEA representations of speeds are correctly converted. |
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. |
Class | PositionErrorFixerTests | No summary |
Class | ValidFixTests | Tests that data reported from a valid fix is used. |
Class | InvalidFixTests | No summary |
Class | NMEAReceiverTests | Tests for the NMEA receiver. |
Function | _nmeaFloat | Builds an NMEA float representation for a given angle in degrees and decimal minutes. |
Function | _coordinateSign | Return the sign of a coordinate. |
Function | _coordinateType | Return the type of a coordinate. |
Builds an NMEA float representation for a given angle in degrees and decimal minutes.
Parameters | degrees | The integer degrees for this angle. (type: int ) |
minutes | The decimal minutes value for this angle. (type: float ) | |
Returns | The NMEA float representation for this angle. (type: str ) |
Return the sign of a coordinate.
This is 1
if the coordinate is in the northern or eastern
hemispheres, -1
otherwise.
Parameters | hemisphere | NMEA shorthand for the hemisphere. One of "NESW". (type: str ) |
Returns | The sign of the coordinate value. (type: int ) |
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 | NMEA shorthand for the hemisphere. One of "NESW". (type: str ) |
Returns | The type of the coordinate (Angles.LATITUDE
or Angles.LONGITUDE ) |