paretech / klvdata

A Python library for parsing MISB ST 0601 Key Length Value (KLV) metadata.
https://paretech.github.io/klvdata/
MIT License
92 stars 54 forks source link

Map "error" and "out of range" values to None #41

Closed vesuvisian closed 3 years ago

vesuvisian commented 3 years ago

The ST0601.11 standard provides for certain "error" and "out of range" values (see for example Sensor Latitude in the table on page 17). These values currently trigger ValueErrors when the library attempts to parse them. This PR proposes instead to map them to a value of None.

*This is my first time attempting to contribute to anything public, so apologies if I'm doing it wrong or stepping on toes.

Fix issue #40

All4Gis commented 3 years ago

Thanks, Can you fix the pipeline?Only add default value in this line:

def float_to_bytes(value, _domain, _range, _error): to :

def float_to_bytes(value, _domain, _range, _error=None):

vesuvisian commented 3 years ago

Okay, I've now updated float_to_bytes as you requested.