-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add support for ATT GPSD message #32
base: master
Are you sure you want to change the base?
Conversation
gpsd/__init__.py
Outdated
@@ -128,6 +138,10 @@ def from_json(cls, packet): | |||
result.error['c'] = last_tpv['epc'] if 'epc' in last_tpv else 0 | |||
result.error['v'] = last_tpv['epv'] if 'epv' in last_tpv else 0 | |||
|
|||
result.heading = last_att['heading'] if 'heading' in last_att else 0.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What happens if the actual value is 0.0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by actual value? Do you mean last_att['heading']
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you take a look at the heading and it is 0.0 you assume north I guess. So i think you can't use 0.0 to tell the user that there is no heading information. I think it should be something like None or so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. Now I understand. Yes, 0 is a valid heading, so the error condition should return None
. I’ll make the change and push.
I would love to have this feature merged. |
It is now reporting |
Fixes #30