diff --git a/ArduSub/GCS_Mavlink.cpp b/ArduSub/GCS_Mavlink.cpp index 5a91068b59..c74168b494 100644 --- a/ArduSub/GCS_Mavlink.cpp +++ b/ArduSub/GCS_Mavlink.cpp @@ -803,7 +803,7 @@ int16_t GCS_MAVLINK_Sub::high_latency_target_altitude() const { AP_AHRS &ahrs = AP::ahrs(); struct Location global_position_current; - UNUSED_RESULT(ahrs.get_position(global_position_current)); + UNUSED_RESULT(ahrs.get_location(global_position_current)); //return units are m if (sub.control_mode == AUTO || sub.control_mode == GUIDED) { diff --git a/ArduSub/commands.cpp b/ArduSub/commands.cpp index 7162b89f31..4085a20a6e 100644 --- a/ArduSub/commands.cpp +++ b/ArduSub/commands.cpp @@ -25,7 +25,7 @@ void Sub::set_home_to_current_location_inflight() // get current location from EKF Location temp_loc; Location ekf_origin; - if (ahrs.get_position(temp_loc) && ahrs.get_origin(ekf_origin)) { + if (ahrs.get_location(temp_loc) && ahrs.get_origin(ekf_origin)) { temp_loc.alt = ekf_origin.alt; if (!set_home(temp_loc, false)) { // ignore this failure @@ -38,7 +38,7 @@ bool Sub::set_home_to_current_location(bool lock) { // get current location from EKF Location temp_loc; - if (ahrs.get_position(temp_loc)) { + if (ahrs.get_location(temp_loc)) { // Make home always at the water's surface. // This allows disarming and arming again at depth. diff --git a/ArduSub/inertia.cpp b/ArduSub/inertia.cpp index 8fc70f85ca..9c9ec8138c 100644 --- a/ArduSub/inertia.cpp +++ b/ArduSub/inertia.cpp @@ -8,7 +8,7 @@ void Sub::read_inertia() // pull position from ahrs Location loc; - ahrs.get_position(loc); + ahrs.get_location(loc); current_loc.lat = loc.lat; current_loc.lng = loc.lng;