s=15 t=15 m=1000 g=0.800 ib=4 p=0 i=0 x=ib+s u=0 :cdc=2-:cd goto(4-:CD)*:APRCH*(:AUn)*(e-n) d=(l-e)*Kd+d*f i+=e*Ki*(:AUg+e*e>5) :CF=(Kp*p+i)*r :CB=(d-i)*r goto5 if((d*d>g+e*e>5)*:APRCH)<1 then :APRCH=0 :CF=0 :CB=0 goto1end goto5 //Improved PID - Approximated Profiled Motion PID - VER 2.1 // github.com/GameName-Darkyshadow/Starbase // tips by in game mail are not necessary but appreciated // Tuning Parameters explained on Github with Manual // by: Darkyshadow