From 3b82f60b08619ae82705a06543e03de9b255b451 Mon Sep 17 00:00:00 2001 From: priseborough Date: Wed, 22 Mar 2017 08:13:54 +1100 Subject: [PATCH] AP_AHRS: add interface for use of visual odometry data --- libraries/AP_AHRS/AP_AHRS_NavEKF.cpp | 6 ++++++ libraries/AP_AHRS/AP_AHRS_NavEKF.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp index 0858948ee6..78b3049433 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.cpp @@ -1072,6 +1072,12 @@ void AP_AHRS_NavEKF::writeOptFlowMeas(uint8_t &rawFlowQuality, Vector2f &rawFlo EKF3.writeOptFlowMeas(rawFlowQuality, rawFlowRates, rawGyroRates, msecFlowMeas, posOffset); } +// write body frame odometry measurements to the EKF +void AP_AHRS_NavEKF::writeBodyFrameOdom(float quality, const Vector3f &delPos, const Vector3f &delAng, float delTime, uint32_t timeStamp_ms, const Vector3f &posOffset) +{ + EKF3.writeBodyFrameOdom(quality, delPos, delAng, delTime, timeStamp_ms, posOffset); +} + // inhibit GPS usage uint8_t AP_AHRS_NavEKF::setInhibitGPS(void) { diff --git a/libraries/AP_AHRS/AP_AHRS_NavEKF.h b/libraries/AP_AHRS/AP_AHRS_NavEKF.h index 305eb337b0..8ecd010349 100644 --- a/libraries/AP_AHRS/AP_AHRS_NavEKF.h +++ b/libraries/AP_AHRS/AP_AHRS_NavEKF.h @@ -153,6 +153,9 @@ public: // write optical flow measurements to EKF void writeOptFlowMeas(uint8_t &rawFlowQuality, Vector2f &rawFlowRates, Vector2f &rawGyroRates, uint32_t &msecFlowMeas, const Vector3f &posOffset); + // write body odometry measurements to the EKF + void writeBodyFrameOdom(float quality, const Vector3f &delPos, const Vector3f &delAng, float delTime, uint32_t timeStamp_ms, const Vector3f &posOffset); + // inhibit GPS usage uint8_t setInhibitGPS(void);