Stormworks: Build and Rescue

Stormworks: Build and Rescue

kirb Jul 24, 2021 @ 3:14pm
ACTUALLY functioning altitude hold system?
Does anyone know of something like this? I've skimmed through multiple pages of autopilot microcontrollers and none of them seem to work. Or I'm stupid. Probably the latter.
< >
Showing 1-4 of 4 comments
GhostBlackMor Jul 24, 2021 @ 7:02pm 
Well my works, it's not the best, but does the job, if no one helps you or offer a good one, I will update and link it to you. Also, you'r talking about helicopter altitude right? I don't have one for airplanes.
kirb Jul 24, 2021 @ 7:17pm 
Originally posted by GhostBlackMor:
Well my works, it's not the best, but does the job, if no one helps you or offer a good one, I will update and link it to you. Also, you'r talking about helicopter altitude right? I don't have one for airplanes.
No, sorry, I'm looking for one for aircraft.
Ra-Ra-Rasputin Jul 24, 2021 @ 7:30pm 
The easiest and most hassle free is a PID tied to your altitude control flaps, though you will also need another autopilot system (roll stabilization) to prevent accidents from happening.

You can attach the PID through ADD blocks to be able to control the plane as before without piping the controls through the PID. Just set the PIDs setpoint to altitude you want to hold, make it watch an altimeter, roll the dice for PID values (Generally P 1, I 0.00002 D 0.3 isn't a bad shot) and finally turn it on.

It won't hold the altitude you set exactly where you set it most likely, but it'll be close enough.

You can even make it become active whenever you're not touching the controls when it's turned on if you so want. Just set the active to AND where 1 input of the AND is an on button, and the second is delta = 0 on your altitude control.

Realistically you'll likely also need a system that stabilizes it if your AOA (angle of approach) is so high it'd cause the plane to stall, but if you simply want a button to hold the current altitude this won't ever be an issue. Just use a memory block to record it when you press a button.
Last edited by Ra-Ra-Rasputin; Jul 24, 2021 @ 7:35pm
ElfBossHogg Jul 24, 2021 @ 7:57pm 
I've found the best solution actually involves two PIDs: one to determine pitch for maintaining/achieving altitude and one to establish that pitch (tied to your pitch control planes).

If you just go with one PID (pitch planes for altitude) then you run the risk where a sizeable altitude change will cause your PID to run heavy resulting in you pitching over. Someone will say clamp it but the problem remains that the PID will still be high behind the clamp and take a while to return to normal. Additionally your planes will always be at that value causing you to continue to change pitch in that direction.

With two PIDs the required pitch value will be smaller and respond quicker and you can clamp that without worrying too much about how long it will take to return. With your other PID setting pitch planes to maintain that pitch defined by the first PID you remove the risk of pitching over.

A simpler summary... one PID to determine the angle you need to achieve/maintain altitude, one PID to control the planes to create that angle.
Last edited by ElfBossHogg; Jul 24, 2021 @ 8:00pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jul 24, 2021 @ 3:14pm
Posts: 4