N@Sniper Turret
I@Elev Bear Accumulator Targeter Rectd
O@Length Turn Fire AccumulatorA AccumulatorReset Sync
schedule(10)
AccumulatorA=(Elev*2)+(angnorm($Elev)*10)
(Accumulator < 0) | (Accumulator > 80) ? AccumulatorReset=1 : AccumulatorReset=0
Acc1=Accumulator < 0
Acc2=Accumulator > 80
AccA1=(Elev*2)
AccA2=(angnorm($Elev)*10)

Length=Accumulator

Turn=(Rect*10)+(Bear*2))*Targeter
Turn1=((angnorm($Bear)*10)+(Bear*2))*Targeter

Fire=0
(Bear<0.1 & Bear>-0.1) & (Elev<0.1 & Elev>-0.1)  -> Fire=1;

Bear1=Bear < 0.1
Bear2=Bear > -0.1
Elev1=Elev < 0.1
Elev2=Elev > -0.1

Sync=send(AccA1,AccA2,Acc1,Acc2,AccumulatorA,AccumulatorReset,Length,Turn)