Board index FlightGear Development Aircraft Systems

Attention: JSBSim ground reactions code

Modeling aircraft systems, like electrical stuff, hydraulics, pneumatics? Feel free to ask support.

Attention: JSBSim ground reactions code

Postby erik » Sun Feb 09, 2014 2:00 pm

This is a heads up for JSBSim aircraft maintainers that user their own ground detection and handling code.
As of today JSBSim, just like YASim, supports ground effects like bumpiness, solid-ground detection and adjusting of friction actors.

Actually JSBSim supports an extra feature, BOGEY contact points sink in a non-solid ground surface but STRUCTURE contact point do not, making it easy to define floats using STRUCTURE contact points.

In order not to pollute /fdm/jsbim too much I've added the following properties:

/sim/fdm/surface/override-level
A user defined property which if defined and set to a something higher than 0 will disable the JSBSim ground reactions code completely and the following properties are set to false:
/sim/fdm/surface/active
/sim/fdm/surface/valid

Otherwise the following applies:
/sim/fdm/surface/active
* is set to true

/sim/fdm/surface/valid
* is set to true if there is a valid material available or set to false otherwise (the material defaults are set).

The following properties are set to their respective values:

/fdm/jsbsim/ground/solid
* flag which defines if the surface is solid not

/fdm/jsbsim/ground/bumpiness
* defines the bumpiness factor

/fdm/jsbsim/ground/maximum-force-lbs
* maximum allowed force for this surface

/fdm/jsbsim/ground/rolling_friction-factor
* rolling friction factor - applies to rolling friction

/fdm/jsbsim/ground/static-friction-factor
* static friction factor - applies to static friction and dynamic friction

These properties are also set for the appropriate gear and contact units.

If you want to keep your old behaviour just set sim/fdm/surface/override-level to 1 somewhere in the configuration files, for Nasal this becomes:
setprop("sim/fdm/surface/override-level", 1);

I've updated the Nasal code for the following aircraft in the base package:
Aircraft/Alouette-III/Systems/terrain.nas
Aircraft/Cap10C/Nasal/cap10c.nas
Aircraft/DR400-dauphin/Nasal/dr400.nas
Aircraft/DR400/Nasal/dr400.nas
Aircraft/F-8E-Crusader/Systems/terrain.nas
Aircraft/JA37/Nasal/crash.nas
Aircraft/MiG-15/Nasal/MiG-15bis.nas
Aircraft/Noratlas/Systems/terrain.nas
Aircraft/P-38-Lightning/Systems/terrain.nas
Aircraft/PBY-Catalina/Systems/terrain.nas
Aircraft/PC-6/Nasal/pc6-b2h4.nas
Aircraft/SR71-BlackBird/Systems/terrain.nas
Aircraft/VMX22-Osprey/Nasal/terrain_under.nas
Aircraft/Short_Empire/Systems/mooring.nas


Not that some of these might actually be YASim aircraft but YASim will just ignore the property.
erik
 
Posts: 1789
Joined: Thu Nov 01, 2007 1:41 pm

Re: Attention: JSBSim ground reactions code

Postby Gijs » Sun Feb 09, 2014 2:16 pm

Thanks for working on this Erik; it's been a long standing feature request! I've added a short pointer to our aircraft maintenance wiki, so aircraft authors (including those not in fgdata) can find what to do.

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9374
Joined: Tue Jul 03, 2007 2:55 pm
Location: Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: Attention: JSBSim ground reactions code

Postby erik » Sun Feb 09, 2014 2:25 pm

Good idea, thanks!
erik
 
Posts: 1789
Joined: Thu Nov 01, 2007 1:41 pm


Return to Systems

Who is online

Users browsing this forum: Husky Dynamics and 1 guest