Profile image

Funky trees stall alarm issue. Help plz?

234k jamesPLANESii  4.8 years ago

I’m currently trying to make a stall alarm (using a winch) that only extends when your AoA is changing while being over 5 degrees, and having a speed above 20 mph and above 90mph.
The current code that I have in the input is (-AngleOfAttack - 5) * v<90 * v>20
This doesn’t work for some reason. But the first part of the code, (-AngleOfAttack - 5) works perfectly (but it still makes noises below 20mph and above 90mph, so it isn’t perfect).
So
I’m wondering, do the v<x inputs behave like how they’re read or behave like a 1 and a zero?

  • Log in to leave a comment
  • Profile image

    For some reason there’s a bug where when I say v<90, it comes up with v&lt;90 in the text. Lol. Just pretend it says v<90 lol.

    Pinned 4.8 years ago
  • Profile image

    When you stall it goes reeeeeeee @DPSAircraft

    +1 4.8 years ago
  • Profile image

    Yeah I know that now lol.
    Here’s the code that works perfectly:

    pingpong(Time, 1) * clamp01(sign(-AngleOfAttack - 9)) * clamp01(sign(IAS - 17)) * clamp(sign(IAS - 36), 1, 0)
    

    Also make sure the inputs for your winch are min = 1 and max = 0
    Basically this means that when you AOA is 9 degrees, and you’re going above 17m/s and below 36m/s, the winch winds in and out, making a noise

    @BogdanX

    4.8 years ago
  • Profile image

    Yup @DPSAircraft

    4.8 years ago
  • Profile image

    I found this code that works
    (-AngleOfAttack - 8) * clamp01(sign(IAS - 17)) * clamp(sign(IAS - 36), 1, 0)
    The only thing though is it only works while your AOA is changing, which it usually is, but I reckon I can give it something where it’s always sounding when you’re below 8* AOA 😏 @vcharng

    4.8 years ago
  • Profile image
    9,445 vcharng

    @jamesPLANESii I have no idea about input for a light. There are people who successfully implemented funky tree for lights but I have entirely failed to do so so far.
    Sign(x) function outputs +1 when x is positive or zero, and outputs -1 when x is minus.
    For example, if you use a piston that extends when input = 1 and retracts when input = 0, sign(v-x) would cause the piston to extend when v>x, and vice versa (piston does not accept minus input AFAIK, but if that's a problem, use clamp01 function outside of sign function.

    Winch will only work when the end is attached to something. You need to use designer suite to manually attach it to something else, set the moving range to 0 and then setup the input to use the winch as a buzzer.

    4.8 years ago
  • Profile image

    Is the input there for a light? Because mine is a noise that happens from a winch moving.
    Also, with the sign(v - x) thing, is that for speeds faster than or speeds slower than and how do I change it around? @vcharng

    4.8 years ago
  • Profile image

    Ahh ok @SnoWFLakE0s

    4.8 years ago
  • Profile image
    9,445 vcharng

    I also have a stall alarm, it works like this:
    input: Sign(min((abs(AOA) -15), sign(IAS), sign(IAS - 223)))
    so when AoA is > 15 at any direction AND IAS is >0 AND IAS is < 223 m/s, the buzzer will go off.

    v>x doesn't seem to work with funky trees and I advise replacing them with "sign(v - x)"

    +1 4.8 years ago
  • Profile image
    67.1k SnoWFLakE0s

    @jamesPLANESii
    .
    v<asdf is the archaic input version. Funky trees and v<asdf style inputs are not compatible.

    4.8 years ago
  • Profile image

    @SnoWFLakE0s @WNP78 reckon you guys could help? Pretty plz? :)

    4.8 years ago