Profile image

HOW TO LIMIT G-FORCE?

45.7k OPaiTaOn  one month ago

I'm trying to limit my aircraft's G-force to +7G's and -3.5G's, I'm using this code

clamp(Pitch*smooth(clamp01(GForce<7, -<3.5),0.5),-1,1)

I tried making several changes to the code but none of them worked.
I need help with this, I'm not good with Funky Trees

  • Log in to leave a comment
  • Profile image
    915 Grimi

    Pitch*0.5+Pitch*smooth(clamp01(VerticalG<7)*clamp01(VerticalG>-3.5),1)*0.5
    Try this formula, it uses only the vertical component and turns off only half of the input at maximum overload, This significantly improves stability.
    You can increase the multiplier of the first term (currently set to 0.5) and decrease the multiplier of the second term (0.5 too) to improve stability.
    or
    you can reduce the first multiplier and increase the second one for a more stringent limit.
    Important
    The sum of the multipliers must be equal to 1 (for the output to be complete)


    Tested on an airplane "Wasp (Simple)".

    Pinned one month ago
  • Profile image
    7,898 Rb2h

    Found it lol

    one month ago
  • Profile image
    31.6k VenusLancer

    is a bit hard, my method is from the start that your plane cannot exceed your desired G's at its corner speed, for example, if you want to replicate a F-16 this one have to reach 9G's at 320-400 knots without stores and half internal fuel, is easier if your plane has high AoA manuevering, ingame your corner speed must be reached with around 20-30 degrees of alpha with flat bottom airfoil, when you have all of this done limit your control surfaces with a pitchRate or a G force input.

    if you dont have one of this adjustements in your plane this will make a lot of weird things, for example the horrible pitch movement at high speeds, or just ridicously exceed the desired G in your plane if it use a low alpha when your wing clearly can have more angle without stall.

    i recently made a F-14 that can make 7-9G turns and dont exceed this numbers (except if i do some ridiculous dive or something) but in a biplane that im creating is much harder to limit that because at low speeds dont turn, but at high speed turns like a damn fly, or starts woobling for the controls delay

    the input that i generally use is Pitch - PitchRate/100 in a rotator or a wing block with a maximun angle of 20 degrees, but is not the same for all models, for big elevators or if you have your CoM too forward it may not work (in that case is useful add an AngleOfAttack/20 or 50

    one month ago
  • Profile image
    45.7k OPaiTaOn

    @Grimi Thanks mate, this really worked, you will get my credits when my build is completed

    one month ago
  • Profile image
    45.7k OPaiTaOn

    @ollielebanania How do they work?

    one month ago
  • Profile image
    7,334 overlord5453

    Clamp01() limits the output between 0 and 1 and if I remember correctly, it only takes only one input. For example clamp01(VTOL). What you are supposed to use here is clamp(). An example would be clamp(VTOL,-0.5,0.8). Here the output is locked between -0. 5 and 0.8 (or -50% and +80% if you will).

    +2 one month ago
  • Profile image

    I do have codes that work great

    one month ago