Stormworks: Build and Rescue

Stormworks: Build and Rescue

Autopilot Autothrottle Function
5 Comments
Tesla 15 Mar, 2021 @ 1:37pm 
oh baker, please come back to the living! You've been away for far too long
jbaker96  [author] 9 Mar, 2020 @ 10:48pm 
Short and simple of it all is that the bang is just the throttle being momentarily set to 0 or less than 0 and is a harmless side effect of the outdated methods used for the controller.
jbaker96  [author] 9 Mar, 2020 @ 10:48pm 
The loud bang is from the throttle momentarily being set to 0 or below 0 and is a result of how the PID controllers manages the throttle output. More careful tuning of each of the PID values would probably be the easiest way to fix it for jet engines since the autothrottle was initially tuned on a piston engine, but the microcontroller itself is a bit old and outdated anyways, so a lot of the problems with this controller will hopefully be completely solved when I finish the new lua based autopilot.

Also, the error tooltip on the microcontroller just tells you when the PID is attempting to output a value outside the 0-1 range for the throttle. The reason you see a short flicker is because there is a 1 tick delay between each of the components of a microcontroller so it takes a couple ticks for the controller to detect the out of range condition and then clamp it to 0-1.
Jason 9 Mar, 2020 @ 9:33pm 
So while the number on the microcontroller doesn't seem to change, monitoring the value on my displays it seems the throttle, for what is likely just a tick, changes to a negative number causing the 'cut off' - but it happens so quick it has no obvious impact on anything.

https://i.gyazo.com/1d6250f83f8e5add1150c4a95975be57.mp4

This is a video, although it did flicker the negative number on every bang for me (I think at 30fps it won't 'capture' every tick on the recording software).

Ultimately it will spend a lot of time backfiring, usually, when close to the speed it's trying to achieve.
Jason 9 Mar, 2020 @ 9:05pm 
Thank you for this, the aircraft holds it's speed well. However, for some reason when changing speed it causes the jet engines to make a loud bang repeatedly, although they never seen to
shut down or have any issues. It's not something that occurs when using the throttle manually.

I tried monitoring the microcontroller and the Error YES flashes when this occurs, but the throttle value seems to remain at least the idle if not slightly higher throttle setting. I've had a play with the coef and it doesn't seem to make much difference.

If you didn't have audio you wouldn't notice anything out of ordinary. Any thoughts?