mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-14 13:50:34 +08:00
allow testing ekf2 in simulation with jmavsim
This commit is contained in:
@@ -32,13 +32,13 @@
|
||||
#############################################################################
|
||||
set(MODULE_CFLAGS)
|
||||
if (${OS} STREQUAL "nuttx")
|
||||
list(APPEND MODULE_CFLAGS -Wframe-larger-than=30000)
|
||||
list(APPEND MODULE_CFLAGS -Wframe-larger-than=60000)
|
||||
endif()
|
||||
px4_add_module(
|
||||
MODULE modules__ekf2
|
||||
MAIN ekf2
|
||||
COMPILE_FLAGS ${MODULE_CFLAGS}
|
||||
STACK 30000
|
||||
STACK 60000
|
||||
SRCS
|
||||
ekf2_main.cpp
|
||||
DEPENDS
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
#include <uORB/topics/vehicle_gps_position.h>
|
||||
#include <uORB/topics/airspeed.h>
|
||||
|
||||
#include <ecl/EKF/estimator_base.h>
|
||||
#include <ecl/EKF/ekf.h>
|
||||
|
||||
|
||||
extern "C" __EXPORT int ekf2_main(int argc, char *argv[]);
|
||||
@@ -128,7 +128,7 @@ private:
|
||||
|
||||
Ekf2::Ekf2()
|
||||
{
|
||||
_ekf = new EstimatorBase();
|
||||
_ekf = new Ekf();
|
||||
}
|
||||
|
||||
Ekf2::~Ekf2()
|
||||
@@ -225,6 +225,8 @@ void Ekf2::task_main()
|
||||
if (airspeed_updated) {
|
||||
_ekf->setAirspeedData(airspeed.timestamp, &airspeed.indicated_airspeed_m_s);
|
||||
}
|
||||
|
||||
_ekf->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user