-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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: mavlink GPS_INPUT support #10093
Conversation
Related comment in the dual GPS PR: |
One issue that came up is how to handle GPS modules that do not send the expected altitude datum format for PX4/EKF2. For example, we might use a GPS receiver that only outputs wgs84 altitude, this is a problem for PX4/EKF2 which is expecting whatever uBlox "amsl" datum is (I think egm96?).
Both of the above ideas would only be useful when switching to the secondary GPS, the primary GPS would need to have proper altitude and everything else for system initialization, pre-flight checks, pre-arm checks, etc. Another approach could be to add a parameter to select which uBlox altitude value to use. Default to the current (egm96?), but allow an advanced user to select the wgs84 altitude so that it could match the wgs84 altitude on a secondary GPS module. |
Could you please rebase? Thanks! |
c6429cb
to
9cd5f30
Compare
Several updates are recommended:
|
Jenkins test this please. |
9cd5f30
to
ab23494
Compare
Rebased on master. We could probably do a quick pass and get this in safely. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still a valid issue |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
gps.lon = gps_input.lon; | ||
gps.alt = gps_input.alt; | ||
gps.eph = (float)gps_input.horiz_accuracy * 1e-2f; // from cm to m | ||
gps.epv = (float)gps_input.vert_accuracy * 1e-2f; // from cm to m |
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.
The spec says this is all meters, not cm.
//gps.vel_m_s = (float)gps_input.vel * 1e-2f; // from cm/s to m/s | ||
gps.vel_n_m_s = gps_input.vn * 1e-2f; // from cm to m | ||
gps.vel_e_m_s = gps_input.ve * 1e-2f; // from cm to m | ||
gps.vel_d_m_s = gps_input.vd * 1e-2f; // from cm to m |
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.
Same here.
gps.vel_e_m_s = gps_input.ve * 1e-2f; // from cm to m | ||
gps.vel_d_m_s = gps_input.vd * 1e-2f; // from cm to m | ||
gps.vel_ned_valid = true; | ||
//gps.cog_rad = ((gps_input.cog == 65535) ? NAN : wrap_2pi(math::radians(gps_input.cog * 1e-2f))); |
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.
That's not a thing right?
//gps.cog_rad = ((gps_input.cog == 65535) ? NAN : wrap_2pi(math::radians(gps_input.cog * 1e-2f))); | ||
|
||
gps.fix_type = gps_input.fix_type; | ||
gps.satellites_used = gps_input.satellites_visible; //TODO: rename mavlink_hil_gps_t sats visible to used? |
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.
Too late now, I think.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Stale, closing. |
No description provided.