Profile image

Hello! Funky trees code for G Force

1,407 Amirabadi  6 months 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,407 Amirabadi

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

    6 months ago
  • Profile image
    1,305 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

    6 months ago
  • Profile image
    1,407 Amirabadi

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

    6 months ago
  • Profile image
    1,407 Amirabadi

    @Huax let test it thanks for helping

    6 months ago
  • Profile image
    1,305 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)

    6 months ago
  • Profile image
    1,407 Amirabadi

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

    6 months ago
  • Profile image
    1,407 Amirabadi

    @Huax looks simple
    Lets test it
    Thanks

    6 months ago
  • Profile image
    1,305 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

    6 months ago