mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 19:53:34 +08:00
ekf2: don't reset GPS position in every loop
This commit is contained in:
@@ -247,6 +247,8 @@ void Ekf2::task_main()
|
||||
// initialise parameter cache
|
||||
updateParams();
|
||||
|
||||
vehicle_gps_position_s gps = {};
|
||||
|
||||
while (!_task_should_exit) {
|
||||
int ret = px4_poll(fds, sizeof(fds) / sizeof(fds[0]), 1000);
|
||||
|
||||
@@ -277,7 +279,6 @@ void Ekf2::task_main()
|
||||
bool airspeed_updated = false;
|
||||
|
||||
sensor_combined_s sensors = {};
|
||||
vehicle_gps_position_s gps = {};
|
||||
airspeed_s airspeed = {};
|
||||
|
||||
orb_copy(ORB_ID(sensor_combined), _sensors_sub, &sensors);
|
||||
|
||||
Reference in New Issue
Block a user