Copter: added EK2_* parameters and EKF2 instance

This commit is contained in:
Andrew Tridgell 2015-09-21 15:28:04 +10:00
parent 3dcb840816
commit 053194fd51
4 changed files with 9 additions and 1 deletions

View File

@ -63,6 +63,7 @@
#include <AP_InertialSensor/AP_InertialSensor.h> // ArduPilot Mega Inertial Sensor (accel & gyro) Library
#include <AP_AHRS/AP_AHRS.h>
#include <AP_NavEKF/AP_NavEKF.h>
#include <AP_NavEKF2/AP_NavEKF2.h>
#include <AP_Mission/AP_Mission.h> // Mission command library
#include <AP_Rally/AP_Rally.h> // Rally point library
#include <AC_PID/AC_PID.h> // PID library
@ -186,7 +187,8 @@ private:
// Inertial Navigation EKF
NavEKF EKF{&ahrs, barometer, sonar};
AP_AHRS_NavEKF ahrs{ins, barometer, gps, sonar, EKF};
NavEKF2 EKF2{&ahrs, barometer, sonar};
AP_AHRS_NavEKF ahrs{ins, barometer, gps, sonar, EKF, EKF2};
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
SITL sitl;

View File

@ -1054,6 +1054,10 @@ const AP_Param::Info Copter::var_info[] PROGMEM = {
// @Path: ../libraries/AP_NavEKF/AP_NavEKF.cpp
GOBJECTN(EKF, NavEKF, "EKF_", NavEKF),
// @Group: EK2_
// @Path: ../libraries/AP_NavEKF2/AP_NavEKF2.cpp
GOBJECTN(EKF2, NavEKF2, "EK2_", NavEKF2),
// @Group: MIS_
// @Path: ../libraries/AP_Mission/AP_Mission.cpp
GOBJECT(mission, "MIS_", AP_Mission),

View File

@ -54,6 +54,7 @@ public:
k_param_software_type,
k_param_ins_old, // *** Deprecated, remove with next eeprom number change
k_param_ins, // libraries/AP_InertialSensor variables
k_param_NavEKF2,
// simulation
k_param_sitl = 10,

View File

@ -25,6 +25,7 @@ LIBRARIES += AP_Curve
LIBRARIES += AP_InertialSensor
LIBRARIES += AP_AHRS
LIBRARIES += AP_NavEKF
LIBRARIES += AP_NavEKF2
LIBRARIES += AP_Mission
LIBRARIES += AP_Rally
LIBRARIES += AC_PID