Skip to content

Lat long precision fix#1

Open
evbuilder wants to merge 8 commits intocarrott:masterfrom
evbuilder:lat-long-precision-fix
Open

Lat long precision fix#1
evbuilder wants to merge 8 commits intocarrott:masterfrom
evbuilder:lat-long-precision-fix

Conversation

@evbuilder
Copy link
Copy Markdown

Completely untested. Not even compiled. Want to try it out?

evbuilder and others added 8 commits January 24, 2017 20:48
Used 131072 instead of (1<<17).
Because of no integer promotion, needed int32_t cast on degrees
Added “signed” to signed type defines just to be sure.
stp_latlon()
An instance of wanting to convert a negative signed number in to a
positive one by inverting the bits without adding 1. Let C18 sort the
details of twos compliment out and just saying latlon = -latlon;
Achieved conversion from Q20.11seconds to degrees*1000000 without
floating point.
@evbuilder
Copy link
Copy Markdown
Author

Hi Carrott,
I thought I would make it a bit easier with a pull request.
The comments are a bit wordy. Maybe they should be put into another file?
I have been very pleased with my GPS accuracy after this change.

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.

2 participants