Skip to content

Conversation

@paulmadejong
Copy link
Collaborator

c_common.py: return -999999 (extremely low, physically impossible) altitude in case altitude is unknown or invalid, bds04.py: convert -999999 altitude to None to better signal an invalid/unknown decoded altitude to the user

…titude in case altitude is unknown or invalid, bds04.py: convert -999999 altitude to None to better signal an invalid/unknown decoded altitude to the user
@xoolive
Copy link
Collaborator

xoolive commented Dec 18, 2023

9999 is already invalid because altitude values are multiple of 25

@paulmadejong
Copy link
Collaborator Author

9999 is already invalid because altitude values are multiple of 25

That's definitely the case but requires the user to check for this and really understand the data (and format). Returning a None really signals a problem to the user.

If you just mean to leave the -9999 instead of -99999 I would totally agree but would appreciate the remaining logic to convert that to None to remain.

@xoolive
Copy link
Collaborator

xoolive commented Dec 18, 2023

Sure I just quickly commented (from the phone) about the value edit on the Cython side. It does make sense to switch to None on the Python side though

@junzis
Copy link
Owner

junzis commented Dec 18, 2023

Hi both, the pr looks good to me and passed the tests. I don't mind if it is -9999 or -99999 or -999999 😄
I am going to merge it, as it is quite straight forward.

@junzis junzis merged commit 4cf024f into junzis:master Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants