mirror of https://github.com/ArduPilot/ardupilot
ArduSub: rename AP_AHRS::get_position to get_location
This commit is contained in:
parent
266d384ca7
commit
4640ef9a66
|
@ -803,7 +803,7 @@ int16_t GCS_MAVLINK_Sub::high_latency_target_altitude() const
|
||||||
{
|
{
|
||||||
AP_AHRS &ahrs = AP::ahrs();
|
AP_AHRS &ahrs = AP::ahrs();
|
||||||
struct Location global_position_current;
|
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
|
//return units are m
|
||||||
if (sub.control_mode == AUTO || sub.control_mode == GUIDED) {
|
if (sub.control_mode == AUTO || sub.control_mode == GUIDED) {
|
||||||
|
|
|
@ -25,7 +25,7 @@ void Sub::set_home_to_current_location_inflight()
|
||||||
// get current location from EKF
|
// get current location from EKF
|
||||||
Location temp_loc;
|
Location temp_loc;
|
||||||
Location ekf_origin;
|
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;
|
temp_loc.alt = ekf_origin.alt;
|
||||||
if (!set_home(temp_loc, false)) {
|
if (!set_home(temp_loc, false)) {
|
||||||
// ignore this failure
|
// ignore this failure
|
||||||
|
@ -38,7 +38,7 @@ bool Sub::set_home_to_current_location(bool lock)
|
||||||
{
|
{
|
||||||
// get current location from EKF
|
// get current location from EKF
|
||||||
Location temp_loc;
|
Location temp_loc;
|
||||||
if (ahrs.get_position(temp_loc)) {
|
if (ahrs.get_location(temp_loc)) {
|
||||||
|
|
||||||
// Make home always at the water's surface.
|
// Make home always at the water's surface.
|
||||||
// This allows disarming and arming again at depth.
|
// This allows disarming and arming again at depth.
|
||||||
|
|
|
@ -8,7 +8,7 @@ void Sub::read_inertia()
|
||||||
|
|
||||||
// pull position from ahrs
|
// pull position from ahrs
|
||||||
Location loc;
|
Location loc;
|
||||||
ahrs.get_position(loc);
|
ahrs.get_location(loc);
|
||||||
current_loc.lat = loc.lat;
|
current_loc.lat = loc.lat;
|
||||||
current_loc.lng = loc.lng;
|
current_loc.lng = loc.lng;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue