Re:PID Control Challenges
by iNic on Tuesday September 26, 2023 @08:28AM
(#37658285)
I got 0.4 sec with this:
function controlFunction(block)
{
const maxforce = 100.;
if (block.x < -1.01)
return maxforce;
else if (block.x < -0.01)
return -maxforce;
else
return -block.x - 2 * block.dx;
}
[ Parent
| on HN ]