EKF: Improve use of position and velocity observation noise parameters

Fix bug where noise parameters were not being squared when calculating the observation variance.
Use GPS reported speed accuracy to set velocity observation noise and use the parameter to set the minimum.
This commit is contained in:
Paul Riseborough
2016-02-03 18:15:38 +11:00
parent 2b1e8fe910
commit 7de1d39ce4
3 changed files with 31 additions and 10 deletions
+1
View File
@@ -137,6 +137,7 @@ void EstimatorInterface::setGpsData(uint64_t time_usec, struct gps_message *gps)
memcpy(gps_sample_new.vel._data[0], gps->vel_ned, sizeof(gps_sample_new.vel._data));
_gps_speed_valid = gps->vel_ned_valid;
_gps_speed_accuracy = gps->sacc;
float lpos_x = 0.0f;
float lpos_y = 0.0f;