John Pitz <[EMAIL PROTECTED]> said: > If anyone has a little bit of extra time could they email me any kind > of tutorial as to how the program works? I would be very grateful and > hopefully a helpful contributer to this project.
AFAIK there isn't such a tutorial at this time. If you are familiar with C++ then you should have no trouble figuring things out. Take a look in fgfs.hxx at the FGSubsystem class. This is the base for all the subsystems in flightgear. The most frequently used functions in this class are the init and the update functions. Then take time to look at a few subsystems. Generally for most subsystems you can figure that the update function gets called once per frame. The frame loop is in Main.cxx (function mainloop). Here you will see the various subsystem's update calls and the sequence they are done in. What I mean by frame loop is this loop is repeated for each frame (note the rendering down the bottom of it). There is also an event subsystem that is used to schedule calls to update() of certain subsystems on a timer interval. With this general overview (don't try to understand every line of code yet), you should be able to locate bits of code that you are interested in by perusing the directories of modules. Like I said most subsystems are based on FGSubsystem, so you should be able to locate implimentations of init() and update(). Also note that some subsystems are updated by others, so if you don't see the update() called from in the mainloop then do a text search through the modules to find the code that actually does call the update() (look for references to the class you are interested in). Finally you will want to familiarize yourself with the data that is exposed in the property tree. This is an excellent learning tool. When running FlightGear, bring up the Property browser from the file menu. This property tree is essential for much of the way in which configuration and data output are handled in FlightGear. For example the flight instruments are all configured using xml defined references to values in the property tree in order to position needles, etc. Changing property values can be used to alter the configured behavior of FlightGear at startup using parameters and/or xml declarations, or on the fly using C++ property class functions in the code or from several other interfaces including the property browser (for example: try adjusting the cloud layer settings in the property browser under environment/clouds, you will see the effect right away). Speaking of instruments, you might want to take a look at how some of the instrumentation configuration (Aircraft/Instrumentation/*.xml files in the base package) in order to get an idea of how different parts of flightgear can be configured to communicate with other parts in a certain way through the property tree. You can also look at the preferences.xml file to see an example of how startup configuration for various subsystems is handled through the property tree. By browsing the properties and tracing interesting data items to the code they are output from or read by, you can learn a lot about how FlightGear works. When you see something interesting do a text search through the source code for that property name and you will find out how it is utilized. One note: you might find the particular problem you mentioned (about the aircraft flipping over) a difficult one to deal with at first. It doesn't happen all the time or at all airports and probably not with all aircraft. IIRC, it relates to the ground trimming in JSBsim or YASim (these are two of the Flight Dynamics engines used in FlightGear). It is an area that I'm not at all prepared to address, but I think some of our best have not been successful in eliminating that one (maybe from lack of time). On the other hand, if you do fix it, you will certainly earn the respect and admiration of all :-) Welcome aboard and do feel free to post any questions to the list as they come up. Best, Jim _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
