<!-- This guage is for Tds 737V2 gear action   -->
<Gauge Name="Tdsgearheight" Version="1.0">
<copyright>(c)2013 Hiroshi Igami</copyright>

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



(A:PLANE ALT ABOVE GROUND, meter) 20 &lt; if{

<!-- Nose gear action   -->
    2.58  (A:PLANE ALT ABOVE GROUND, meter) - 
    (A:PLANE PITCH DEGREES, radian)  tan  13.674  * + 
    321.5434 * 100 + 
    200 min 100 max
    (>L:TdsNOSEGEARHEIGHT,percent) 

<!-- Calculate bank offset  -->
<!-- s3 = Main Gear pole height difference by bank angle  -->
    (A:PLANE BANK DEGREES, radian) s8 pi &gt; if{
      l8 pi 2 * -  tan 3.334 *
    }
    els{
      l8  tan 3.334 *
    }
    <!--        (A:ATTITUDE INDICATOR BANK DEGREES, radian)  tan  3.334 *        -->
    s3

<!-- Gear pole action   -->
<!-- s1 = Main Gear pole height without bank angle  -->
    2.9720  (A:PLANE ALT ABOVE GROUND, meter) - 
    (A:PLANE PITCH DEGREES, radian)  tan  1.068 * - 
    l3 +
    233.1 * 100 + 
    200 min 100 max
    
    (>L:TdsLEFTGEARHEIGHT,percent)
    
    2.9720  (A:PLANE ALT ABOVE GROUND, meter) - 
    (A:PLANE PITCH DEGREES, radian)  tan  1.068 * - 
    l3 -
    233.1 * 100 + 
    200 min 100 max
    (>L:TdsRightGEARHEIGHT,percent) 
    
}
els{
    100 (>L:TdsNOSEGEARHEIGHT,percent) 
    100 (>L:TdsRIGHTGEARHEIGHT,percent)
    100 (>L:TdsLEFTGEARHEIGHT,percent)
}


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