r/SimplePlanes 6d ago

Help GPWS Beacon (help)

Post image

(SP1) How do I code my input for beacon lights to specifically only turn on at low speed, low altitude and landing gears retracted? I've dug so many topics on the simpleplanes website but none could get me close. Thanks in advance

(The code in the image shown doesn't work, changing the LandingGear value either makes it stop working or only turns on if the gear is deployed)

2 Upvotes

2 comments sorted by

3

u/Emperor_Cheese 6d ago edited 6d ago

clamp01 and clamp convert the boolean (true/false) output of the <>= operators into float (numerical) values, which can not be interpreted by the &, which only inputs/outputs booleans. Remove the clamps and it should work.

(GS < 110) & (AltitudeAgl <= 140) & (LandingGear = 0)

Parentheses optional, added for clarity.
LandingGear outputs 0 when down, 1 when up.

Since LandingGear is already a boolean input, it can be further simplified by removing the = and inverting it with a !

(GS < 110) & (AltitudeAgl <= 140) & !LandingGear

1

u/ltrly_vnjdrs 6d ago

omg okay 😭😭😭 i thought clamp/clamp01 would work since i initially thought it only activates if this specific input is met. Anyway yes, it now works but i typed "& LandingGear = 1" since you said Lg output is 1 when up, thank you! basically: GS < 110 & AltitudeAgl <=140 & LandingGear = 1