There seems to be some fallout from the change I made to the cornering behaviour with the parameter WPNAV_ACCEL_C.
To keep identical behaviour as before you need to set WPNAV_ACCEL_C = 2 x WPNAV_ACCEL.
This parameter only comes into play during corners that turn by more than 60 degrees.
To get the most open and smoothest sharp corners you don’t want to be reaching the radius or acceleration limits. If this is your goal I would suggest you start with two data points:
- What is the minimum acceleration you want when you head off from a stationary position. This is going to be your minimum WPNAV_ACCEL
- What is the highest cornering acceleration you are comfortable seeing. This will be your maximum WPNAV_ACCEL_C.
If your minimum WPNAV_ACCEL is less than half your maximum WPNAV_ACCEL_C then you have some room to experiment with acceleration, just maintain WPNAV_ACCEL_C = 2 x WPNAV_ACCEL. If WPNAV_ACCEL_C > 2 x WPNAV_ACCEL not then you will need to use these values.
Start by setting WPNAV_RADIUS to a large value, something like 10000. This will ensure you are never limited by the maximum radius during the turn.
Now you need to set the jerk. The most open corners are jerk limited corners. You can achieve this by setting the jerk based on this equation.
Jerk = Accel^2/Vel
Where:
Accel = 0.01 * WPNAV_ACCEL_C
Vel= 0.01 * WPNAV_SPEED
and
WPNAV_JERK = Jerk
(it will be great when we remove cm!!)
Make sure you have enough space between waypoints to get up to full speed.
This will result in the most open corner while reaching the maximum acceleration.
If you use a lower jerk compared to the calculation above you will not reach maximum acceleration.
If you use a higher jerk then you will decelerate in a straight line before initiating the turn.
If you reduce WPNAV_ACCEL_C below 2 x WPNAV_ACCEL the corner angle will be more open when you will start doing a sharp turn rather than a sweeping turn.
As you can see above it does have a big impact however it is more noticeable in some corner geometries.
I hope this helps. I know this all might appear a little complicated but we are trying to achieve a jerk, acceleration, velocity and radius limited corner geometry for all corner angles in a 3 dimensional space where our vertical limits differ from our horizontal limits. So yeh, it is a little complicated.