mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 10:27:34 +08:00
allow testing ekf2 in simulation with jmavsim
This commit is contained in:
@@ -37,7 +37,10 @@ set(config_module_list
|
||||
#modules/attitude_estimator_q
|
||||
modules/ekf_att_pos_estimator
|
||||
modules/position_estimator_inav
|
||||
modules/mc_pos_control
|
||||
modules/mc_att_control
|
||||
modules/navigator
|
||||
modules/commander
|
||||
modules/vtol_att_control
|
||||
modules/controllib
|
||||
modules/ekf2
|
||||
@@ -51,7 +54,6 @@ set(config_module_list
|
||||
lib/launchdetection
|
||||
lib/terrain_estimation
|
||||
lib/runway_takeoff
|
||||
lib/ecl/EKF/tests/base
|
||||
)
|
||||
|
||||
set(config_extra_builtin_cmds
|
||||
|
||||
@@ -45,8 +45,7 @@ sensors start
|
||||
commander start
|
||||
land_detector start multicopter
|
||||
navigator start
|
||||
attitude_estimator_q start
|
||||
position_estimator_inav start
|
||||
ekf_att_pos_estimator start
|
||||
mc_pos_control start
|
||||
mc_att_control start
|
||||
mixer load /dev/pwm_output0 ../../../../ROMFS/px4fmu_common/mixers/quad_x.main.mix
|
||||
|
||||
@@ -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