Browse Source

Rover: added EK2_ parameters and EKF2 instance

master
Andrew Tridgell 10 years ago
parent
commit
5cac948ed0
  1. 4
      APMrover2/Parameters.cpp
  2. 1
      APMrover2/Parameters.h
  3. 4
      APMrover2/Rover.h
  4. 1
      APMrover2/make.inc

4
APMrover2/Parameters.cpp

@ -521,6 +521,10 @@ const AP_Param::Info Rover::var_info[] PROGMEM = { @@ -521,6 +521,10 @@ const AP_Param::Info Rover::var_info[] PROGMEM = {
// @Group: EKF_
// @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),
#endif
// @Group: MIS_

1
APMrover2/Parameters.h

@ -83,6 +83,7 @@ public: @@ -83,6 +83,7 @@ public:
k_param_steering_learn, // unused
k_param_NavEKF, // Extended Kalman Filter Inertial Navigation Group
k_param_mission, // mission library
k_param_NavEKF2,
// 140: battery controls
k_param_battery_monitoring = 140, // deprecated, can be deleted

4
APMrover2/Rover.h

@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
#include <AP_InertialSensor/AP_InertialSensor.h> // Inertial Sensor (uncalibated IMU) Library
#include <AP_AHRS/AP_AHRS.h> // ArduPilot Mega DCM Library
#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>
#include <AP_Terrain/AP_Terrain.h>
@ -152,7 +153,8 @@ private: @@ -152,7 +153,8 @@ private:
// Inertial Navigation EKF
#if AP_AHRS_NAVEKF_AVAILABLE
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};
#else
AP_AHRS_DCM ahrs {ins, barometer, gps};
#endif

1
APMrover2/make.inc

@ -13,6 +13,7 @@ LIBRARIES += AP_Math @@ -13,6 +13,7 @@ LIBRARIES += AP_Math
LIBRARIES += AP_InertialSensor
LIBRARIES += AP_AHRS
LIBRARIES += AP_NavEKF
LIBRARIES += AP_NavEKF2
LIBRARIES += AP_Mission
LIBRARIES += AP_Rally
LIBRARIES += AP_Terrain

Loading…
Cancel
Save