<!-- 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) 

<!-- +++++++++++++++++++ -->
<!-- Left spoiler Effect -->
<!-- +++++++++++++++++++ -->
1 (A:SPOILERS LEFT POSITION,number) -
(>L:TdsLEFTSPOILEREFFECT,number) 


<!-- +++++++++++++++++++ -->
<!-- RIGHT spoiler Effect -->
<!-- +++++++++++++++++++ -->
1 (A:SPOILERS RIGHT POSITION,number) -
(>L:TdsRIGHTSPOILEREFFECT,number) 


<!-- +++++++++++++++++++ -->
<!--         Wingroot    -->
<!-- +++++++++++++++++++ -->
(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent) max
0.002 * 
(L:TdsLEFTSPOILEREFFECT,number)  (L:TdsLEFTSPOILEREFFECT,number)  max *

1 +    
(A:AIRSPEED INDICATED,knot) *

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

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


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

(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
0.002 * 
(L:TdsLEFTSPOILEREFFECT,number) *
1 + 

(A:RELATIVE WIND VELOCITY BODY Y,knot) 3 * 
(A:RELATIVE WIND VELOCITY BODY X,knot) 2 * +
(L:TdsGROUNDWIND,enum) * 
(A:AIRSPEED INDICATED,knot) +   *

(A:PLANE PITCH DEGREES, degree) -6.66 * +

<!-- ++++++++++++++++++++++++++++++++++++++ -->
<!-- Change the flex by aircraft's weight   -->
<!-- Half is changeable                     -->
<!-- ++++++++++++++++++++++++++++++++++++++ -->
2 / s1
l1 (L:TdsWEIGHTPERCENT,enum)  * l1 +

<!-- +++++++++++++++++++++++++++++++ -->
<!-- Ground Wind Effect x 1.0to 1.2  -->
<!-- +++++++++++++++++++++++++++++++ -->
(L:TdsGROUNDEFFECT,enum) * 

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


<!-- +++++++++++++++++++ -->
<!--    Right Mid Flex   -->
<!-- +++++++++++++++++++ -->

(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent)
0.002 * 
(L:TdsRIGHTSPOILEREFFECT,number) *
1 + 

(A:RELATIVE WIND VELOCITY BODY Y,knot) 3 *
(A:RELATIVE WIND VELOCITY BODY X,knot) 2 * -
(L:TdsGROUNDWIND,enum) * 
(A:AIRSPEED INDICATED,knot) +   *

(A:PLANE PITCH DEGREES, degree) -6.66 * +

<!-- ++++++++++++++++++++++++++++++++++++++ -->
<!-- Change the flex by aircraft's weight   -->
<!-- Half is changeable                     -->
<!-- ++++++++++++++++++++++++++++++++++++++ -->
2 / s2
l2 (L:TdsWEIGHTPERCENT,enum)  * l2 +

<!-- +++++++++++++++++++++++++++++++ -->
<!-- Ground Wind Effect x 1.0to 1.2  -->
<!-- +++++++++++++++++++++++++++++++ -->
(L:TdsGROUNDEFFECT,enum) * 

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



<!-- +++++++++++++++++++ -->
<!--     Left Tip Flex   -->
<!-- +++++++++++++++++++ -->

(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
0.002 * 
(L:TdsLEFTSPOILEREFFECT,number) *
1 + 

(A:RELATIVE WIND VELOCITY BODY Y,knot) 2 * 
(A:RELATIVE WIND VELOCITY BODY X,knot) 1 * +
(L:TdsGROUNDWIND,enum) * 
(A:AIRSPEED INDICATED,knot) +   *

(A:PLANE PITCH DEGREES, degree) -6.66 * +

<!-- ++++++++++++++++++++++++++++++++++++++ -->
<!-- Change the flex by aircraft's weight   -->
<!-- Half is changeable                     -->
<!-- ++++++++++++++++++++++++++++++++++++++ -->
2 / s3
l3 (L:TdsWEIGHTPERCENT,enum)  * l3 +

<!-- +++++++++++++++++++++++++++++++ -->
<!-- Ground Wind Effect x 1.0to 1.2  -->
<!-- +++++++++++++++++++++++++++++++ -->
(L:TdsGROUNDEFFECT,enum) * 

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


<!-- +++++++++++++++++++ -->
<!--    Right Mid Flex   -->
<!-- +++++++++++++++++++ -->

(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent)
0.002 * 
(L:TdsRIGHTSPOILEREFFECT,number) *
1 + 

(A:RELATIVE WIND VELOCITY BODY Y,knot) 2 *
(A:RELATIVE WIND VELOCITY BODY X,knot) 1 *  -
(L:TdsGROUNDWIND,enum) * 
(A:AIRSPEED INDICATED,knot) +   *

(A:PLANE PITCH DEGREES, degree) -6.66 * +

<!-- ++++++++++++++++++++++++++++++++++++++ -->
<!-- Change the flex by aircraft's weight   -->
<!-- Half is changeable                     -->
<!-- ++++++++++++++++++++++++++++++++++++++ -->
2 / s4
l4 (L:TdsWEIGHTPERCENT,enum)  * l4 +

<!-- +++++++++++++++++++++++++++++++ -->
<!-- Ground Wind Effect x 1.0to 1.2  -->
<!-- +++++++++++++++++++++++++++++++ -->
(L:TdsGROUNDEFFECT,enum) * 

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


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





