Hi everybody i'm going to show how to setup a Gforce Limiter in your design
here is a preview of the code :
First of all let set the variables that we need to make it work
MaxGforce : the maximum amount of gforce that your pilot can handle.
PIDrate : the sensibility of the PID system the higher the value the less sensible it is but more accurate. the lower the value the more sensible the system but more prone to oscillation
Kp, Ki, Kd : Hopefully I don't need to explain those
SmoothGforceRate : the system used a dampened value of the GForce in order to prevent oscillation which is equivalent to this smooth(GForce, SmoothGforceRate)
. SmoothGforceRate determine how much smoothness we need in calculation of current GForce.
Make sure to set the variable "LimiterOutput" to this : clamp(PID( MaxGforce, smooth(clamp(abs(GForce),0.1,1000) - MaxGforce, SmoothGforceRate), LimiterKp, LimiterKi, LimiterKd) / PIDrate, 0, 1)
after all of that is done, make you sure to set your horizontal stabilizer control surface input to this :
ENJOY...
/!\ DISCLAIMER
:
- tweaking of some of the variables are always required to suit the flight model of the aircraft
- the system is not 100 % efficient with all aircrafts (which is why the variables need to be adjusted in the first place) especially at very high kinetic energy and very low kinetic energy
- the system does not provide feature such as blackout...
@Graingy For those who like immersive and realistic dogfight, this system make your plane reduce the pitch amount in order to not hit the maximum amount of gforce
in realistic flight most fighter pilot have a hardtime with high Gforces and it is belevied that the most can handle only 9G during flight past that and the pilot become unconscious mid-battle which is not ideal. the gforce limiter will provide the right amount of pitch to make sure the pilot never go beyond the MaxGforce (which would be most likely 9G) and keeping conscious mid flight
I hope my statement is correct and make sense
@Graingy you got it
I see. So it governs AOA to prevent going beyond a certain G threshold.
So... what exactly does this do?
I like your funny words magic man