Refactor the date and time parsing into a method
Add an instance variable self.mode_indicator
Add an instance variable self.magnetic_variation
Sentence Parsing:
1) Read the sentence from I2C/UART (No change)
2) Validate the CRC, else fail (No change)
3) Call _parse_[SENTENCE_TYPE](), if the sentence was from a GNSS, else return True
4) The data length is compared against it's expected length, else fail
5) These then call _parse_data(PSEUDO_SENTENCE_TYPE,DATA)
6) The data is converted into the expected parameter types, else fail
PSEUDO_SENTENCE_TYPE is usually SENTENCE_TYPE, but can be modified for
a SENTENCE_TYPE with variable data length.
The update() method returns True if:
The sentence passes CRC AND
Not from A GNSS (No parsing happens) OR
From a GNSS, with a handled sentence type which passes parsing OR
From a GNSS, with an unhandled sentence type (No parsing happens)
Else False
to when it was received.
The data stored in self.sats dictionary is:
key is TTNN where
TT = the talker name, eg. GL for GLONASS
NN = the number of the satellite, currently a 1 or 2 digit number
value is a 5 entry list (V0, V1, V2, V3, V4)
V0 = satellite number TTNN as used for the key
V1 = satellite elevation in degrees
V2 = satellite azimuth in degrees
V3 = satellite signal to noise ratio in dB, or None
V4 = timestamp, time.monotonic(), of last GSV message
Enable GSV (satellites in view) parsing.
Rewrote the GSA and GSV parsing to handle each satellite system
(talker) separately.
- self.sats now uses keys based upon the talker and satellite
number, eg. GL67 for GLONASS #67, GP7 for GPS #7
- When the end message of a GSV sequence is received, eg. 3 of 3,
all previous records in self.sats matching that talker are removed
before adding the updated ones.
- self.sat_prns stores the last satellite IDs that were used for a
fix and returned in the most recent GSA sentence. They will be
from only one Satellite system and should have a record in
self.sats .