YASim: Difference between revisions

Jump to navigation Jump to search
7,420 bytes added ,  18 April 2017
Line 369: Line 369:
The following is under development and hopefully finds its way into FG version 2017.2
The following is under development and hopefully finds its way into FG version 2017.2


=== XML parser support for metric and imperial units ===
=== XML parser ===
==== support for metric and imperial units ====
To make life easier for aircraft developers, the parser supports new additional attributes with a unit suffix, e.g. speed-kt for knots and speed-kmh for kilometers per hour.
To make life easier for aircraft developers, the parser supports new additional attributes with a unit suffix, e.g. speed-kt for knots and speed-kmh for kilometers per hour.
* <code><airplane {mass, mass-lbs, mass-kg}="12345" ></code>
* <code><airplane {mass, mass-lbs, mass-kg}="12345" ></code>
Line 380: Line 381:


{{Note|Aircraft using this new attributes will not run on older versions of FlightGear, so it is probably wise to publish those only after a reasonable number of users switched version 2017.2 or newer.}}
{{Note|Aircraft using this new attributes will not run on older versions of FlightGear, so it is probably wise to publish those only after a reasonable number of users switched version 2017.2 or newer.}}
==== CG tuning help ====
{{Note| The feature described in this section is not fully implemented yet, however, it may be of some help already.
It is currently implemented for the yasim CLI tool only. It does not affect the airplane behaviour while running FlightGear. }}
New attributes have been added to <airplane> to assist tuning the center of gravity (CG).
The CG position is often expressed relative to the [https://en.wikipedia.org/wiki/Chord_(aeronautics)#Mean_aerodynamic_chord MAC] of the wing in percent. You can specify a desired range for CG in % relative to MAC, it will show up in the output of the yasim CLI tool (see example below):
* cg-min: default 25% (just a guess, better numbers are welcome)
* cg-max: default 30% (just a guess, better numbers are welcome)
* auto-ballast: not implemented yet
{{Note| By convention 0% is leading edge, 100% is trailing edge, however the absolute values on x-axis are the other way round, e.g. nose is +x, tail is -x }}
{{warning|The MAC calculation currently works only on the <wing> element. Numbers will be wrong, if your model uses a combination of <wing> and <mstab> to build a wing with two or more segments.}}
YASim will print the leading edge coordinates of the MAC (x,y) and its length.
'''Example output'''
<pre>
$ yasim Citation-II-yasim.xml
This aircraft uses yasim version '2017.2'                                                                                                                                                                                                                                     
==========================                                                                                                                                                                                                                                                   
= YASim solution results =                                                                                                                                                                                                                                                   
==========================                                                                                                                                                                                                                                                   
      Iterations: 2210                                                                                                                                                                                                                                                       
Drag Coefficient: 12.304669                                                                                                                                                                                                                                                 
      Lift Ratio: 85.317558                                                                                                                                                                                                                                                 
      Cruise AoA: 4.016746 deg                                                                                                                                                                                                                                               
  Tail Incidence: -3.053278 deg                                                                                                                                                                                                                                             
Approach Elevator: -0.377542                                                                                                                                                                                                                                                 
                                                                                                                                                                                                                                                                             
              CG: x:-6.543, y:-0.000, z:0.044                                                                                                                                                                                                                               
    Wing MAC (*1): x:-6.00, y:3.83, length:2.0                                                                                                                                                                                                                               
    CG-x rel. MAC: 0.272                                                                                                                                                                                                                                                     
    CG-x  desired: -6.599 < -6.543 < -6.198                                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                                             
Inertia tensor [kg*m^2], origo at CG:                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                             
  18009.289,  -0.000, 7120.470                                                                                                                                                                                                                                               
  -0.000, 42459.316,  0.000                                                                                                                                                                                                                                                 
  7120.470,  0.000, 56980.656                                                                                                                                                                                                                                               
                                                                                                                                                                                                                                                                             
(*1) MAC calculation works on <wing> only! Numbers will be wrong for segmented wings, e.g. <wing>+<mstab>.
</pre>


=== Export of YASim internals to property tree ===
=== Export of YASim internals to property tree ===
252

edits

Navigation menu