4 ms·
I believe you simulated a pid loop (https://en.wikipedia.org/wiki/PID_controller https://en.wikipedia.org/wiki/PID_controller) in your code, though I think you
by Aperocky 4y ago
I believe you simulated a pid loop (https://en.wikipedia.org/wiki/PID_controller https://en.wikipedia.org/wiki/PID_controller) in your code, though I think you might have ignored the integral, which is useful in damping oscillations in some cases.
Did a similar script in kerbal space program to complete atmospheric flying missions automatically: https://github.com/Aperocky/ksp_eng/blob/master/lib/flight_lib.ks#L121-L140 https://github.com/Aperocky/ksp_eng/blob/master/lib/flight_l....
- TheRealPomax 4y agoPretty much, yes. But PIDs are great for linear control, and not so great for nonlinear control, so tuning a PID becomes a full time job compared to keeping things "plain code". It's easier to understand what you're tweaking and why. (That said, I'm working on a rewrite atm -it getting turned into just JS- with a follow-up that goes into PID a bit)