mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-30 15:52:12 +01:00
removed GPS check from ekf and put into GPS
This commit is contained in:
parent
843db63cf6
commit
53ba3f4b74
@ -262,7 +262,8 @@ static void gpsTask(__attribute__((unused)) void *parameters)
|
||||
// criteria for GPS-OK taken from this post...
|
||||
// http://forums.openpilot.org/topic/1523-professors-insgps-in-svn/page__view__findpost__p__5220
|
||||
if ((gpspositionsensor.PDOP < 3.5f) && (gpspositionsensor.Satellites >= 7) &&
|
||||
(gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D)) {
|
||||
(gpspositionsensor.Status == GPSPOSITIONSENSOR_STATUS_FIX3D) &&
|
||||
(gpspositionsensor.Latitude != 0 || gpspositionsensor.Longitude != 0)) {
|
||||
AlarmsClear(SYSTEMALARMS_ALARM_GPS);
|
||||
#ifdef PIOS_GPS_SETS_HOMELOCATION
|
||||
HomeLocationData home;
|
||||
|
@ -34,7 +34,6 @@
|
||||
|
||||
#include <ekfconfiguration.h>
|
||||
#include <ekfstatevariance.h>
|
||||
#include <gpspositionsensor.h>
|
||||
#include <attitudestate.h>
|
||||
#include <homelocation.h>
|
||||
|
||||
@ -218,21 +217,6 @@ static int32_t filter(stateFilter *self, stateEstimation *state)
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (this->usePos) {
|
||||
GPSPositionSensorData gpsData;
|
||||
GPSPositionSensorGet(&gpsData);
|
||||
// Have a minimum requirement for gps usage
|
||||
if ((gpsData.Satellites < 7) ||
|
||||
(gpsData.PDOP > 4.0f) ||
|
||||
(gpsData.Latitude == 0 && gpsData.Longitude == 0) ||
|
||||
(this->homeLocation.Set != HOMELOCATION_SET_TRUE)) {
|
||||
UNSET_MASK(state->updated, SENSORUPDATES_pos);
|
||||
UNSET_MASK(state->updated, SENSORUPDATES_vel);
|
||||
UNSET_MASK(this->work.updated, SENSORUPDATES_pos);
|
||||
UNSET_MASK(this->work.updated, SENSORUPDATES_vel);
|
||||
}
|
||||
}
|
||||
|
||||
dT = PIOS_DELAY_DiffuS(this->ins_last_time) / 1.0e6f;
|
||||
this->ins_last_time = PIOS_DELAY_GetRaw();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user