Stormworks: Build and Rescue

Stormworks: Build and Rescue

Недостаточно оценок
919 Systems Flight Stability Controller
   
Наградить
В избранное
В избранном
Удалить
Vehicles: Air, Creative
Microcontrollers: Calculation, Microcontroller
Метки: v1.0.22
Размер файла
Добавлен
Изменён
204.690 KB
25 ноя. 2020 г. в 14:45
28 ноя. 2020 г. в 13:18
Обновлений: 2 (просмотреть)

Подпишитесь, чтобы загрузить
919 Systems Flight Stability Controller

Описание
Intro

Let’s face it, the in-game gyros do not work very well for controlling airplanes. This is my solution, a relatively simple, easy-to-integrate microcontroller for all your stability and controllability needs! It works primarily by using a PID controller to match the value from a seat to the value from a tilt sensor. The PID values are pre-tuned, and work well for most applications, but some adjusting may need to be done if your aircraft is capable of speeds over Mach 1. Enjoy!

Setting up the Microcontroller
To set up the microcontroller, you will first have to connect two tilt sensors. One will face forward with the arrow in the vertical position, this will be your Pitch Tilt Sensor Input. The other will face to the left side of your aircraft, with the arrow, again, in the vertical position. After these sensors are connected, you will need to connect your pitch and roll control from a seat, which go into Pitch Input and Roll Input respectively. Note: if the seat controls are in “Reset” mode, the aircraft will recenter itself automatically, and “Sticky” mode will not recenter the controls. The node labeled “External Acro/ALM Switch” allows you to switch between Angle Limit Mode (ALM) and Acro Mode with a button, which we will go into further in the next section.

Tuning the Microcontroller
First, let’s talk about the difference between the two modes, Acro Mode and Angle Limit Mode. Angle Limit Mode will limit the aircraft to a predefined maximum angle; this can be configured for pitch and roll individually under the “Pitch Angle Limit” and “Roll Angle Limit” tabs. Note that a value of 1 will limit the aircraft to 90 degrees. I recommend a value of between 0.3 and 0.7 depending on the application. Acro Mode gives your aircraft an unlimited range of motion. You can switch between these two modes in the Angle Mode Select tab, or externally with the External Acro/ALM Switch. Note that the external switch only works when the microcontroller is in Angle Limit Mode by default. I would not recommend changing the PID values unless you have experience with PID tuning and the default values do not work for your aircraft, but they are easily accessible if the need to change them arises. Lastly, the “Pitch Sensor Inversion” and “Roll Sensor Inversion” are the best ways to troubleshoot the microcontroller, I recommend activating/deactivating them if the controller is either not limiting your aircraft’s max angles properly in ALM mode, or if the controller is causing your aircraft to spin.

Feel free to use this microcontroller on your own creations, that was the reason I uploaded it in the first place. Credit would be appreciated, but is not required!



Lastly, a huge thank-you to Zond3y, who helped me tune and test this microcontroller!


-919LM
Комментариев: 20
MrKilometer  [создатель] 1 авг. 2023 г. в 16:14 
If I recall correctly, the P and D values would need to be adjusted - how much depends on the aircraft. If you shoot me a friend request, I can probably give you more specific help.
arasmus2 31 июл. 2023 г. в 20:12 
How much adjusting would need to be done and where
MrKilometer  [создатель] 25 июл. 2023 г. в 20:18 
Yep! You may need to adjust the PID values though.
arasmus2 25 июл. 2023 г. в 19:02 
does this work with an artificially stable aircraft
Twitchy115 18 янв. 2023 г. в 1:38 
I haven't gotten it to work on a v-tail yet. As of right now I have the yaw input going into a limiter to keep the mc from freaking out because of the side slip
~
MrKilometer  [создатель] 17 янв. 2023 г. в 19:12 
...interesting. I wouldn't expect it to work stock on a V-tail, but you should be able to make a separate controller to mix the inputs. Have you tried making the ailerons smaller on the other airplane you're talking about?
Twitchy115 16 янв. 2023 г. в 19:14 
Don't even get me started on my V-tail >.<'
Twitchy115 16 янв. 2023 г. в 19:00 
Unfortunately I can either have the yaw recenter quickly and the roll freak out, or I can can make it recenter slowly but it's *a lot* less responsive
MrKilometer  [создатель] 16 янв. 2023 г. в 15:54 
On most fixed-wing aircraft, yaw "recenters" by itself. I made a more advanced version of this microcontroller that does have yaw control, but never released it.
Twitchy115 16 янв. 2023 г. в 14:57 
I got it working. It's unfortunate theres no yaw control though. I love the recentering roll.