980
edits
No edit summary |
|||
Line 6: | Line 6: | ||
Recently I began the effort to fully understand the skills needed to contribute to the Flightgear project's codebase. I know c++ from a course in the early 90's. I'm looking at Kdevelop and QTquick as development tools. | Recently I began the effort to fully understand the skills needed to contribute to the Flightgear project's codebase. I know c++ from a course in the early 90's. I'm looking at Kdevelop and QTquick as development tools. | ||
=== Flightgear Codebase === | |||
My area of interest is in Flightgear's code includes: | My area of interest is in Flightgear's code includes: | ||
Line 18: | Line 18: | ||
* command line parameters | * command line parameters | ||
I'm beginning to look through various parts of the Flightgear code-base to understand how the parts fit together and how supporting libraries are used in the project. I'd like to learn how aircraft data and graphics are integrated into the working program, and how, why and where Nasal scripting is used. | I'm beginning to look through various parts of the Flightgear code-base to understand how the parts fit together and how supporting libraries are used in the project. I'd like to learn how aircraft data and graphics are integrated into the working program, and how, why and where Nasal scripting is used. To this end, I have | ||
* Cloned the flightgear simgear project | |||
* Built a full debug version of the next branch | |||
* Installed | |||
** [https://gdbgui.com/ gdbgui] | |||
** [https://atom.io/ atom] for basic code exploration. | |||
I' | Later I'll try QtCreator | ||
Here's my directory structure | |||
*$HOME | |||
** A separate disk to make it easy to reinstall linux. $HOME is the same as /home/$USER | |||
*$HOME/fg | |||
** Scripts I need to build and flightgear such as download_and_compile.sh, and /run/debug script | |||
** This is actually a symlink to a folder on a separate disk from /home. | |||
** I do this so I can build the software I want without continually expanding my home disk's size. | |||
** The fg directory contains a folder for each different build of Flightgear. | |||
*** next for running next | |||
*** nextrti for running next with OpenRTI | |||
*** nextd for debugging next | |||
*** stable | |||
*** stabled | |||
** Each of these directories contains clones for flightgear, simgear and other projects like OSG and OpenRTI as needed. | |||
cmd = " | Rather than use excessive bandwidth, when I need a fresh copy, I just run download_and_compile.sh in a folder that already has a copy of the sources. Then I copy the folder over to the one I want to refresh and remove the build folder within the new one. Then run the script again to produce the executable version I want. | ||
--fg-root= | |||
Here's the atom/run/debug script I use for debugging | |||
cd $HOME/fg/ | |||
#!/bin/bash | |||
# ~/fg/debug | |||
$cmd = "$HOME/fg/nextd/install/flightgear/bin/fgfs \ | |||
--fg-root=$HOME/fg/nextd/install/flightgear/bin/../fgdata/ \ | |||
--log-level=2 \ | --log-level=2 \ | ||
--fg-scenery= | --fg-scenery=$HOME/fg/nextd/install/flightgear/bin/../fgdata/Scenery \ | ||
--fg-aircraft= | --fg-aircraft=$HOME/fg/nextd/install/flightgear/bin/../fgdata/Aircraft \ | ||
--fg-aircraft= | --fg-aircraft=$HOME/.fgfs/Aircraft/org.flightgear.fgaddon/Aircraft \ | ||
--httpd=5401 --telnet=5400 --airport=KSFO" | --httpd=5401 --telnet=5400 --airport=KSFO" | ||
$gdbgui "$cmd" | |||
When the source window appears, press the "r" key to start debugging. | |||
I start by stepping through bootstrap and other modules until flightgear is up and running. | |||
I'm making some notes. There are three sections: | |||
* '''Path''' will trace the path through modules that provide significant functionality to the Simulator until the aircraft is shown holding short or parked somewhere. only the module's source path and a brief explanation or list of why it's on the "path". | |||
* '''Modules''' lists all the classes and methods or functions executed on the "path" as well as those that are not executed in the path. | |||
* '''Utility Calls''' will contain notes on various library calls, noting what the call looks like, where the library comes from, what the call does and where else it might be used. These will be functions with a purpose that is not limited to flight simulation. | |||
====The Path to "Holding Short"==== | |||
====Modules on the Path to Holding Short==== | |||
the gdb run command gets things going in gdbgui. Just type "r" | the gdb run command gets things going in gdbgui. Just type "r" | ||
Line 161: | Line 195: | ||
| || || | | || || | ||
|} | |} | ||
==== Progress on Cockpit Building ==== | ==== Progress on Cockpit Building ==== | ||
edits