Howto:Implement wing flex: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
No edit summary
m (Add Citation II to the list of implementations)
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[File:747-400_wing_flex.jpg|thumb|270px|Wing flex as seen on the [[Boeing 747-400]].]]
[[File:747-400_wing_flex.jpg|thumb|270px|Wing flex as seen on the [[Boeing 747-400]].]]


'''Wing flex''' is the flexing of wings on [[aircraft]], due to lift and fuselage load. [[FlightGear]] is able to show realistic wing flex. Currently the [[Boeing 787]], [[Airbus A330-200|A330-200]], [[Boeing 747-400|747-400]], and [[Bombardier CRJ-900|CRJ-900]] are equipped with flexing wings.
'''Wing flex''' is the flexing of wings on [[aircraft]], due to lift and fuselage load. [[FlightGear]] is able to show realistic wing flex. Currently the [[Boeing 787]], [[Airbus A330-200|A330-200]], [[Boeing 747-400|747-400]], [[Cessna_550_Citation_II|Citation II]] and [[Bombardier CRJ-900|CRJ-900]] are equipped with flexing wings.
 
This article describes a simple approach to model static wing flex. Using this approach, the wing will bend realistically under load, but it will not oscillate after load changes, e.g., on hard touchdown. For a more sophisticated model for dynamic wing flex, please see the [[Wingflexer|Wingflexer article]].


== Model ==
== Model ==
Line 11: Line 13:
The following lines have to be added to the aircraft model .xml file. These lines are used with three wing sections, and a [[JSBSim]] [[FDM]].
The following lines have to be added to the aircraft model .xml file. These lines are used with three wing sections, and a [[JSBSim]] [[FDM]].


<source>
<syntaxhighlight lang="xml">
  <animation>
  <animation>
   <type>rotate</type>
   <type>rotate</type>
Line 68: Line 70:
   </axis>
   </axis>
  </animation>
  </animation>
</source>
</syntaxhighlight>


You probably need to add a lot more objects to each section (like engines, flaps, ailerons etc.) and also change the ''center'' coordinates according to your aircraft. For the right wing, just change the sign of the center <y-m> coordinate and the factor value.
You probably need to add a lot more objects to each section (like engines, flaps, ailerons etc.) and also change the ''center'' coordinates according to your aircraft. For the right wing, just change the sign of the center <y-m> coordinate and the factor value.
Line 77: Line 79:
=== YASim ===
=== YASim ===
[[YASim]] does not calculate wingflex as nice as JSBSim, but a pretty realistic effect can be reached by using the <tt>accelerations/pilot-g[0]</tt> property instead.
[[YASim]] does not calculate wingflex as nice as JSBSim, but a pretty realistic effect can be reached by using the <tt>accelerations/pilot-g[0]</tt> property instead.
== Related content ==
* [[Wingflexer]] – A newer way to add wing flex, though it still need to be animated much like here


[[es:Howto: Implement wing flex]]
[[es:Howto: Implement wing flex]]
[[Category:Aircraft enhancement|Implement wing flex]]
[[Category:Aircraft enhancement|Implement wing flex]]
[[Category:Howto|Implement wing flex]]
[[Category:Howto|Implement wing flex]]

Revision as of 06:58, 25 March 2017

Wing flex as seen on the Boeing 747-400.

Wing flex is the flexing of wings on aircraft, due to lift and fuselage load. FlightGear is able to show realistic wing flex. Currently the Boeing 787, A330-200, 747-400, Citation II and CRJ-900 are equipped with flexing wings.

This article describes a simple approach to model static wing flex. Using this approach, the wing will bend realistically under load, but it will not oscillate after load changes, e.g., on hard touchdown. For a more sophisticated model for dynamic wing flex, please see the Wingflexer article.

Model

A few edits have to be made to the aircraft model. Each wing has to be cut into multiple sections. The more sections, the smoother the wing flex. Be carefull that you do not cut through flaps or engines. Naming our wing sections, from fuselage to wing tip: wing.1, wing.2 and wing.3.

Measure the coordinates of the start of each new wing section, you will need them to animate the wings.

Animation

The following lines have to be added to the aircraft model .xml file. These lines are used with three wing sections, and a JSBSim FDM.

 <animation>
  <type>rotate</type>
  <object-name>LeftWing.1</object-name>
  <object-name>LeftWing.2</object-name>
  <object-name>LeftWing.3</object-name>
  <property>fdm/jsbsim/aero/coefficient/CLalpha</property>
  <factor>-0.0000045</factor>
  <offset-deg>0</offset-deg>   
  <center>
   <x-m> 0.00</x-m>
   <y-m>-4.00</y-m>
   <z-m>-1.70</z-m>
  </center>
  <axis>
   <x>1.0</x>
   <y>0.0</y>
   <z>0.0</z>
  </axis>
 </animation>
 
 <animation>
  <type>rotate</type>
  <object-name>LeftWing.2</object-name>
  <object-name>LeftWing.3</object-name>
  <property>fdm/jsbsim/aero/coefficient/CLalpha</property>
  <factor>-0.0000045</factor>
  <offset-deg>0</offset-deg>   
  <center>
   <x-m> 0.00</x-m>
   <y-m>-8.00</y-m>
   <z-m>-1.50</z-m>
  </center>
  <axis>
   <x>1.0</x>
   <y>0.0</y>
   <z>0.0</z>
  </axis>
 </animation>
 
 <animation>
  <type>rotate</type>
  <object-name>LeftWing.3</object-name>
  <property>fdm/jsbsim/aero/coefficient/CLalpha</property>
  <factor>-0.0000045</factor>
  <offset-deg>0</offset-deg>
  <center>
   <x-m>  0.00</x-m>
   <y-m>-12.25</y-m>
   <z-m> -1.25</z-m>
  </center>
  <axis>
   <x>1.0</x>
   <y>0.0</y>
   <z>0.0</z>
  </axis>
 </animation>

You probably need to add a lot more objects to each section (like engines, flaps, ailerons etc.) and also change the center coordinates according to your aircraft. For the right wing, just change the sign of the center <y-m> coordinate and the factor value.

JSBSim

JSBSim calculates the lift force of the aircraft. The lift reacts on the G-forces, the velocity and turbulences. The respective property is: fdm/jsbsim/aero/coefficient/CLalpha

YASim

YASim does not calculate wingflex as nice as JSBSim, but a pretty realistic effect can be reached by using the accelerations/pilot-g[0] property instead.

Related content

  • Wingflexer – A newer way to add wing flex, though it still need to be animated much like here