--// strobes on ground and clouds by Michael & Markus - 26.01.2017 function strobes(off, val) ground = ipc.readUW(0x0366) strobe = ipc.readUB(0x5342) alt = ipc.readSD(0x0574) * 3.28084 gnd = ipc.readSW(0x0B4C) * 3.28084 agl = alt - gnd cloud = ipc.readUB(0x66C2) preciprate = ipc.readUB(0x66C3) precitype = ipc.readUB(0x66C0) vis = ipc.readFLT(0x66cB) acpwr = ipc.readUB(0x5343) dayoftimelc = ipc.readUB(0x115E) if ((agl <= 50) and (strobe == 1) and (acpwr == 1) and ((dayoftimelc == 0) or (dayoftimelc == 2) or (dayoftimelc == 3))) or ((agl >= 20) and (strobe == 1) and ((cloud == 1) or (preciprate >=1) or (precitype > 1) or (vis <=10500))) then ipc.setbitsUB(0x5313, 1) -- 0x5313.0 insert Into ProSim User Gate Switch In "ON" else ipc.clearbitsUB(0x5313, 1) -- 0x5313.0 end end event.offset(0x0230,"DBL","strobes") -- time