diff --git a/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp b/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp index e1bb298590..b418cdbcff 100644 --- a/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp +++ b/libraries/AP_NavEKF2/AP_NavEKF2_Measurements.cpp @@ -700,7 +700,7 @@ void NavEKF2_core::readAirSpdData() void NavEKF2_core::readRngBcnData() { // get the location of the beacon data - const AP_Beacon *beacon = _ahrs->get_beacon(); + const AP_Beacon *beacon = AP::beacon(); // exit immediately if no beacon object if (beacon == nullptr) {