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:
Paul Riseborough
2018-09-19 06:32:43 +10:00
committed by Paul Riseborough
parent af60e6bbc8
commit 91f886cb5e
8 changed files with 499 additions and 1 deletions
+3
View File
@@ -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;