Profile image

Hello! Funky trees code for G Force

1,456 Amirabadi  2.5 years ago
how I can make a code for control surfaces for not pull over 9 or 7.5 Gs

i mean it does not let plane to go further than 9 G force

i tried some codes but the result was 13 G with lots of bounces

please help if you have suitable code or idea

  • Log in to leave a comment
  • Profile image
    25.4k Mustang51

    Did you ever find a good way to do this? @Amirabadi

    one year ago
  • Profile image
    1,456 Amirabadi

    @Huax oh I think i know nothing about PID
    but i will try smooth thanks for helping

    2.5 years ago
  • Profile image
    1,360 Huax

    You can either use smooth or PID.
    Both makes your plane less responsive though.
    Example would be
    smooth(expression,number)
    PID(Pitch,-VerticalG+1,1,0,0.5)
    but PID requires some tuning

    In your case, don’t do anything with the 2nd number corresponding to I, just play around with the 3rd value corresponding to D to make it easier

    2.5 years ago
  • Profile image
    1,456 Amirabadi

    now it perform dolphin maneuver can test and find its problem
    it happened on wasp 1.11

    2.5 years ago
  • Profile image
    1,456 Amirabadi

    @Huax let test it thanks for helping

    2.5 years ago
  • Profile image
    1,360 Huax

    So, I tried the codes.
    The 1st thing to say is that those signs are weird.
    Then it’s /9
    Also there is -1 so your planes doesn’t go crazy at level flight.
    The price is it could go 10G at the bottom of a loop, if you don’t want this, set it to /8
    So it ends up to be
    clamp(Pitch+(VerticalG-1)/9,-1,1)

    +1 2.5 years ago
  • Profile image
    1,456 Amirabadi

    @Huax sorry but not working
    can you test it on wasp

    2.5 years ago
  • Profile image
    1,456 Amirabadi

    @Huax looks simple
    Lets test it
    Thanks

    2.5 years ago
  • Profile image
    1,360 Huax

    Pitch-VerticalG/18
    should work for 9G as at 9G Full Pitch, the output is 0, so it will not go beyond that point
    Change 18 for 15 if you want 7.5G

    2.5 years ago