Browse Source

AC_Avoidance: constify get_position

mission-4.1.18
Randy Mackay 8 years ago
parent
commit
12dd6e11fb
  1. 2
      libraries/AC_Avoidance/AC_Avoid.cpp
  2. 2
      libraries/AC_Avoidance/AC_Avoid.h

2
libraries/AC_Avoidance/AC_Avoid.cpp

@ -289,7 +289,7 @@ void AC_Avoid::limit_velocity(float kP, float accel_cmss, Vector2f &desired_vel,
/* /*
* Gets the current xy-position, relative to home (not relative to EKF origin) * Gets the current xy-position, relative to home (not relative to EKF origin)
*/ */
Vector2f AC_Avoid::get_position() Vector2f AC_Avoid::get_position() const
{ {
const Vector3f position_xyz = _inav.get_position(); const Vector3f position_xyz = _inav.get_position();
const Vector2f position_xy(position_xyz.x,position_xyz.y); const Vector2f position_xy(position_xyz.x,position_xyz.y);

2
libraries/AC_Avoidance/AC_Avoid.h

@ -85,7 +85,7 @@ private:
/* /*
* Gets the current position, relative to home (not relative to EKF origin) * Gets the current position, relative to home (not relative to EKF origin)
*/ */
Vector2f get_position(); Vector2f get_position() const;
/* /*
* Computes the speed such that the stopping distance * Computes the speed such that the stopping distance

Loading…
Cancel
Save