User:Callahanp: Difference between revisions

Jump to navigation Jump to search
Line 15: Line 15:


[[User:Callahanp/Flightgear_and_Simgear_Code/From_Command_Line_to_Holding_Short|From Command Line to Holding Short]]. A look at what gets called when you start Flightgear from the command line until you are on the runway.  This is a work in progress, somewhat stalled after Eduard Auvergne's initial work on subsystems.  It needs a re-vamp to make it current and publishable.
[[User:Callahanp/Flightgear_and_Simgear_Code/From_Command_Line_to_Holding_Short|From Command Line to Holding Short]]. A look at what gets called when you start Flightgear from the command line until you are on the runway.  This is a work in progress, somewhat stalled after Eduard Auvergne's initial work on subsystems.  It needs a re-vamp to make it current and publishable.
==== Flightgear Application Outline ====
I'm trying to come up with an outline of Flightgear's structure as an application.  
First Steps:  
===== RTFM =====
* http://wiki.flightgear.org/FlightGear_Manual
* fgdata/doc/img Look at each image in, noting the name of the image and what the image is trying to say
* fgdata/doc/keyboard/map.pdf  Note that key bindings can be specific to an aircraft. Note that the pdf was produced from a .tex file.
* fgdata/Docs/model-combined.eff/README.model-combined.eff  Read and not What's "rembrandt" - Key terms can be pulled from this document
* fgdata/Serial/nmeafaq.txt  Garmin -    Key terms can be pulled from this document.  This document describes a data protocol
* AI_doc.html 
* FGShortRef.html
* http://flightgear.org/Docs/FlightGear-FAQ.html
* fgdata/Docs/fschool_0.0.3.pdf
* fgdata/Docs/index.html
* fgdata/Docs/model-howto.html
* and lots of others  - point is you have to read them all
Once they're read, is there a way to organize them so the result is an overview?
=====It's Data Driven - So Where's the data? =====
I've realized that much of the application is data driven, and that data is found in various places. These include files in one or another imaging format .ac files and configuration files of various types including xml files.  Each of these references will involve a path of some kind creating a relationship between material in one file with material in another.  There are path like structures to be found in data structures constructed within the application itself. This happens most notably in the property tree, but also in other independent data structures such as the  structure controlling subsystem initialization, ongoing processing, removal and re-initiialzation. 
To uncover some of these relationships and to locate and characterize the various processes involved, a close look at similar code fragments in a large number of files will enable you to uncover patterns that might otherwise elude you.
The basic technique will be o use an editor such as Atom, capable of doing a recursive global search through a set of files using a series of regular expressions.  Using regular expressions allows us to go from a more general search to one that is more specific.  All the following examples use atom's find in project - regex - case insensitive search.
The code fragments to search for To get a list of 
the include= vs <path> dichotomy is a distinction I'd like to investigate and describe further and the handlers for each of these "types" 
I thought it might be worth going down the rabbit hole to explore a bit. 
Keep in mind I'm looking for important concepts that I don't yet have in my outline.  The key to finding them is recognizing the variety of tags found in xml files.  For the moment, I'm looking for tags and other structural identifiers that refer to materials in other files.  
I'm also adding other concepts driven by data from xml files such as  animation, interpolation and the various types of tags with xml files found in the files for the C172p such as checklists, tutorials, instrument and signals.  examples of these are easy to find in an editor capable of text searching an entire project:
Try the following in atom and you'll see what I mean 
cd next/install 
atom . 
Use the atom FindInProject->Find All with any of the following.  Be sure to click on the regex button for the search
* include=
* <path>
* <path>.*\.xml
* <path>.*\.png
* <path>.*\.ac
etc.
Scanning the results of the search for include= reveals that they're all found in fgdata. 
* All include references to .xml files and the references themselves are found in xml files.
* There are 2117 of them in 1274 files.
* AI/Aircraft alone contains about 75% of the includes.  These are for individual liveries.
* Aircraft/c172p gives you a preview of the kind of xml strucures you'll find in any aircraft.  
* Aircraft/Generic contains about 5% of the includes. They include items for specific instruments, the walker, a logo,  
* ATC  contains a few files with xml includes related to ATIS.Compositor contains several xml includes. This one is likely to be important. 
* defaults.xml is likely to be a high level module and therefore important 
* Docs contains a number of README.xxxxx files, likely to be informative. Some have xml includes referenced in them. As I've mentioned, you should read every single one.
* Instruments contains about 5% of the includes. They include items for specific instruments, the walker, a logo,  
* Environment has two files one with filter tags related to xml files describing clouds and the other with tags for cloudLayers and volcanos. 
* Input has xml related to joysticks.  there's also a top level file  fgdata/joystics.xml 
* Materials makes up the remaining 15% of xml. it includes xml data related to runway textures and effects, buildings, geographic region textures and groups of objects.  
Scanning for <path> reveals a similar pattern, but <path> is used for more than just .xml files.
The total of 5067 <path> instances in 1745 files breaks down this way:
* .ac files with 1868 instances of <path> in  1509 files
* .rgb files with 798 in 108 files.
* .png files with 55 in 14 files
* .jpg 19 in 6 files
* .wav 113 in 9 files 
* .xsl 2 in 1 file 
* .http or .html 3 in 3 files
* .xml  with 2138 in 279 files 
The xml paths have a similar distribution pattern to the include= xml references, but further investigation is needed to discern how they are different.
Finally, <path> appears in Comments in 6 files, and is mentioned in 6 readme files.
<path> appears in one file 43 times with an <fgproperties> tag


==== Flightgear and Simgear Directory Descriptions and File Counts ====  
==== Flightgear and Simgear Directory Descriptions and File Counts ====  
936

edits

Navigation menu