When generating a PositionPacket with:
compressed = False, source="RS41", destination="BASE", lat=50.99263, lon=4.79026, ambiguity=0, symbol_table="/", symbol_id="O", path=''WIDE2-2"
after calling .generate() the following packet is created:
"RS41>BASE,WIDE2-2:!5059.56N/447.42EO"
which is not conform to the standard for the longitude field in this case, there should be 2 extra leading zeros.
The degrees field of both the latitude and longitude should be zfilled to lengths 2 and 3 respectively.
Adding .zfill(2) and .zfill(3) operators for latitude and longitude degrees field when applying the ambiguity makes the packets conform again to the standard.
Resulting packet after adding .zfill(3) for the degrees field of the longitude in function def encode_uncompressed_latitude(latitude: Union[float, int], ambiguity: int = 0):
"RS41>BASE,WIDE2-2:!5059.56N/00447.42EO"
When generating a
PositionPacket
with:compressed = False, source="RS41", destination="BASE", lat=50.99263, lon=4.79026, ambiguity=0, symbol_table="/", symbol_id="O", path=''WIDE2-2"
after calling
.generate()
the following packet is created:"RS41>BASE,WIDE2-2:!5059.56N/447.42EO"
which is not conform to the standard for the longitude field in this case, there should be 2 extra leading zeros. The degrees field of both the latitude and longitude should be zfilled to lengths 2 and 3 respectively. Adding
.zfill(2)
and.zfill(3)
operators for latitude and longitude degrees field when applying the ambiguity makes the packets conform again to the standard.Resulting packet after adding .zfill(3) for the degrees field of the longitude in function
def encode_uncompressed_latitude(latitude: Union[float, int], ambiguity: int = 0)
:"RS41>BASE,WIDE2-2:!5059.56N/00447.42EO"