Howto:JSBSim FDM for gliders

From FlightGear wiki
Jump to: navigation, search
WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.

This article is meant to guide you throw the steps needed to create a basic JSBSim FDM (Flight Dynamics model) for a glider aircraft. Of course there are various different ways this can be done and this is only one of them, shared with the hope that it might be helpful for others.

Aeromatic

A good starting point to creating a somewhat realistic FDM is Aeromatic. For better results it is recommended to use the C++ version of it, aeromatiC++. Make sure to have the inputs as exactly as possible and leave as little as possible empty (=aeromatic guesses for you).

Basic geometric aircraft information as well as some performance data can usually be found in the aircraft's Pilot Operating Handbook, google will give you results for all the more well-known aircraft, sometimes also the manufacturer offers a download on their website. In case you can't find a handbook, politely asking the manufacturer via their contact form/email might get you one. As a last resort, mostly because the information is not verified, wikipedia or enthusiast's websites can help you out.

Adjusting aeromatic's output

Aeromatic will give you the aircraft's definition file (.xml) as an output, along with the necessary system files if you selected that option while running aeromatic. In the following part, we will cover the parts of said file that should be adjusted:

Important: Always check that the unit of the value you are editing and change it if needed

<metrics> Section

see also JSBSim_Aerodynamics#Metrics
  • The upper part of the metrics section should be correctly filled out by aeromatic and will only need to be adjusted if you find better (i.e. more accurate) data. Note: wing incidence is a pretty critical value. If you can't find reliable information about this, you can guess it from a good/accurate drawing, but keep in mind for later flight testing, that this value might need to be adjusted.
  • The first thing that really needs to be adjusted is the AeroRP. Most often, there will be no specific information about this available, but there are several ways of reaching a realistic solution.

AeroRP - the CoG approach

If you have the POH for your glider available, there is normally a CoG table or diagram in the Mass and Balance section. As for conventional aircraft, the CoG always has to be in front of the AeroRP, but at the same time especially competition glider pilots want them to be as close together as possible to keep the moments in level flight as small as possible, it's often a good guess to set the AeroRP laterally (x-direction) a bit (e.g. a few centimeters for normal gliders) behind the aftmost allowed CoG. Vertically, for a straight-wing aircraft the AeroRP should be located somewhere in the middle of the wing. For most gliders, the offset in y-direction should be 0.

AeroRP - the geometric approach

WIP.png Work in progress
This article or section will be worked on in the upcoming hours or days.
See history for the latest developments.
  • After the AeroRP, there should be a location for the eyepoint. Self-explanatory, set this to be the eyepoint of your glider pilot, measuring in blender is at least for me the way to go here.
  • Lastly comes the VRP or Vehicle Reference Point. I'd suggest keeping this at 0 0 0 unless you have a good reason to change it, as having the 3d-model offsetted from your FDM model might and probably will cause some headache when comparing coordinates etc., especially when following this howto, because it relies on measuring coordinates several times.

Mass and Balance

see also JSBSim_Mass_and_balance

This is the second main block and is of equal critical importance.

  • The inertia values ixx, iyy, izz have probably been calculated by aeromatic for you. At least I have never found sources concerning the inertia values of specific aircraft. You might want to compare them to the values of similar aircraft to see whether they are in the same scale. There are also spreadsheet methods to calculate more profound values.
  • emptywt is filled with the value you had put into aeromatic, so this as well only needs to be changed when you find more accurate information.
  • Next comes the CG (CoG, Center of Gravity). It is a very critical location for the stability and behaviour of your glider. Please note that the one set here is the CoG for the empty aircraft, so for a typical configuration, it is well behind the inflight CoG and usually also is behind the AeroRP. If you have the in-flight CoG given for a typical load, you can calculate the empty CoG pretty easily.
  • The following are pointmasses and should be self-explanatory. Typical blocks to put here are "pilot", "copilot", "trim ballast", "wing ballast", if applicable.

Ground Reactions

see also JSBSim GroundReactions

This is the part where most things outputted from aeromatic are wrong and therefor need to be adjusted. While aeromatic always assumes a "triangle" gear setup, either with a tail or a front wheel, depending on your input, normal gliders will have all gear contact points aligned in a row (when seen from above) with additional skids or wheels on the wingtips. Locations are best measured from blender again. Even if there is no nose skid, there should be a contact point set somewhere on the nose belly to prevent the aircraft doing crazy stuff when breaking too hard. Skids and fuselage contact points should use the STRUCTURE type while any wheels should use type="BOGEY". All other things to observe here are explained in the corresponding wiki article.

Propulsion

This section can be empty for a glider. In case you are modelling a motor glider, refer to the wiki article.