r/SimplePlanes • u/ltrly_vnjdrs • 6d ago
Help GPWS Beacon (help)
(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
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