Profile image

Hello! Funky trees code for G Force

1,424 Amirabadi  one year 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
    1,424 Amirabadi

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

    one year ago
  • Profile image
    1,322 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

    one year ago
  • Profile image
    1,424 Amirabadi

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

    one year ago
  • Profile image
    1,424 Amirabadi

    @Huax let test it thanks for helping

    one year ago
  • Profile image
    1,322 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 one year ago
  • Profile image
    1,424 Amirabadi

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

    one year ago
  • Profile image
    1,424 Amirabadi

    @Huax looks simple
    Lets test it
    Thanks

    one year ago
  • Profile image
    1,322 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

    one year ago