-
Notifications
You must be signed in to change notification settings - Fork 198
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
Disable gps heading for UBX driver in RTK float fix type #104
Disable gps heading for UBX driver in RTK float fix type #104
Conversation
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.
We can do this for now but I can imagine u-blox improves this with a firmware update or in the next hardware.
Which firmware version do you use?
HPG 1.30 |
Thank you for the review @bkueng. I've pushed your suggestions. |
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.
Thanks, looks good apart from the small style issue.
src/ubx.cpp
Outdated
@@ -2038,6 +2038,12 @@ GPSDriverUBX::payloadRxDone() | |||
bool rel_pos_valid = _buf.payload_rx_nav_relposned.flags & (1 << 2); | |||
(void)rel_length_acc; | |||
|
|||
// RTK float fix type is not accurate enough |
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.
Instead of depending on the fix_type being set I would directly check the carrier_solution_floating
flag in NAV-RELPOSNED here.
See the carrier_solution_floating and carrier_solution_fixed handling below.
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.
I've updated the code, please let me know if this is what you meant @dagar
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.
I would roll carrier_solution_fixed right into the conditional below, but otherwise this looks good.
src/ubx.cpp
Outdated
@@ -2097,6 +2104,11 @@ GPSDriverUBX::payloadRxDone() | |||
gps_rel.heading_valid = _buf.payload_rx_nav_relposned.flags & (1 << 8); | |||
gps_rel.relative_position_normalized = _buf.payload_rx_nav_relposned.flags & (1 << 9); | |||
|
|||
if (!gps_rel.carrier_solution_fixed) |
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.
I would drop this for now, at the moment we're just passing on the "heading_valid" flag as reported in NAV-RELPOSNED. For the heading field in sensor_gps
we can have a higher standard.
This looks good to me, but let's verify in a log with |
@JonasPerolini did you test the changes? |
Overview:
Setup:
Experiment: Benchmark (in Green): Move the rigid bar 3 times 45 deg back and forth in RTK fixed Temper main GPS (in blue) Repeat the following 3 times:
Temper secondary GPS (in red): same experiment as 2 but tempering the secondary GPS. Results:
Note:
|
I've been testing the dual GPS heading using the ublox F9P chip. I get big angles spikes (yellow vertical lines in the attached file) as the gps fix_type changes from float RTK to fixed RTK. Furthermore, I see no changes in the heading accuracy.
Finally, as expected, I've observed that the heading estimates are always more precise in RTK fixed:
A simple solution, for now, is to disable the GPS heading when we are in RTK float fix type.
Note: I believe that @dagar and @bresch have also experienced drops in accuracy when switching from RTK float to RTK fixed fix type.