Difference between revisions of "User:Callahanp"

From FlightGear wiki
Jump to navigation Jump to search
Line 19: Line 19:
 
=== Development Operations ===
 
=== Development Operations ===
  
I am making an effort to define and show examples of development operations for various parts of Flightgear Code and Data including all SourceForge Git repositories, Scenery, Aircraft, Aircraft Hangars, Airport Data. Add-Ons and anything else that can be used with Flightgear.
+
I am making an effort to define and give detailed examples of development operations for various parts of Flightgear Code and Data including all SourceForge Git repositories, Scenery, Aircraft, Aircraft Hangars, Airport Data. Add-Ons and anything else that can be used with Flightgear. This will include items that fall under the FlightGear SourceForge project, and other projects that do not.
 +
This Page will be organized not around specific kinds of development, but around the development operations common to all of them.  Operations include obtaining source materials, preparatory steps, ongoing operational readiness tasks, building, modifying, debugging, testing, and submitting changes.  I'll explain further and give examples of the individual operations needed to accomplish these tasks for all types of FlightGear material, whether source code or data, regardless of the type of file or where it's upstream repository resides. 
  
Operations include obtaining source materials, preparatory steps, operational readiness tasks, building, modifying, debugging, testing, and submitting changes.  I'll explain further and give examples of the individual operations needed to accomplish these tasks for all types of FlightGear material, whether source code or data, regardless of the type of file or where it's upstream repository resides. 
+
When finished, this guide is intended to be comprehensive.  If you participate in the development of anything used with or within flightgear, with few exceptions, you'll be able to find information on specific commands and procedures needed to complete the listed operational tasks.  It's currently under rapid development, with attention focused currently on correctly obtaining source materials for C & C++ programming of the main application.  Where expansion is needed to cover other types of materials, we'll make notes at the end of the section.
 
 
When finished, this guide is intended to be complete.  If you participate in the development of anything used with or within flightgear, with few exceptions, you'll be able to find information on specific commands and procedures needed to complete the eight operational tasks.  It's currently under rapid development, with attention focused currently on correctly obtaining source materials for C & C++ programming of the main application.
 
  
 
Here are a few examples of the Operations of each type:
 
Here are a few examples of the Operations of each type:
Line 33: Line 32:
 
| Obtaining Source Materials || <li>Cloning Flightgear Git Repositories Locally </li> <li>Creating Personal Forks of Flightgear Repositories and cloning them locally </li>
 
| Obtaining Source Materials || <li>Cloning Flightgear Git Repositories Locally </li> <li>Creating Personal Forks of Flightgear Repositories and cloning them locally </li>
 
|-
 
|-
| preparatory steps || <li>installing pre-requisite software</li><li> collecting information about the exact current location for upstream source code and data </li> <li> Establishing a SourceForge Account</li> <li> Creating an SSH Key and readying it for use with Sourceforge </li> <li>Establishing a build script that can be used with multiple branches and which can build Release, RelWithDebInfo and Debug versions of executables</li>
+
| Preparatory Steps || <li>installing pre-requisite software</li><li> collecting information about the exact current location for upstream source code and data </li> <li> Establishing a SourceForge Account</li> <li> Creating an SSH Key and readying it for use with Sourceforge </li> <li>Establishing a build script that can be used with multiple branches and which can build Release, RelWithDebInfo and Debug versions of executables</li><li> Ensuring that Ongoing Operational Readiness Tasks are well documented, understood and used as appropriate</li>
 
|-
 
|-
| Operational Readiness Tasks || <li>Ensuring that when switching branches, that changes on the previously current branch are not lost</li> <li>Ensuring that local clones used in a build are on the correct branch for the desired build</li>  
+
| Ongoing Operational Readiness Tasks || <li>Ensuring that when switching branches, that changes on the previously current branch are not lost</li> <li>Ensuring that local clones used in a build are on the correct branch for the desired build</li> <li>Establishing working branches for specific enhancements</li> <li>Ensuring that sufficient testing has been performed before pushing changes upstream</li>
 
|-
 
|-
 
| Building || Executing a script containing a series of CMake commands to build specific parts of flightgear </li><li>Executing a script or program that processes data in raw form to produce a different form of data directly usable by FlightGear (OSM data for example) </li>
 
| Building || Executing a script containing a series of CMake commands to build specific parts of flightgear </li><li>Executing a script or program that processes data in raw form to produce a different form of data directly usable by FlightGear (OSM data for example) </li>
 
|-
 
|-
| Modifying || <li>Using an Editor or IDE to modify or add C++ Code </li><li>  Using Blender to do something to an aircraft </li><li>Adding a building to scenery</li>
+
| Modifying || <li>Using an Editor or IDE to modify or add C++ Code </li><li>  Using Blender, GIMP, or other graphical editing tool to do something for an aircraft </li><li>Adding a building to scenery</li>
 
|-
 
|-
 
| Debugging || <li>Using the GDB debugger in command line mode </li><li>Using the GDB debugger in an IDE</li>-
 
| Debugging || <li>Using the GDB debugger in command line mode </li><li>Using the GDB debugger in an IDE</li>-
Line 48: Line 47:
 
|}
 
|}
  
Many of the source materials for the flightgear application are maintained as repositories on SourceForge.  [https://sourceforge.net/p/flightgear/_list/git Complete FlightGear SourceForge Repository List].  Two of these Repositories are no longer used: FGCom and FGRun.  These repositories are obsolete because their functional parts have been included within FlightGear.
+
==== Obtaining Source Materials ====
 +
 
 +
FlightGear related Source Materials may be hosted in a number of different services.  Depending on the exact material, you may be working with files from the FlightGear Project on SourceForge, other SourceForge projects, projects from GitHub, GitLab or other SCM repository service.  You may be dealing with data that originates in other Simulation Projects, or with code from supporting libraries such as Open Scene Graph.
 +
 
 +
Quite a lot of the source materials for the flightgear application are maintained as repositories on SourceForge.  [https://sourceforge.net/p/flightgear/_list/git Complete FlightGear SourceForge Repository List].  Two of these Repositories are no longer used: FGCom and FGRun.  These repositories are obsolete because their functional parts have been included within FlightGear.
  
These four repositories make up the core Flightgear Application
+
These four Source Forge repositories make up the core Flightgear Application
  
 
* [https://sourceforge.net/p/flightgear/fgdata/ fgdata]
 
* [https://sourceforge.net/p/flightgear/fgdata/ fgdata]
Line 57: Line 60:
 
* [https://sourceforge.net/p/flightgear/fgmeta/ fgmeta]  
 
* [https://sourceforge.net/p/flightgear/fgmeta/ fgmeta]  
  
This special purpose repository is used when building flightgear on Windows by users who prefer to use pre-build pre-requisite packages.
+
This special purpose repository is used when building flightgear on Windows by users who prefer to use pre-built pre-requisite packages.
  
 
* [https://sourceforge.net/p/flightgear/windows-3rd-party/ windows-3rd-party]  
 
* [https://sourceforge.net/p/flightgear/windows-3rd-party/ windows-3rd-party]  
  
These repositories are for items such as a manual, web services used with flightgear, and addtional data that is separately downloaded by the running application.
+
These additional SourceForge repositories are for items such as a manual, web services used with flightgear, and addtional data that is separately downloaded by the running application.
 
* [https://sourceforge.net/p/flightgear/getstart/ getstart]  
 
* [https://sourceforge.net/p/flightgear/getstart/ getstart]  
 
* [https://sourceforge.net/p/flightgear/maclauncher/ maclauncher]  
 
* [https://sourceforge.net/p/flightgear/maclauncher/ maclauncher]  

Revision as of 01:03, 27 April 2020

I am a flight simulation hobbyist currently working on developing skills needed for building instruments, gauges, radios and controls for a C172 and for contributing to flightgear's development.

What I'm doing:

While I participate very marginally in flightgear-devel, I'm ramping up my C++11 skills, learning more about git, getting to know a few editors, IDEs, Build and Debugging tools.  I hope to eventually be able 24-7 to build and effectively debug flightgear on any operating system, and to be able to support anyone else wishing to do so.

Callahanp - Flightgear From Scratch

At the same time, I'm trying to form a coherent view of Flightgear's structure as an application.  Not as a user, but as a developer.  This involves gaining knowledge of the various subsystems that make up flightgear, the underlying technologies each subsystem uses and the flow of control and data  between these subsystems.

Callahanp - Flightgear Technical Manual

Flightgear and Simgear Code

I personally believe that the FlightGear's core developers need to take a close look at how the project is organized and led and make some serious efforts to recruit, train and retain new project participants.

Callahanp - Flightgear Working Groups

[C172P Team on Github ]

Development Operations

I am making an effort to define and give detailed examples of development operations for various parts of Flightgear Code and Data including all SourceForge Git repositories, Scenery, Aircraft, Aircraft Hangars, Airport Data. Add-Ons and anything else that can be used with Flightgear. This will include items that fall under the FlightGear SourceForge project, and other projects that do not. This Page will be organized not around specific kinds of development, but around the development operations common to all of them. Operations include obtaining source materials, preparatory steps, ongoing operational readiness tasks, building, modifying, debugging, testing, and submitting changes. I'll explain further and give examples of the individual operations needed to accomplish these tasks for all types of FlightGear material, whether source code or data, regardless of the type of file or where it's upstream repository resides.

When finished, this guide is intended to be comprehensive. If you participate in the development of anything used with or within flightgear, with few exceptions, you'll be able to find information on specific commands and procedures needed to complete the listed operational tasks. It's currently under rapid development, with attention focused currently on correctly obtaining source materials for C & C++ programming of the main application. Where expansion is needed to cover other types of materials, we'll make notes at the end of the section.

Here are a few examples of the Operations of each type:

Operation Category Examples
Obtaining Source Materials
  • Cloning Flightgear Git Repositories Locally
  • Creating Personal Forks of Flightgear Repositories and cloning them locally
  • Preparatory Steps
  • installing pre-requisite software
  • collecting information about the exact current location for upstream source code and data
  • Establishing a SourceForge Account
  • Creating an SSH Key and readying it for use with Sourceforge
  • Establishing a build script that can be used with multiple branches and which can build Release, RelWithDebInfo and Debug versions of executables
  • Ensuring that Ongoing Operational Readiness Tasks are well documented, understood and used as appropriate
  • Ongoing Operational Readiness Tasks
  • Ensuring that when switching branches, that changes on the previously current branch are not lost
  • Ensuring that local clones used in a build are on the correct branch for the desired build
  • Establishing working branches for specific enhancements
  • Ensuring that sufficient testing has been performed before pushing changes upstream
  • Building Executing a script containing a series of CMake commands to build specific parts of flightgear
  • Executing a script or program that processes data in raw form to produce a different form of data directly usable by FlightGear (OSM data for example)
  • Modifying
  • Using an Editor or IDE to modify or add C++ Code
  • Using Blender, GIMP, or other graphical editing tool to do something for an aircraft
  • Adding a building to scenery
  • Debugging
  • Using the GDB debugger in command line mode
  • Using the GDB debugger in an IDE
  • -
    Testing
  • Writing, Executing or Debugging CPPUnit tests
  • Checking the position of a new building by viewing it in Flightgear from several angles
  • Submitting changes
  • Doing a git push to a personal fork for a branch created for a specific set of changes
  • Creating a merge request for changes present on a personal fork.
  • Obtaining Source Materials

    FlightGear related Source Materials may be hosted in a number of different services. Depending on the exact material, you may be working with files from the FlightGear Project on SourceForge, other SourceForge projects, projects from GitHub, GitLab or other SCM repository service. You may be dealing with data that originates in other Simulation Projects, or with code from supporting libraries such as Open Scene Graph.

    Quite a lot of the source materials for the flightgear application are maintained as repositories on SourceForge. Complete FlightGear SourceForge Repository List. Two of these Repositories are no longer used: FGCom and FGRun. These repositories are obsolete because their functional parts have been included within FlightGear.

    These four Source Forge repositories make up the core Flightgear Application

    This special purpose repository is used when building flightgear on Windows by users who prefer to use pre-built pre-requisite packages.

    These additional SourceForge repositories are for items such as a manual, web services used with flightgear, and addtional data that is separately downloaded by the running application.

    Part 1 - Creating a Sourceforge Fork

    Part 1A - Create a Sourceforge Account, SSH Key and Verify that it works
      • Requires one personal sourceforge account
      • Requires an ssh login be setup
        • Create an SSH Key for use with Sourceforge
        • Update Sourceforge SSH Keys
        • Login to the shell with your key to make sure things are working right.
        • Logout from the shell - You won't be working there.
        • Login to Sourceforge on the web. You will be working with the web interface to sourceforge to create Forks.
    Part 1B - Create Sourceforge Forks for each Flightgear git repository you need to work in

    If you are not going to make changes to a particular repository, but only wish to do builds tracking next, you only need a clone of the official Flightgear on your local machine. You don't need to bother with creating a SourceForge Fork. You can have a mixture of local gits, some with multiple remote connections origin, upstream and possibly others, others only connected once to flightgear as origin.

    In order not to strain SourceForge resources, it's a good Idea to get rid of any forks that are not used for a while, certainly any that are not used at all for changes and experimental branches. This is especially true of resources that are large.

    Note that if you later decide to contribute to a new area, or to resume contributing, you will be able to create a fork and attach it to the local clone you previously created using the steps below.

    • Open https://sourceforge.net/projects/flightgear/
    • Log in to your sourceforge account by clicking the login button if you're logged out.
    • Hover over Me and select Profile with a right click and select open link in new window.

    If you don't see Git under personal tools in your profile page, it's because you've not set up any SourceForge Forks yet.

    Creating a Sourceforge fork is easy, Just go to the FlightGear Repo you wish to fork and click the fork button on the Left. It takes a few minutes and is pretty easy to figure out. You'll get to see the clone statement for the repo after refreshing the page after the fork is created.


    Part 2 - Create a local clone for each Sourceforge Fork

    If you already have clones of Flightgear git repos from Sourceforge, there's no need to re-do them as clones of your SourceForge Forks, they can easily be converted using the same steps you would use on a fresh clone of a personal fork.

      • create origin remote
      • create upstream remote
      • set upstream fetch to main flightgear repositories
      • create a branch for working on changes
      • checkout next
      • checkout a change branch
      • stash changes on a branch
      • push a change branch to your SourceForge fork
      • pull changes from next
      • got fetch

    Tools

    Tools for a Flightgear Developer (see also Tools of the Trade)

    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.

    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?

    Sure there is. Just write a book:

    IDEs

    Working on Configurations for Visual Studio, Visual Studio Code, Atom, Eclipse and QTCreator IDEs and other tools for working with FlightGear Data.

    The day to day work of a FlightGear Developer will include the use of a variety of software to work on various kinds of FlightGear material. The material includes Source Code written in C and C++, Scripts written in Nasal, Build procedures using CMake and in scripting languages of 3 operating Systems, Data Files representing Airports, Runways, Taxiways, Airport Markings, Navigation Beacons, Instrument Landing System Transmitters, Taxiway and Runway Lighting, Buildings, Roadways,

    The workflow for all of these has a few basic steps.

    • Get copies of the original source material
    • Establish a fork repository for your changes to the materials
    • Make a local copy of the materials
    • Change the materials
    • Check the Validity of Changes
    • Deliver changed materials to your fork
    • Request that the changes be accepted and merged with the original source materials.

    The workflows differ based on the true owners of the originating material and the materials format.

    These are the basic tasks that a developer will need to complete

    • Setting up forks of FlightGear Git Archives
    • Identifying non-git Open Source Resources for use with Flightgear and establishing forks for them
    • Downloading appropriate tools for working on the kind of files that make up the FlightGear application and it's data
    • Configuring these tools and FlightGear itself to operate in one or more modes
    • Learning the steps to use inside and outside the tools


    Figuring out how to contribute to FlightGear

    Getting things done in Flightgear


    As part of my Cockpit Building efforts, I'm also working on

    Contact

     Email Callahanp through the wiki
    

    I show up occasionally on discord, #flightgear on irc.flightgear.org and am a member of several public forums related to cockpit building.

    Callahanp (talk) 09:45, 11 November 2017 (EST)

    The Howtos

    -- Oh yeah... those...

    I'm working on these along side building my cockpit. Some of the early attempts were not that useful. My current approach is to build and document actual hardware. I hope this will be more helpful.

    Current Projects: