<!-- This guage is for Posky 767  for calculating day/Night -->
<Gauge Name="PkyFlasher" Version="1.0">
<copyright>(c)2009 Hiroshi Igami</copyright>

<Size X="20" Y="20"/>
<Element>
<Select>
<Value> 

(A:LIGHT NAV,bool) 1 ==  (A:LIGHT STROBE,bool) 1 ==  (A:LIGHT BEACON,bool) 1 ==  || || if{

   (P:ZULU TIME, number) 1000 *  (L:Pky_FlasherUpdate, number) 1500 +   &gt; if{
       0  (>L:Pky_FlasherUpdate, number)
   }
   els{
       (P:ZULU TIME, number) 1000 *  (L:Pky_FlasherUpdate, number) 1500 -   &lt; if{
           0  (>L:Pky_FlasherUpdate, number)
      }
   }
   
   (L:Pky_FlasherUpdate, number) (P:ZULU TIME, number) 1000 *  &lt; if{
       (P:ZULU TIME, number) 1000 * 1500 + (>L:Pky_FlasherUpdate, number)
       (P:ZULU TIME, number) 1000 *  100 + (>L:Pky_FlasherOff, number)
       
       (A:LIGHT BEACON,bool) 1 == if{
           1  (>L:Pky_RFLASH, number)
       }
       els{
           0  (>L:Pky_RFLASH, number)
       }
       0  (>L:Pky_WFLASH, number)
       0  (>L:Pky_WLFLASH, number)

       (A:LIGHT STROBE,bool) 1 == if{
          (P:ZULU TIME, number) 1000 *  500 + (>L:Pky_WLFlasherOn, number)
          (P:ZULU TIME, number) 1000 *  525 + (>L:Pky_WFlasherOn, number)
       }

   }
   (L:Pky_FlasherOff, number)  (P:ZULU TIME, number) 1000 *  &lt;
   (L:Pky_RFLASH, number) 1 == &amp;  if{
       0  (>L:Pky_RFLASH, number)
   }
   (A:LIGHT STROBE,bool) 1 == if{
      (L:Pky_WFlasherOn, number)  (P:ZULU TIME, number) 1000 * &lt;
       (L:Pky_WFLASH, number) 0 == &amp;  if{
           1  (>L:Pky_WFLASH, number)
           (P:ZULU TIME, number) 1000 *  50 + (>L:Pky_WFlasherOff, number)
       }
       (L:Pky_WFlasherOff, number)  (P:ZULU TIME, number) 1000 * &lt;
       (L:Pky_WFLASH, number) 1 == &amp;  if{
           -1  (>L:Pky_WFLASH, number)
       }
       (L:Pky_WLFlasherOn, number)  (P:ZULU TIME, number) 1000 * &lt;
       (L:Pky_WLFLASH, number) 0 == &amp;  if{
           1  (>L:Pky_WLFLASH, number)
           (P:ZULU TIME, number) 1000 *  100 + (>L:Pky_WLFlasherOff, number)
       }
       (L:Pky_WLFlasherOff, number)  (P:ZULU TIME, number) 1000 * &lt;
       (L:Pky_WLFLASH, number) 1 == &amp;  if{
           -1  (>L:Pky_WLFLASH, number)
       }
   }
   
}
els{
    
    (L:Pky_RFLASH, number) 1 == if{
    0  (>L:Pky_RFLASH, number)
    }
    (L:Pky_WFLASH, number) 1 == if{
    0  (>L:Pky_WFLASH, number)
    }
    (L:Pky_WLFLASH, number) 1 == if{
    0  (>L:Pky_WLFLASH, number)
    }
}

</Value>
</Select>
</Element>  
</Gauge>
