JSBSim vs YASim: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(Created page.)
 
(Changed wording)
Line 11: Line 11:
== YASim ==
== YASim ==


YASim uses a solver-based approach to aerodynamics; you lay out the physical characteristics of the aircraft (such as its wings, fuselage, engines, stabilizers, etc.) as well as its flying characteristics (cruise speed and altitude, the [[angle of attack]] during landing) and YASim attempts to solve for the given configuration. It's not always successful (since there are many possible aerodynamic solutions for a given set of parameters) and it's generally not accurate unless it's been iteratively fine-tuned by the author to match the performance of the real-life aircraft.
YASim uses a solver-based approach to aerodynamics; you lay out the physical characteristics of the aircraft (such as its wings, fuselage, engines, stabilizers, etc.) as well as its flying characteristics (cruise speed and altitude, the angle of attack during landing) and YASim attempts to solve for the given configuration. It's not always successful (since there are many possible aerodynamic solutions for a given set of parameters) and it's generally not too accurate unless it's been iteratively fine-tuned by the author to match the performance of the real-life aircraft.


== JSBSim ==
== JSBSim ==
Line 23: Line 23:
# Do you have wind-tunnel data for the aircraft in question? If so, use JSBSim.
# Do you have wind-tunnel data for the aircraft in question? If so, use JSBSim.
# Is this your first FDM? If so, use YASim.
# Is this your first FDM? If so, use YASim.
# Are you frustrated with YASim's open-endedness? If so, use JSBSim.
# Do you dislike YASim's open-ended solver? If so, use JSBSim.
# Are you frustrated with JSBSim's complexity? If so, use YASim.
# Do you dislike JSBSim's necessary reams of data? If so, use YASim.
# See 3.
# See 3.


In the end, it really doesn't matter which one you use --- just pick one and use it. It's not a life-or-death decision.
In the end, it really doesn't matter which one you use --- just pick one and use it. It's not a life-or-death decision.

Revision as of 02:14, 12 March 2015

JSBSim and YASim are the two most commonly used flight dynamics models used within FlightGear. They each have their pros and cons; they'll be discussed here.

Accuracy and realism

Accuracy and realism of the flight dynamics model are two common points raised in the argument against YASim. In reality, if you give YASim or JSBSim garbage parameters, they'll both return garbage aerodynamics. The accuracy of the algorithm is constrained by its input.

YASim and JSBSim have different problems with regards to accurately emulating a real-life aircraft. Since YASim is solver-based, you do not need wind-tunnel data or accurate tables of propeller performance; you simply tell it some basic aircraft parameters and it will attempt to find a solution that approximates the aircraft's aerodynamics model. JSBSim uses detailed tables of performance and lift/drag numbers instead; JSBSim has no concept of wings or fuselage. Instead, drag, lift, and other forces are computed as functions of alpha (pitch), beta (yaw), control deflection, flap deflection, etc. This means that JSBSim needs accurate data to produce an accurate flight model.

Both YASim and JSBSim have their niche; YASim is simpler to get started with but it's not as easily matched to a real aircraft's performance, while JSBSim is much more difficult to use but is more controllable.

YASim

YASim uses a solver-based approach to aerodynamics; you lay out the physical characteristics of the aircraft (such as its wings, fuselage, engines, stabilizers, etc.) as well as its flying characteristics (cruise speed and altitude, the angle of attack during landing) and YASim attempts to solve for the given configuration. It's not always successful (since there are many possible aerodynamic solutions for a given set of parameters) and it's generally not too accurate unless it's been iteratively fine-tuned by the author to match the performance of the real-life aircraft.

JSBSim

JSBSim, on the other hand, uses a data-driven approach to flight dynamics. If it were given all the proper tables for the real-life aircraft it's simulating (which is effectively impossible), it will produce perfectly realistic dynamics; if you wanted to, you could simulate a brick. It's commonly used for older aircraft with published performance data; it's very difficult to create a JSBSim FDM without any wind-tunnel data.

Which one should I use?

Continue down until you answer 'yes'.

  1. Do you have wind-tunnel data for the aircraft in question? If so, use JSBSim.
  2. Is this your first FDM? If so, use YASim.
  3. Do you dislike YASim's open-ended solver? If so, use JSBSim.
  4. Do you dislike JSBSim's necessary reams of data? If so, use YASim.
  5. See 3.

In the end, it really doesn't matter which one you use --- just pick one and use it. It's not a life-or-death decision.