Closed svanacker closed 9 years ago
In pid.c, we use the incorrect formula:
left = (theta + alpha) /2 right = (theta - alpha) /2
but the following is correct :
left = (theta + alpha) right = (theta - alpha)
because theta = (left + right) / 2 alpha = (left - right) / 2
=> theta + alpha = (left + right) / 2 + (left - right) / 2 = 2 left / 2 = left => theta + alpha = (left + right) / 2 - (left - right) / 2 = 2 right / 2 = right
In pid.c, we use the incorrect formula:
left = (theta + alpha) /2 right = (theta - alpha) /2
but the following is correct :
left = (theta + alpha) right = (theta - alpha)
because theta = (left + right) / 2 alpha = (left - right) / 2
=> theta + alpha = (left + right) / 2 + (left - right) / 2 = 2 left / 2 = left => theta + alpha = (left + right) / 2 - (left - right) / 2 = 2 right / 2 = right