Board index FlightGear Development Aircraft

Please help to create a list of YASim aircrafts

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Please help to create a list of YASim aircrafts

Postby jsb » Sat Feb 03, 2018 9:11 am

Dear all,

I need a list of aircrafts that use yasim FDM so I can test changes/new yasim features against as many aircrafts as possible.
Unfortunately there is no rule that the yasim XML files must follow a naming convention, they could be named anything.xml so one could start with a search for any file that has yasim in its name but that list won't be complete.
I plan to add a wiki page for this list and I kindly ask you to add the yasim based aircrafts you know here.
If somebody has a local copy of fgaddon, please search for XML files having "yasim" in the filename - that would be a good start.

Thanks for your help :)
jsb
 
Posts: 219
Joined: Sat Oct 25, 2014 8:17 pm
Location: Hamburg, Germany
Callsign: D-JSB
Version: next
OS: Win7/Linux


Re: Please help to create a list of YASim aircrafts

Postby wlbragg » Sat Feb 03, 2018 3:53 pm

AirCrane - fgaddon
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4637
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Please help to create a list of YASim aircrafts

Postby Hooray » Sat Feb 03, 2018 3:58 pm

Unfortunately there is no rule that the yasim XML files must follow a naming convention, they could be named anything.xml so one could start with a search for any file that

Actually, for any given repository/hangar this should be fairly straightforward to determine using a simple script - just by looking for the corresponding XML tags in the PropertyList file - all that is needed here is a PropertyList-aware XML parser, so that file naming conventions are irrelevant, i.e. so that parsing foo-set.xml ends up creating the corresponding property tree structure, which can in turn be used to query the fdm "<flight-model>" property.

Note that there is zero coding effort required here - because all of the requirements are satisfied by FlightGear's Nasal integration, i.e. it should basically suffice to run read_properties() in a foreach loop that iterates over directory($FG_ADDON) and write everything to a text file.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11314
Joined: Tue Mar 25, 2008 8:40 am

Re: Please help to create a list of YASim aircrafts

Postby wlbragg » Sat Feb 03, 2018 4:11 pm

@jsb,

I'm using Sublime to do a "find in file" search in fgaddon for "<flight-model>yasim</flight-model>".

It's running as we speak and I will post the results when finished.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4637
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Please help to create a list of YASim aircrafts

Postby Hooray » Sat Feb 03, 2018 4:16 pm

I also believe that restricting the search to just PropertyList-XML files should work even if the XML processor is otherwise unaware of the PropertyList/XML format - obviously, at the cost of having to parse ALL XML files, instead of just selectively loading all -set.xml files and creating the corresponding Property Tree structure and running a getNode.("flight-model").getValue() lookup. But there is no reason why that should not work. As a matter of fact, when using Nasal, this could even be done in a background thread as in:

  • get a list of all directory in $FG_ADDON
  • look for *-set.xml files
  • load each *-set.xml into a temporary props.Node object
  • run the .getNode("flight-model").getValue() lookup
  • do the check against yasim
  • append matches to the list

Note that this would even work for *-set.xml files including XML files not using the .xml extension
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11314
Joined: Tue Mar 25, 2008 8:40 am

Re: Please help to create a list of YASim aircrafts

Postby wkitty42 » Sat Feb 03, 2018 4:17 pm

jsb wrote in Sat Feb 03, 2018 9:11 am:I need a list of aircrafts that use yasim FDM so I can test changes/new yasim features against as many aircrafts as possible.

already done... see the dev mailing list for the complete list of all FGAddon yasim craft...

FWIW1: FGAddon/Aircraft/ is only 11.6GiB (12420072288 bytes) consisting of 79772 files in 13837 directories...

FWIW2: there are 489 yasim craft, 157 jsbsim craft, and 3 ufo craft...

you're welcome :mrgreen:
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5334
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Please help to create a list of YASim aircrafts

Postby Hooray » Sat Feb 03, 2018 4:21 pm

You might want to get the corresponding script added/committed to fgmeta - for future reference (stats). Alternatively, add your workflow to the wiki and document it there.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11314
Joined: Tue Mar 25, 2008 8:40 am

Re: Please help to create a list of YASim aircrafts

Postby wkitty42 » Sat Feb 03, 2018 4:22 pm

Hooray wrote in Sat Feb 03, 2018 3:58 pm:Actually, for any given repository/hangar this should be fairly straightforward to determine using a simple script - just by looking for the corresponding XML tags


yep... that's all that's needed and it isn't even a script... a simple one-liner will do... no need for anything fancy...

Code: Select all
cd ~/to/your/fgaddon/Aircraft/directory
find -type f -iname *.xml -exec egrep -l -e 'flight-model.*yasim' {} \; | sort | uniq > yasim-craft-list.txt
find -type f -iname *.xml -exec egrep -l -e 'flight-model.*jsb' {} \; | sort | uniq > jsb-craft-list.txt
find -type f -iname *.xml -exec egrep -l -e 'flight-model.*ufo' {} \; | sort | uniq > ufo-craft-list.txt

no need for a bunch of overkill and over engineering...
yes, i know there are, IIRC, two other FDMs ;)
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5334
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Please help to create a list of YASim aircrafts

Postby wlbragg » Sat Feb 03, 2018 4:23 pm

Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4637
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Please help to create a list of YASim aircrafts

Postby wlbragg » Sat Feb 03, 2018 4:28 pm

How many ways do you want to skin this cat?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4637
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Please help to create a list of YASim aircrafts

Postby wkitty42 » Sat Feb 03, 2018 4:37 pm

there's only one way to skin a cat... cooking it is another matter altogether :mrgreen:
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5334
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Please help to create a list of YASim aircrafts

Postby wkitty42 » Sat Feb 03, 2018 4:53 pm

wlbragg wrote in Sat Feb 03, 2018 4:11 pm:I'm using Sublime to do a "find in file" search in fgaddon for "<flight-model>yasim</flight-model>".

you will have missed some (100 by my count) with that pattern... some of them have "archive" added, too...

eg:
Code: Select all
$ find -type f -iname *.xml -exec egrep -e 'flight-model' {} \;
    <flight-model>yasim</flight-model>
  <flight-model>jsb</flight-model>
    <flight-model archive="y">yasim</flight-model>
  <flight-model>jsb</flight-model>
    <flight-model archive="y">yasim</flight-model>
    <flight-model>yasim</flight-model>
    <flight-model archive="y">yasim</flight-model>
    <flight-model archive="y">yasim</flight-model>
^C

a quick count shows 114 craft, no matter which FDM, are archiving their FDM setting...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5334
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Please help to create a list of YASim aircrafts

Postby wlbragg » Sat Feb 03, 2018 6:06 pm

Well there you go! :)
I have a feeling jsb isn't going to test 300+ fdm's. My search was a "quick" way to generate a more than adequate sample list to test the changes against. Like you said, no need for anything fancy for jsb's stated purposes. I would have used grep if not for the fact that I have used it all of 2 or 3 times and have to look it up every time.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4637
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Please help to create a list of YASim aircrafts

Postby Hooray » Sat Feb 03, 2018 6:57 pm

yes, it does make sense to use an XML-aware tool - which is why I suggested the read_properties() approach via Nasal, because that's not just XML-aware, but also PropertyList-aware. Obviously, a standalone XML processing tool (think xmlstarlet) would work, too.

Thinking about it, it might not be such a bad idea to add this as a feature to fgfs itself, i.e. in the form of a command line option - Gijs and others have repeatedly mentioned that aircraft developers could use some kind of "validation mode", e.g. to track down some of the more common mistakes (think case sensitivity on non-Windows OS, or missing files/directories). And James has been working on a dedicated "developer mode" anyway. Providing an integrated option to query $FG_ROOT, $FG_ADDON for certain resources, seems like it could be pretty useful - i.e. not just for statistical purposes. And obviously, PropertyList/XML being what they, fgfs could easily provide such numbers
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11314
Joined: Tue Mar 25, 2008 8:40 am

Next

Return to Aircraft

Who is online

Users browsing this forum: Flyingfootball, Google [Bot] and 2 guests