<!-- This guage is for Tds787Wings mid flex    -->
<Gauge Name="TdsWingflex" Version="1.0">
<copyright>(c)2012 Hiroshi Igami</copyright>

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

<!-- +++++++++++++ -->
<!-- Ground Effect -->
<!-- +++++++++++++ -->
(A:PLANE ALT ABOVE GROUND, meter)  70 &lt; if{
    1 (A:PLANE ALT ABOVE GROUND, meter)  70 / - 2 * 0 max 2 min 10 + 10 /
}
els{
    1
}
(>L:TdsGROUNDEFFECT,enum) 

<!-- +++++++++++++++ -->
<!-- Weight Percent  -->
<!-- +++++++++++++++ -->
(A:TOTAL WEIGHT,kilogram) (A:EMPTY WEIGHT,kilogram) -
(A:MAX GROSS WEIGHT,kilogram) (A:EMPTY WEIGHT,kilogram)  - 
 /
(>L:TdsWEIGHTPERCENT,enum) 

<!-- +++++++++++++++++++ -->
<!-- Ground Wind Effect  -->
<!-- +++++++++++++++++++ -->
(A:PLANE ALT ABOVE GROUND, meter)  60 /   0 max 1 min 
(>L:TdsGROUNDWIND,enum) 







<!-- +++++++++++++++++++ -->
<!--         Wingroot    -->
<!-- +++++++++++++++++++ -->
(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent) max
0.002 * 1 +    
(A:AIRSPEED INDICATED,knot) *

2 / s0
l0 (L:TdsWEIGHTPERCENT,enum)  * l0 +

(L:TdsGROUNDEFFECT,enum) *
0 max 500 min
(>L:TDSWINGROOTFLEX, percent) 0 max 500 min


<!-- +++++++++++++++++++ -->
<!--     Left Mid Flex   -->
<!-- +++++++++++++++++++ -->

(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
0.002 * 
1 + 
(A:AIRSPEED INDICATED,knot) *
(A:PLANE PITCH DEGREES, degree) -6.66 * +

2 / s1
l1 (L:TdsWEIGHTPERCENT,enum)  * l1 +

(L:TdsGROUNDEFFECT,enum) *
(A:RELATIVE WIND VELOCITY BODY Y,knot) 10 * 
(A:RELATIVE WIND VELOCITY BODY X,knot) 2 * + 
(L:TdsGROUNDWIND,enum) * +



 0 max 500 min
(>L:TdsB8LWINGMIDFLEX, percent) 0 max 500 min



<!-- +++++++++++++++++++ -->
<!--    Right Mid Flex   -->
<!-- +++++++++++++++++++ -->
(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent)
0.002 * 
1 + 
(A:AIRSPEED INDICATED,knot) *
(A:PLANE PITCH DEGREES, degree) -6.66 * +

2 / s2
l2 (L:TdsWEIGHTPERCENT,enum)  * l2 +


(L:TdsGROUNDEFFECT,enum) *
(A:RELATIVE WIND VELOCITY BODY Y,knot) 10 * 
(A:RELATIVE WIND VELOCITY BODY X,knot) 2 * - 
(L:PkyGROUNDWIND,enum) * +


0 max 500 min
(>L:TdsB8RWINGMIDFLEX, percent) 0 max 500 min


<!-- +++++++++++++++++++ -->
<!--     Left Tip Flex   -->
<!-- +++++++++++++++++++ -->
(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
0.002 * 
1 + 
(A:AIRSPEED INDICATED,knot) *
(A:PLANE PITCH DEGREES, degree) -6.66 * +

2 / s3
l3 (L:TdsWEIGHTPERCENT,enum)  * l3 +

(L:TdsGROUNDEFFECT,enum) *
(A:RELATIVE WIND VELOCITY BODY Y,knot) 9 * 
(A:RELATIVE WIND VELOCITY BODY X,knot) 3 * + 
(L:TdsGROUNDWIND,enum) * +


0 max 500 min
(>L:TdsB8LWINGTIPFLEX, percent) 0 max 500 min

<!-- +++++++++++++++++++ -->
<!--    Right Tip Flex   -->
<!-- +++++++++++++++++++ -->
(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent) 
0.002 * 
1 + 
(A:AIRSPEED INDICATED,knot) *
(A:PLANE PITCH DEGREES, degree) -6.66 * +
(L:TdsGROUNDEFFECT,enum) *
(A:RELATIVE WIND VELOCITY BODY Y,knot) 9 * 
(A:RELATIVE WIND VELOCITY BODY X,knot) 3 * - 
(L:PkyGROUNDWIND,enum) * +

0 max 500 min
(>L:TdsB8RWINGTIPFLEX, percent) 0 max 500 min


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