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

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

<!-- +++++++++++++++++++ -->
<!--     FLAP Effect     -->
<!-- +++++++++++++++++++ -->
(A:TRAILING EDGE FLAPS LEFT PERCENT,percent) 
(A:TRAILING EDGE FLAPS RIGHT PERCENT,percent) max
s0
<!--     FLAP Effect MID -->
 l0
0.0025 * 1 +    
(>L:TdsWINGFLEX_FLAP_EFFECT_MID, percent)

<!--     FLAP Effect TIP -->
l0
0.00125 * 1 +    
(>L:TdsWINGFLEX_FLAP_EFFECT_TIP, percent)


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


<!-- +++++++++++++++++++ -->
<!-- Ground Effect       -->
<!-- +++++++++++++++++++ -->
1 (L:TdsGROUNDWIND,enum)  -  0.2 * 1 +
(>L:TdsGROUNDEFFECT,enum)


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



<!-- +++++++++++++++++++ -->
<!--     Left Mid Flex   -->
<!-- +++++++++++++++++++ -->
(A:AIRSPEED INDICATED,knot) 
(A:PLANE PITCH DEGREES, degree) -3.0 * +
20 (A:SPOILERS LEFT POSITION,number) * -

<!--  Add Wind effect    -->
(A:AIRCRAFT WIND Y,knot) -2.5 * 
(A:AIRCRAFT WIND X,knot)  0.5 * +
(L:TdsGROUNDWIND,enum)  *  +

(L:TdsWINGFLEX_FLAP_EFFECT_MID, percent) *
(L:TdsGROUNDEFFECT,enum) *

(L:TdsWEIGHTPERCENT,enum) *

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


<!-- +++++++++++++++++++ -->
<!--    Right Mid Flex   -->
<!-- +++++++++++++++++++ -->
(A:AIRSPEED INDICATED,knot) 
(A:PLANE PITCH DEGREES, degree) -3.0 * +
20 (A:SPOILERS RIGHT POSITION,number) * -

<!--  Add Wind effect    -->
(A:AIRCRAFT WIND Y,knot) -2.5 * 
(A:AIRCRAFT WIND X,knot)  0.5 * -
(L:TdsGROUNDWIND,enum)  *  +

(L:TdsWINGFLEX_FLAP_EFFECT_MID, percent) *
(L:TdsGROUNDEFFECT,enum) *

(L:TdsWEIGHTPERCENT,enum) *

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


<!-- +++++++++++++++++++ -->
<!--     Left Tip Flex   -->
<!-- +++++++++++++++++++ -->
(A:AIRSPEED INDICATED,knot) 
(A:PLANE PITCH DEGREES, degree) -4.5 * +
20 (A:SPOILERS LEFT POSITION,number) * -

<!--  Add Wind effect    -->
(A:AIRCRAFT WIND Y,knot) -4.5 * 
(A:AIRCRAFT WIND X,knot)  1.5 * +
(L:TdsGROUNDWIND,enum)  *  +

(L:TdsWINGFLEX_FLAP_EFFECT_TIP, percent) *
(L:TdsGROUNDEFFECT,enum) *
(L:TdsWEIGHTPERCENT,enum) *

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


<!-- +++++++++++++++++++ -->
<!--    Right Tip Flex   -->
<!-- +++++++++++++++++++ -->
(A:AIRSPEED INDICATED,knot) 
(A:PLANE PITCH DEGREES, degree) -4.5 * +
20 (A:SPOILERS RIGHT POSITION,number) * -

<!--  Add Wind effect    -->
(A:AIRCRAFT WIND Y,knot)  -4.5 * 
(A:AIRCRAFT WIND X,knot)  1.5 * -
(L:TdsGROUNDWIND,enum)  *  +

(L:TdsWINGFLEX_FLAP_EFFECT_TIP, percent) *
(L:TdsGROUNDEFFECT,enum) *
(L:TdsWEIGHTPERCENT,enum) *

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


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