Browse Source

Sub: replace location_offset() and get_distance() function calls with Location object member function calls

This allows removing duplicated code
master
Dr.-Ing. Amilcar do Carmo Lucas 6 years ago committed by Peter Barker
parent
commit
3fd5e05601
  1. 2
      ArduSub/commands.cpp

2
ArduSub/commands.cpp

@ -99,5 +99,5 @@ bool Sub::far_from_EKF_origin(const Location& loc) @@ -99,5 +99,5 @@ bool Sub::far_from_EKF_origin(const Location& loc)
{
// check distance to EKF origin
const struct Location &ekf_origin = inertial_nav.get_origin();
return (get_distance(ekf_origin, loc) > EKF_ORIGIN_MAX_DIST_M);
return (ekf_origin.get_distance(loc) > EKF_ORIGIN_MAX_DIST_M);
}

Loading…
Cancel
Save