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

[WIP] Use gps data with increased precision #16645

Closed
wants to merge 1 commit into from

Conversation

lukegluke
Copy link
Contributor

double for lat and lon in degrees, float for alt in meters.

  1. 1e7 deg precision for lat and long can be not enough in several specific cases (for example RTK)
  2. In most calculations (especially in ekf) px4 internally already uses lat, lon as doubles converting them on input and output every time back and forward from deg/1e-7deg (and m/mm for alt).
  3. 1e7 deg precision is still used as output in legacy things, like current gps mavlink messages.

todo: gps drives need to be updated

Also dgps_age field added to sensor_gps.msg and vehicle_gps_position.msg (and filled for MavlinkStreamGPS2Raw). It should be parsed it gps drivers where available. But probably this change should go to separate PR.

double lat and lon in degrees
float alt in meters
@lukegluke
Copy link
Contributor Author

Hi @dagar ,

I made this patch as I mentioned in PX4/PX4-ECL#951 (comment)

In our project we use only one modified gps nmea driver and have tested only ekf core, we don't use many modules/drivers and don't fly, so in PR I modified several files only theoretical without testing, just by searching strings like: gps.lat, gps.alt, 1.0e7, 1.e7, 1e7, 1.0e-7, 1.e-7, 1e-7. I could easily missed something, especially regarding altitude. It is definitely needs accurately checking and testing.

This is the reference point for you. We don't use px4 boards. I can't maintain and test this PR further. Please free to edit, move, close this as you wish. Hopes it may help you somehow a little.
Thanks for all you work.

@dagar
Copy link
Member

dagar commented Jan 25, 2021

Thanks @lukegluke, it wasn't clear to me there's any readily available equipment where int32 is limiting.

@mrpollo
Copy link
Contributor

mrpollo commented Feb 1, 2021

@lukegluke could you kindly give us an update on the status of this PR? it looks like it's failing on CI and needs a rebase.

@lukegluke
Copy link
Contributor Author

@mrpollo sorry for the late reply. As I mentioned this is the kind of aid for Daniel if he is going to increased gps data precision someday. I can't maintain and test this PR, so I'm closing it to not disturb you anyway.

@lukegluke lukegluke closed this Feb 5, 2021
@lukegluke lukegluke deleted the pr-gps_precision branch July 5, 2021 08:52
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