Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Quality 3d returns undocumented values #114

Open
jar349 opened this issue Oct 7, 2024 · 0 comments
Open

Fix Quality 3d returns undocumented values #114

jar349 opened this issue Oct 7, 2024 · 0 comments

Comments

@jar349
Copy link

jar349 commented Oct 7, 2024

The documented values for fix_quality_3d are as follows in the snippet below:

self.fix_quality_3d = 0
"""
The type of fix for a reading
| 1 - no fix
| 2 - 2D fix
| 3 - 3D fix
"""

However, the value I am getting for that attribute is 0. If this is an expected value under certain conditions, would you mind updating the documentation to explain? If it is never expected for the value to be 0, could you please explain what I may be doing wrong on my end to receive that value? All other values I am getting look good/correct.

I suspect that the culprit is this block of code:

if data is None or len(data) not in (17, 18):
return False # Unexpected number of params.
if len(data) == 17:
data = _parse_data(_GSA, data)
else:
data = _parse_data(_GSA_4_11, data)
if data is None:
self.fix_quality_3d = 0
return False # Params didn't parse

If there's code beyond initializing it to 0 that sets it to 0 - as this block does - then 0 probably does have a semantic meaning that can be documented.

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

No branches or pull requests

1 participant