mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-13 22:13:35 +08:00
EKF: Add support for use of GPS heading data.
Heading data is assumed to be from a dual antenna array at a specified yaw angle offset in body frame, but with the heading data already corrected for antenna offset. The offset is required to apply the correct compensation for combined rotations and to determine when the yaw observation has become badly conditioned.
This commit is contained in:
committed by
Paul Riseborough
parent
af60e6bbc8
commit
91f886cb5e
@@ -220,6 +220,9 @@ void EstimatorInterface::setGpsData(uint64_t time_usec, struct gps_message *gps)
|
||||
|
||||
gps_sample_new.hgt = (float)gps->alt * 1e-3f;
|
||||
|
||||
gps_sample_new.yaw = gps->yaw;
|
||||
_gps_yaw_offset = gps->yaw_offset;
|
||||
|
||||
// Only calculate the relative position if the WGS-84 location of the origin is set
|
||||
if (collect_gps(time_usec, gps)) {
|
||||
float lpos_x = 0.0f;
|
||||
|
||||
Reference in New Issue
Block a user