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

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

(P:ZULU TIME, seconds)  (L:Pky_SEAUpdate, number) 61 +   &gt; if{
 0  (>L:Pky_SEAUpdate, number)
}
els{
(P:ZULU TIME, seconds)  (L:Pky_SEAUpdate, number) 61 -   &lt; if{
 0  (>L:Pky_SEAUpdate, number)
    }
}
(L:Pky_SEAUpdate, number)  (P:ZULU TIME, seconds)  &lt; if{
(P:ZULU TIME, seconds) 60 + (>L:Pky_SEAUpdate, number)

      (P:ZULU TIME, hours) 12 / 3.14159265 * (A:PLANE LONGITUDE, radians) + 3.14159265 - (>G:Var1)
      -0.40927971 360 365 / (P:ZULU DAY OF YEAR, number) 10 + * 180 / 3.14159265 * cos * (>G:Var2)
      (A:PLANE LATITUDE, radians) (>G:Var3)
      (G:Var1) cos (G:Var2) cos * (G:Var3) cos * (G:Var2) sin (G:Var3) sin * + asin 
      3.14159265 / 180 *
      (>L:PkySEA, number)

      (L:PkySEA, number) 6 &lt; if{
        1  (>L:PkyDUSKVISIBLE, number)
      }
      els{
        0  (>L:PkyDUSKVISIBLE, number)
      }
      
      (L:PkySEA, number) 7.5 &lt; if{
        1  (>L:PkyLandingSplash, number)
        1  (>L:PkyTaxiSplash, number)
        1  (>L:PkyLogoSplash, number)
      }
      els{
        0  (>L:PkyLandingSplash, number)
        0  (>L:PkyTaxiSplash, number)
        0  (>L:PkyLogoSplash, number)
      }
}
</Value>
</Select>
</Element>  
</Gauge>
