Board index FlightGear Development Aircraft Flight dynamics model

JSBsim: gear compression

Good sims require good FDMs (the "thing" that makes an aircraft behave like an aircraft).

JSBsim: gear compression

Postby WoodSTokk » Thu Aug 27, 2020 9:14 pm

JSBsim write to
Code: Select all
/gear/gear[n]/compression-ft
but also in
Code: Select all
/gear/gear[n]/compression-norm
.
But JSBsim have no meaning what is normal for that aircraft. If we look closer to it, the '-norm' value is exactly the same value as in '-ft'!
Is it possible to stop JSBsim to write into '-norm', or learn JSBsim whats the normal value for this aircraft is?
WoodSTokk
 
Posts: 565
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: JSBsim: gear compression

Postby wlbragg » Thu Aug 27, 2020 9:40 pm

I think -norm actually should be normalized, as in 0-1 VS an actual force value?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5642
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: JSBsim: gear compression

Postby Johan G » Thu Aug 27, 2020 10:23 pm

wlbragg wrote in Thu Aug 27, 2020 9:40 pm:[...] as in 0-1 VS an actual force value?

Rather as in 0-1 vs. compression in feet (as /gear/gear[n]/compression-ft is compression in feet), I think.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5869
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: JSBsim: gear compression

Postby WoodSTokk » Fri Aug 28, 2020 12:05 am

Thats right. '/gear/gear[n]/compression-ft' is compression in feet. But if we have a gear strut that can travel 2ft, the compression-norm should be 0.5 if the gear is 1ft compressed. But JSBsim copy the -ft value to -norm, so that the -norm value is also 1.0 if the gear is 1ft compressed.

YaSim on the other hand set the values correctly. If the gear can travel 0.6m and is actually compressed to 0.3m, the -norm value is 0.5.
Thats because YaSim know the maximum strut travel, JSBsim dont.

Possible solutions are:
- we add max-travel or max-compression to JSBsim so that JSBsim calculate the -norm value correctly
- JSBsim does not touch the compression-norm value at all (only compression-ft)

In the second case, every aircraft-dev can calculate the norm-value with a simple prop-filter.
The problems arises by working on a aircraft that has both FDMs and the gear animation will only fit for one FDM.
The MP protocol transmit compression-norm by default. In case of an aircraft with 2 FDMs, we can't use this prop (waste of data) and must use another prop that we must transmit additionally to the default (protocol bload).
IMHO it is better we can use the norm-value that is transmitted per default.
WoodSTokk
 
Posts: 565
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: JSBsim: gear compression

Postby wlbragg » Fri Aug 28, 2020 1:14 am

Or contact the jsb some folks and see what's up with it
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5642
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: JSBsim: gear compression

Postby wlbragg » Fri Aug 28, 2020 1:16 am

Or contact the JSBSim folks and see what's up with it and why it's not working as we expect it to.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5642
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: JSBsim: gear compression

Postby Johan G » Fri Aug 28, 2020 2:28 am

wlbragg wrote in Fri Aug 28, 2020 1:16 am:[...] why it's not working as we expect it to.

This. I am no expert, but if JSBSim do not have a normalized value in the -norm property I would consider it a bug. Even more so if it causes headaches that have to be inelegantly worked around.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5869
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: JSBsim: gear compression

Postby AndersG » Fri Aug 28, 2020 6:58 am

Yes, it is a bug but a very very old one. If I recall correctly it was there already in 2004/5 when I started with airship support, but at that time there was only the -norm property but it was showing feet of compression.
Callsign: SE-AG
Aircraft (uhm...): Submarine Scout, Zeppelin NT, ZF Navy free balloon, Nordstern, Hindenburg, Short Empire flying-boat, ZNP-K, North Sea class, MTB T21 class, U.S.S. Monitor, MFI-9B, Type UB I submarine, Gokstad ship, Renault FT.
AndersG
 
Posts: 2474
Joined: Wed Nov 29, 2006 9:20 am
Location: Göteborg, Sweden
Callsign: SE-AG
OS: Debian GNU Linux

Re: JSBsim: gear compression

Postby Johan G » Fri Aug 28, 2020 8:45 am

AndersG wrote in Fri Aug 28, 2020 6:58 am:If I recall correctly it was there already in 2004/5 [...]

Ugh. That points to a high likelihood of a lot of hacks that would break if the bug is fixed. :|
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5869
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: JSBsim: gear compression

Postby WoodSTokk » Fri Aug 28, 2020 11:56 am

If someone use hacks to work with this bug, thats called bug using.
A dev that uses bugs must also be aware that this bug will be fixed sometimes and the bug can not longer be used.

In this case its simple. compression-norm shows exactly the same value as compression-ft (until now).
So we need only to grep all JSBsim aircrafts in FGAddon if they use compression-norm and change it to compression-ft.
In this way nothing gets broken, because all related staff receive the same value as before.
WoodSTokk
 
Posts: 565
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: JSBsim: gear compression

Postby D-ECHO » Fri Aug 28, 2020 12:00 pm

Well, MP animations get broken, because -norm is transmitted over MP while -ft is not.
User avatar
D-ECHO
 
Posts: 2108
Joined: Sat May 09, 2015 12:31 pm

Re: JSBsim: gear compression

Postby WoodSTokk » Fri Aug 28, 2020 12:14 pm

Yes, i think about it after submitting my post.
Sure, but it is simple to fix it. Is there a list of all JSBsim aircrafts in FGAddon?
Or at least, a list of unmaintained JSBsim aircrafts. All devs of the maintained aircrafts can fit it by itself.
I dont think that this list is very long.
WoodSTokk
 
Posts: 565
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster

Re: JSBsim: gear compression

Postby D-ECHO » Fri Aug 28, 2020 12:16 pm

I don't quite understand yet how you want to fix it? Wouldn't JSBSim therefor need some kind of information about the maximum compression? AFAIK none is supplied, so setting that parameter to 1 ft by default would eliminate all need for any compatibility changes, as -norm would still equal -ft except for aircraft that set maximum compression.
User avatar
D-ECHO
 
Posts: 2108
Joined: Sat May 09, 2015 12:31 pm

Re: JSBsim: gear compression

Postby WoodSTokk » Fri Aug 28, 2020 12:22 pm

If JSBsim have no max-compression, it works with 1ft. Thats a quick fix ;) (and i think the best fix).
Otherwise, if JSBsim stop writing the -norm value, a simple prop-filter will do the trick.
WoodSTokk
 
Posts: 565
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2020.3.0
OS: Debian Buster


Return to Flight dynamics model

Who is online

Users browsing this forum: No registered users and 1 guest

cron