Skip to content

Commit

Permalink
AC_WPNav: ACCEL_C defaults to 2x ACCEL
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Jan 8, 2024
1 parent 3a37796 commit 0cf6160
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libraries/AC_WPNav/AC_WPNav.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const AP_Param::GroupInfo AC_WPNav::var_info[] = {

// @Param: ACCEL_C
// @DisplayName: Waypoint Cornering Acceleration
// @Description: Defines the maximum cornering acceleration in cm/s/s used during missions, zero uses max lean angle.
// @Description: Defines the maximum cornering acceleration in cm/s/s used during missions. If zero uses 2x accel value.
// @Units: cm/s/s
// @Range: 0 500
// @Increment: 10
Expand Down
4 changes: 2 additions & 2 deletions libraries/AC_WPNav/AC_WPNav.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ class AC_WPNav
/// get_wp_acceleration - returns acceleration in cm/s/s during missions
float get_wp_acceleration() const { return (is_positive(_wp_accel_cmss)) ? _wp_accel_cmss : WPNAV_ACCELERATION; }

/// get_wp_acceleration - returns acceleration in cm/s/s during missions
float get_corner_acceleration() const { return (is_positive(_wp_accel_c_cmss)) ? _wp_accel_c_cmss : get_wp_acceleration(); }
/// get_corner_acceleration - returns maximum acceleration in cm/s/s used during cornering in missions
float get_corner_acceleration() const { return (is_positive(_wp_accel_c_cmss)) ? _wp_accel_c_cmss : 2.0 * get_wp_acceleration(); }

/// get_wp_destination waypoint using position vector
/// x,y are distance from ekf origin in cm
Expand Down

0 comments on commit 0cf6160

Please sign in to comment.