Profile image

help Temporary activation group, one time activation and PID controller bugs SOLVED

2,790 OrderlyHippo  2.9 years ago

My brain is going to explode. I’m working on a custom “laser guided” glide bomb controlled with either camera look or a tiny missile inside.
.
My trouble is the following:
1. I’m trying to make a rotator activate once then not allow it to de-activate.
2. To make a rotator work temporarily (5 sec or so) once activated, then never again.
3. Looking for tips on preventing PID controller bugs with a lot of &’s in it (for a VTOL engine).
.
It’s progress can be viewed at this link
(De-Activate 8 to enable glide bomb):
https://www.simpleplanes.com/a/tvzMyi/F-35B-Lightning-II-Hippos-Custom-gb
.
Base plane and hover system is by Lemoose:
https://www.simpleplanes.com/a/ABPzHu/Rolls-Royce-LiftSystem-V2

Edit: SOLUTIONS

1: Acts permanently (note, temporarily if 1/4 is positive. Numerator is how long in seconds only when positive)
( ceil(smooth(clamp01(Activate6), (Activate6=1) ? pow(10, 10):-1/4 )))

2: Copy #1's code into itself so I think something like this would work (note, 3 is how many seconds till activation)
( ceil(smooth(clamp01( ceil(smooth(Activate6,3)) ), ( ceil(smooth(Activate6,3)) =1) ? pow(10, 10): -1/4 )))

3: I suspect my 3rd issue from before is a bug due to an "if" statement in my code that checks the plane's pitch and/or roll angle and the tick speed of SP might mess it up. Not yet solved.

  • Log in to leave a comment
  • Profile image
    2,790 OrderlyHippo

    @Bryan5 Codes are up.^ When I replied 2.5 years ago, I thought you wanted me to tag you on the plane when it was finished, but now I think I see you wanted the code lol

    4 months ago
  • Profile image
    26.7k Bryan5

    @OrderlyHippo i dont know the codes to

    +1 2.9 years ago
  • Profile image
    2,790 OrderlyHippo

    Sure, if you can help me. Or if you want to know when it’s posted just follow me and you’ll be notified when I post it as public @Bryan5

    +1 2.9 years ago
  • Profile image
    26.7k Bryan5

    @OrderlyHippo can you Tag me when you fixed/finished it please ?

    +1 2.9 years ago
  • Profile image
    2,790 OrderlyHippo

    @Lemoose
    @Mashu

    +1 2.9 years ago