FFGo: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(→‎Main window and Command Window: Explain sorting of aircraft and airport list in FFGo 1.10.0 and later)
(Add section “Installation tips” with Windows-specific instructions, plus stub sections for Linux and OS X)
Line 131: Line 131:


This dialog should be more convenient than the Airport Finder dialog for the cases where you already know the start and destination airports you are interested in, and you just want to get the results for these airports. Or you want to check several pairs of airports, and you know precisely which ones you want the calculations to be done for.
This dialog should be more convenient than the Airport Finder dialog for the cases where you already know the start and destination airports you are interested in, and you just want to get the results for these airports. Or you want to check several pairs of airports, and you know precisely which ones you want the calculations to be done for.
== Installation tips ==
=== Instructions — Read this first! ===
Since installation instructions may in general depend on the particular FFGo version you want to install, they are always included in release tarballs and zip files, precisely in the <tt>docs/INSTALL</tt> folder. Such tarballs and zip files can be downloaded from [http://people.via.ecp.fr/~flo/projects/FFGo/ FFGo's home page] as well as from [https://pypi.python.org/pypi/FFGo FFGo's page on PyPI] (PyPI being [https://pypi.python.org/pypi the Python Package Index]). However, apart from the addition of a small number of optional dependencies, the installation method hasn't changed since FFGo 1.0.0, therefore there is little risk for now using the online [https://github.com/frougon/FFGo/blob/master/docs/INSTALL/INSTALL_en Git version of the installation guide].
The guide mentioned in the previous paragraph is rather detailed, because it explains a few concepts that may be new to users who are not Python developers, and tries to give general instructions covering all common cases, which is not very easy given that Python may or may not be shipped depending on the particular operation system in use (Windows, Linux, MacOS X, etc.). To the contrary, the following sections give specific instructions applicable in the most common cases on each OS where I know a working procedure. They are more practical, probably easier to follow than the installation guide, at the expense of being less generic.
=== Sample installations ===
==== Windows ====
Typical FFGo installation on Windows is easy, because there is no system Python shipped with Windows, therefore there is no risk of messing up your Windows installation by just installing or upgrading Python packages. The instructions below assume you have no existing Python installation on your Windows system.<ref name="SampleWindowsInstall.WhenHavingPythonAlreadyInstalled">If you do, the general principle is the same, but you'll have to make sure to invoke ''pip'' for the right Python installation, for instance with:<br/>
: <code>py -3.5 -m pip install FFGo Pillow geographiclib</code><br/>
to run ''pip'' with a Python 3.5 installation</code> (not having Windows, I haven't been able to test this myself; please remove this parenthesis if this works, otherwise report on the [http://forum.flightgear.org/viewtopic.php?f=18&t=27054 FFGo thread on the FlightGear forum] with enough details to allow me to help you).</ref> There we go:
# Install Python 3.4 or later:
## Download Python from the [https://python.org/ Python home page].
## Make sure to enable the ''Tcl/tk'' and ''pip'' components in the installer.
## Don't change the default value for the Python installation folder, otherwise you are likely to run into permission problems: except for old versions of Windows, writing to ''Program Files'', at least, is subject to special restrictions that may cause the <code>pip install</code> step to fail.
## If you are not comfortable with the command line (“Command Prompt”), it is suggested you choose ''Add python.exe to Path''. This way, you will be able to run the ''pip'' and ''ffgo'' programs directly at the Command Prompt without having to specify their full paths.
# Open a terminal, aka “Command Prompt”:<p>There are various ways to do this, depending on the version of Windows in use. One way that should work is using the <tt>Windows+R</tt> keyboard shortcut, then entering <tt>cmd.exe</tt> in the text input box. Apparently (according to Google, see for yourself), on Windows 10, this can (also?) be done with the <tt>Windows+X</tt> keyboard shortcut, then choosing ''Command Prompt'' in the menu that should appear.</p>
# In this terminal, type:<br /><code>pip install FFGo Pillow geographiclib</code><br />FFGo can work without Pillow and geographiclib, but it will offer more features if you install them. The previous command should automatically download and install FFGo from [https://pypi.python.org/pypi/FFGo FFGo's page on PyPI].<p>Note: <code>pip install ffgo</code> has the same effect as <code>pip install FFGo</code>.
Note:
<blockquote>Messages such as
: <tt>warning: no previously-included files found matching 'docs\README.conditional-config\_static\README.txt'</tt>
when running the <code>pip install ...</code> command are completely normal and harmless, just ignore them. This command should print something like:
: <tt>Successfully installed CondConfigParser FFGo Pillow geographiclib</tt>
towards the end if all went well.
</blockquote>
After these steps, you should have a working FFGo. You can run it by double-clicking on either ''ffgo.exe'' or ''ffgo-noconsole.exe'' in a directory such as <tt>C:\Python</tt>''XY''<tt>\Scripts</tt>, where ''XY'' corresponds to the Python version that was used in the <code>pip install FFGo ...</code> command. These two executables do the same, except ''ffgo.exe'' opens a Windows terminal (“console”) containing all FFGo messages, while ''ffgo-noconsole.exe'' doesn't. You can safely use the latter most of the time. Should FFGo refuse to start for some reason, running ''ffgo.exe'' and examining/reporting the printed messages would certainly be helpful. You may create a shortcut on your desktop for these files by right-clicking on the ''.exe'' file of your choice.
Another way to run FFGo is to open a Command Prompt and type:
* <code>ffgo</code> if you chose ''Add python.exe to Path'' in the Python installer as hinted above;
* or a full path to one of the FFGo executables, such as <code>C:\PythonXY\Scripts\ffgo.exe</code> in case you didn't.
The instructions given here install all dependencies of FFGo, except one optional dependency: the [http://geographiclib.sourceforge.net/html/MagneticField.1.html MagneticField] executable from [http://geographiclib.sourceforge.net/ GeographicLib]. To have a complete installation, that is able to show the magnetic variation at each airport and magnetic headings for runways, routes, etc., you need to do this in addition:
# Follow [http://geographiclib.sourceforge.net/ GeographicLib]'s ''Download'' link, download and install it.
# If this installation added the folder containing GeographicLib's executables to the PATH environment variable, then you don't have anything more to do, FFGo will automatically find ''MagneticField'' and use it.
# Otherwise, run FFGo as explained above, open the ''Settings → Preferences'' dialog, go to the ''Miscellaneous'' tab, and enter the precise path where MagneticField<ref name="MagneticField.exe-FIXME-note">Presumably <tt>MagneticField.exe</tt>, please correct this if you can do the actual check.</ref> is installed in the corresponding field. Click ''Save settings'' and you should be done.
The FFGo dialog reachable via ''Help → About'' displays the versions of the main dependencies used by FFGo. In case you entered an invalid path, or some other error, a hint is generally given there. In any case, troubleshooting information is always printed to the terminal (if you ran ''ffgo.exe'' as opposed to ''ffgo-noconsole.exe'') and to the FFGo log file located in the <tt>%APPDATA%\FFGo\config</tt> folder (do a Google search with keywords “Windows” and “APPDATA” if you don't know what this means).
==== Linux ====
This section will be completed later. In the meantime, you can consult the [https://github.com/frougon/FFGo/blob/master/docs/INSTALL/INSTALL_en Git version of the installation guide] for instance, or even better, then one coming with the particular FFGo version you want to install. Practical instructions, especially for [https://www.debian.org/ Debian] users, have also been given in [http://forum.flightgear.org/viewtopic.php?f=18&t=27054&start=90#p273972 this message on the FlightGear forum] and the following ones. This is basically what you'll find here when the section you are reading is completed.
==== MacOS X ====
Installation should be similar to how it is done on Linux with ''pip'' in most ways, once you have installed a suitable Python version. OS X expert needed for the little OS X-specific details (how to install Python in a non-intrusive way for the system, how to run ''pip'' in this particular installation, and how to create a shortcut to the resulting ''ffgo'' executable for convenience).


== Related content ==
== Related content ==
Line 140: Line 195:
* [[Integrated_Qt5_Launcher|FlightGear's integrated Qt5-based launcher]]
* [[Integrated_Qt5_Launcher|FlightGear's integrated Qt5-based launcher]]
* [[FGX|FGx]]
* [[FGX|FGx]]
== Footnotes ==
<references/>


[[Category:FlightGear front ends]]
[[Category:FlightGear front ends]]

Revision as of 18:16, 23 February 2016

This article is a stub. You can help the wiki by expanding it.


FFGo
Screenshot of FFGo 1.10.1
Screenshot of FFGo 1.10.1
Developed by Florent Rougon
Initial release 1.0.0 (Aug 21, 2015)
Latest release 1.10.1 (Feb 16, 2016)
Written in Python 3
OS Unix-like (incl. Linux), Windows, MacOS X
Development status Active (as of Feb 2016)
Type Graphical launcher for FlightGear
License WTFPL version 2
Website

FFGo is a graphical launcher for FlightGear, and a fork of FGo!. It vastly improves on FGo! by fixing bugs and adding a host of new features.

Features

One thing that distinguishes FFGo from other FlightGear launchers is the text window allowing one to write any (possibly advanced) command line options that will be passed to FlightGear. This is similar, but more convenient and powerful, to editing the .fgfsrc configuration file. The main difference in power compared to editing .fgfsrc or using FGo! comes from FFGo's use of CondConfigParser to process the user's configuration. See FFGo conditional config documentation for more information on this aspect of FFGo.

In addition to this, FFGo offers:

  • an easy setup (Preferences dialog);
  • convenient selection of aircraft and startup airport or AI carrier;
  • possibility to choose between identically-named aircrafts based on which directory they are stored in (using tooltips in the aircraft list);
  • easy selection of startup runway or parking position, offering startup locations from apt.dat if there is no groundnet-defined parking position for the selected airport;
  • detailed airport, runway, helipad and parking tooltips. Airport tooltips show things such as airport type (land airport, seaplane base or heliport), latitude, longitude, elevation, number of land runways, water runways, helipads, magnetic variation... Runway/helipad tooltips show runway type, length and width, surface type, magnetic as well as true heading, etc. Parking tooltips show similar information as runway tooltips, plus maximum aircraft radius, reserved airline codes... (note: The MagneticField program from GeographicLib is needed for magnetic data)
  • easy consulting of METAR data for the nearest station relatively to the selected airport (if any);
  • a powerful Airport Finder dialog allowing one to easily find airports using various criteria: distance to a chosen, reference airport; number of land runways, water runways, or helipads; length of the longest or shortest runway in the airport, etc. The table of results displays, among others, the distance and bearings between the reference airport and each “result airport”. It can be sorted according to any column with a simple click on the column header.
  • a GPS Tool dialog allowing one to find the distance, initial and final bearings for the shortest path between two given airports. The dialog also computes the flight duration for a given ground speed, and vice versa.
  • easy selection of one or more scenarios, allowing one to browse the description of each available scenario;
  • realtime preview of the arguments that would be passed to fgfs (the FlightGear executable) if the Run FG button were to be pressed;
  • the possibility to copy to the clipboard a shell command that is equivalent to what FFGo would do if the Run FG button were to be pressed;
  • the option to translate fgfs' --parkpos option into the corresponding combination of --lat, --lon and --heading options. This behavior can be enabled using the Fake the --parkpos option checkbox found in the Miscellaneous tab of the Preferences dialog. It is useful when the --parkpos option is broken in FlightGear (which is unfortunately the case in January 2016, for the next branch of FlightGear's Git repository);
  • easy viewing and saving of FlightGear output (log);
  • automatic FFGo + FlightGear log saving and rotating.

Screenshots

Main window and Command Window

Airport tooltip and preview of the FlightGear command at Madeira (LPMA)

Starting from version 1.10.0, FFGo remembers how many days you used each aircraft, or visited each airport, during a user-defined period (see the Statistics tab in the Preferences dialog). This data is subject to expiration via configurable periods too. These simple statistics allow FFGo to know which aircrafts (resp. airports) you used (resp. visited) most during the selected period, and present them first in the aircrafts (resp. airports) list. You can still sort the lists based on other criteria if you wish (aircraft or airport name, airport ICAO code...) by simply clicking on the corresponding column headers. Click a second time on a given column header to reverse the sort order.

The FlightGear Command window shows exactly which arguments are going to be passed to the FlightGear executable (fgfs) when the Run FG button is clicked. It can be resized, hidden, detached (as in the screenshot) or attached to FFGo's main window.

Note  If you want to copy these arguments to the clipboard for use in a shell (“command line”), use the corresponding function from the Tools menu (Copy FG shell-equivalent command). This will prepend the configured path to the FlightGear executable, properly quote all arguments for a POSIX shell (which might contain spaces or other special characters), and separate them with spaces.

The Preferences dialog

The Tools menu

Selecting AI scenarios

You may select one or more AI scenarios to load from the Scenarios popup menu. Selecting a scenario does nothing particular for FFGo, but each selected scenario will be passed as part of a --ai-scenario=... option to FlightGear when it is started. Left-clicking on a scenario name toggles selection of this scenario. Right-clicking displays its description.

Selecting an AI carrier

Instead of starting at an airport, you can select an AI carrier in the Carrier popup menu and FFGo will make you start there, automatically adding the corresponding AI scenario. In order to make the Carrier popup menu appear, just click on the airport ICAO code below the aircraft image.

If you choose a different carrier or quit “carrier mode” (by choosing None in the Carrier popup menu, or simply selecting an airport in the airport list), the scenario for the selected carrier will be automatically removed from the list of scenarios to load.

Weather info — the METAR widget

The METAR widget allows one to check the latest weather information for the selected airport. It is available from the Tools menu.

Airport metadata

Airport tooltips

Runway tooltips

Parking tooltips

The Airport Finder dialog

The Airport Finder dialog, accessible under the Tools menu, allows one to easily find airports using various criteria: distance to a chosen, “reference airport”; number of land runways, water runways, or helipads; length of the longest or shortest runway in the airport, etc. Results are listed in a table giving these criteria for each airport as well as the initial and final bearings for the shortest path from or to the reference airport. The table of results can be sorted according to airport ICAO code, name or any of the aforementioned criteria (click on a column header to sort according to the corresponding field; click a second time on the same column header to reverse the sort order).

This dialog is fairly versatile, but one of the uses it is particularly well-suited for is to find a start airport in the desired range with respect to a given airport. For instance, let's say you saw on the multiplayer map that someone is offering Air Traffic Control (ATC) services at MHTG (just an example), and you are looking for an airport that is neither too close, nor too far from MHTG in order to take off there and land at MHTG, following instructions from the air traffic controller. Since it is possible, in the Airport Finder dialog, to sort found airports based on bearings from, or to the reference airport, you can also easily find airports that are, for instance, located more or less north-east of the reference airport. Many, many other things are possible. cf. this forum message for more details.

The GPS Tool dialog

The GPS Tool dialog allows one to find the distance, initial and final bearings for the shortest path between two given airports. The dialog also computes the flight duration for a given ground speed, and vice versa.

This dialog should be more convenient than the Airport Finder dialog for the cases where you already know the start and destination airports you are interested in, and you just want to get the results for these airports. Or you want to check several pairs of airports, and you know precisely which ones you want the calculations to be done for.

Installation tips

Instructions — Read this first!

Since installation instructions may in general depend on the particular FFGo version you want to install, they are always included in release tarballs and zip files, precisely in the docs/INSTALL folder. Such tarballs and zip files can be downloaded from FFGo's home page as well as from FFGo's page on PyPI (PyPI being the Python Package Index). However, apart from the addition of a small number of optional dependencies, the installation method hasn't changed since FFGo 1.0.0, therefore there is little risk for now using the online Git version of the installation guide.

The guide mentioned in the previous paragraph is rather detailed, because it explains a few concepts that may be new to users who are not Python developers, and tries to give general instructions covering all common cases, which is not very easy given that Python may or may not be shipped depending on the particular operation system in use (Windows, Linux, MacOS X, etc.). To the contrary, the following sections give specific instructions applicable in the most common cases on each OS where I know a working procedure. They are more practical, probably easier to follow than the installation guide, at the expense of being less generic.

Sample installations

Windows

Typical FFGo installation on Windows is easy, because there is no system Python shipped with Windows, therefore there is no risk of messing up your Windows installation by just installing or upgrading Python packages. The instructions below assume you have no existing Python installation on your Windows system.[1] There we go:

  1. Install Python 3.4 or later:
    1. Download Python from the Python home page.
    2. Make sure to enable the Tcl/tk and pip components in the installer.
    3. Don't change the default value for the Python installation folder, otherwise you are likely to run into permission problems: except for old versions of Windows, writing to Program Files, at least, is subject to special restrictions that may cause the pip install step to fail.
    4. If you are not comfortable with the command line (“Command Prompt”), it is suggested you choose Add python.exe to Path. This way, you will be able to run the pip and ffgo programs directly at the Command Prompt without having to specify their full paths.
  2. Open a terminal, aka “Command Prompt”:

    There are various ways to do this, depending on the version of Windows in use. One way that should work is using the Windows+R keyboard shortcut, then entering cmd.exe in the text input box. Apparently (according to Google, see for yourself), on Windows 10, this can (also?) be done with the Windows+X keyboard shortcut, then choosing Command Prompt in the menu that should appear.

  3. In this terminal, type:
    pip install FFGo Pillow geographiclib
    FFGo can work without Pillow and geographiclib, but it will offer more features if you install them. The previous command should automatically download and install FFGo from FFGo's page on PyPI.

    Note: pip install ffgo has the same effect as pip install FFGo.

Note:

Messages such as

warning: no previously-included files found matching 'docs\README.conditional-config\_static\README.txt'

when running the pip install ... command are completely normal and harmless, just ignore them. This command should print something like:

Successfully installed CondConfigParser FFGo Pillow geographiclib

towards the end if all went well.

After these steps, you should have a working FFGo. You can run it by double-clicking on either ffgo.exe or ffgo-noconsole.exe in a directory such as C:\PythonXY\Scripts, where XY corresponds to the Python version that was used in the pip install FFGo ... command. These two executables do the same, except ffgo.exe opens a Windows terminal (“console”) containing all FFGo messages, while ffgo-noconsole.exe doesn't. You can safely use the latter most of the time. Should FFGo refuse to start for some reason, running ffgo.exe and examining/reporting the printed messages would certainly be helpful. You may create a shortcut on your desktop for these files by right-clicking on the .exe file of your choice.

Another way to run FFGo is to open a Command Prompt and type:

  • ffgo if you chose Add python.exe to Path in the Python installer as hinted above;
  • or a full path to one of the FFGo executables, such as C:\PythonXY\Scripts\ffgo.exe in case you didn't.

The instructions given here install all dependencies of FFGo, except one optional dependency: the MagneticField executable from GeographicLib. To have a complete installation, that is able to show the magnetic variation at each airport and magnetic headings for runways, routes, etc., you need to do this in addition:

  1. Follow GeographicLib's Download link, download and install it.
  2. If this installation added the folder containing GeographicLib's executables to the PATH environment variable, then you don't have anything more to do, FFGo will automatically find MagneticField and use it.
  3. Otherwise, run FFGo as explained above, open the Settings → Preferences dialog, go to the Miscellaneous tab, and enter the precise path where MagneticField[2] is installed in the corresponding field. Click Save settings and you should be done.

The FFGo dialog reachable via Help → About displays the versions of the main dependencies used by FFGo. In case you entered an invalid path, or some other error, a hint is generally given there. In any case, troubleshooting information is always printed to the terminal (if you ran ffgo.exe as opposed to ffgo-noconsole.exe) and to the FFGo log file located in the %APPDATA%\FFGo\config folder (do a Google search with keywords “Windows” and “APPDATA” if you don't know what this means).

Linux

This section will be completed later. In the meantime, you can consult the Git version of the installation guide for instance, or even better, then one coming with the particular FFGo version you want to install. Practical instructions, especially for Debian users, have also been given in this message on the FlightGear forum and the following ones. This is basically what you'll find here when the section you are reading is completed.

MacOS X

Installation should be similar to how it is done on Linux with pip in most ways, once you have installed a suitable Python version. OS X expert needed for the little OS X-specific details (how to install Python in a non-intrusive way for the system, how to run pip in this particular installation, and how to create a shortcut to the resulting ffgo executable for convenience).

Related content

Footnotes

  1. If you do, the general principle is the same, but you'll have to make sure to invoke pip for the right Python installation, for instance with:
    py -3.5 -m pip install FFGo Pillow geographiclib
    to run pip with a Python 3.5 installation (not having Windows, I haven't been able to test this myself; please remove this parenthesis if this works, otherwise report on the FFGo thread on the FlightGear forum with enough details to allow me to help you).
  2. Presumably MagneticField.exe, please correct this if you can do the actual check.