populate Fix2 with heading fields used by PX4, to allow MB on PX4 #2
+17
−0
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@bugobliterator
The “correct” way to transmit GPS baseline data (and heading) is the
RelPosHeading
Dronecan message. However, this message type is not supported in any PX4 stable release (as of 1.14), and not used for EKF aiding even in the main branch. Instead, PX4 relies on a “hack” that usesecef_position_velocity
field in the Fix2 message type to transmit heading: https://github.com/PX4/PX4-Autopilot/blob/926e7878afc6ce804b0b4c097fbf94d405841f42/src/drivers/uavcan/sensors/gnss.cpp#L307C1-L327C1Since we use two Here4 units for moving baseline with a PX4 autopilot, we had to add this to the GPS firmware to make it compatible with PX4.
You should consider adding this to your FW, as it is the last remaining hurdle for PX4 compatibility with moving baseline. Optionally, you could add a config parameter to enable/disable this behaviour, since the PX4 way of doing it is kind of a "hack".