If you wanted to use the entire steering disc, you can "puff up" the steering diamond to a circular disc, with a little bit of additional math.
Let's assume you have x and y such that -1 ≤ x ≤ +1, -1 ≤ y ≤ +1.
Then,
rr = x*x + y*y;
if (rr > 1.0) {
c = 1.0 / (abs(x) + abs(y));
} else
if (rr > 0) {
c = rr / (abs(x) + abs(y));
} else {
c = 0;
}
x *= c;
y *= c;
L = y + x;
R = y - x;
This maps the steering disc to the diamond (square standing on a corner), with any points outside the disc mapped to the closest point on the edge of the disc.
At x=0, y=1 (angle=90°, radius=1), both motors are turning forward at the maximum speed.
At x=0.25, y=0.75 (angle≃71.6°, radius≃0.7906), left motor is turning forward at 0.7906, and right motor at 0.3953.
At x=0.5, y=0.5 (angle=45°, radius=0.7071), left motor is turning forward at 0.7071, and right motor is at standstill.
At x=0.6, y=0.6 (angle=45°, radius=0.8485), left motor is turning forward at 0.8485, and right motor is at standstill.
At x=0.75, y=0.25 (angle≃18.4°, radius≃0.7906), left motor is turning forward at 0.7906, and right motor backward at 0.3953.
At x=1, y=0 (angle=0, radius=1), left motor is turning fully forward, right motor fully backwards.
At x=0.1, y=0.2 (angle≃63.4°, radius≃0.2236), left motor is turning forward at 0.2236, and right motor at 0.0745.
One could argue that at y>0 the vehicle should make some forward progress, i.e. that both motors turn forward then.
If so, all one needs to do, is to find out how the proper forward velocity y and turning rate x depend on the motor rotation rates L and R.
By the current definition, forward progress is their average, which means that if one motor is standstill and other turns at full rate, the forward progress y is half of maximum.
For example, we could decide that the forward speed is determined by the slower of the two motors, i.e.
if (abs(L) < abs(R)) {
y = L;
} else {
y = R;
}
and rotation rate by the difference in the two motors,
x = L - R;
Solving this for L and R, we get
if (y >= 0) {
if (x >= 0) {
L = y + x;
R = y;
} else {
L = y;
R = y - x;
}
} else {
if (x >= 0) {
L = y - x;
R = y;
} else {
L = y;
R = y + x;
}
}
The steering region for this is the same diamond, or square standing on its corner, and the method to puff it up to a circular disc described earlier in this message should work for this, too.