Skip to content
tobiz edited this page Sep 13, 2021 · 65 revisions

Welcome to the OGN-Flogger-V2.2 wiki!

OGN-Flogger is a Python APRS/OGN program to log flight times, duration and maximum heights achieved.

0. Objectives

The objectives of OGN-Flogger are to provide a fully automated glider flight duration and flight costing application using Flarm data. The flight log data should include:

  • Start and end time
  • Duration
  • Maximum altitude achieved
  • Whether winch or aero tow launch
  • If aero tow launch then the release height and registration of the towing aircraft
  • A map showing the track of a flight
  • If the flight lands out then the landing coordinates to be emailed to a designated recipient
  • The daily flight log data to be capable of being emailed to a designated recipient
  • The cost of each flight to be computed according to a user defined set of flight charging plans

1. Functionality

1.1 Screen Shots

1.1.1 General

Once a change has been made to any of the fields in any tab click the green "Update" button to make the change, or the red "Cancel" button if the change is to not take effect. To run the app click the "Run" menu item at the top of the screen and click "Start" or "Stop" as required. Once "Run" has been clicked the app runs until sunset (really, dusk) when it stops logging data and starts its analysis process, this takes a few seconds depending on the power of the machine on which it is run. To exit the app click the menu "File" item and click the "Quit" drop down button.

1.1.2 APRS Setup Tab

This specifies how to access the APRS server to receive the FLARM data and which FLARM base stations to receive the data from. Most of the fields should not be changed except for the APRS Username and Passcode and the FLARM Base Station list. If you have one at your own airfield this is a good first choice, the more there are the better the results in particular the tracks will have more points and hence be more accurate. Hover the mouse over these fields to find out how to setup an account to access the APRS server: THESE FIELDS MUST BE CHANGED.

1.1.3 Airfield Data Tab

This specifies the home or base airfield from which glider launch data is to be collected. The Airfield Name specified has to be that used by FLARM or OGN databases. The Airfield Details field is the name of the location used on digital maps. When this value is supplied it is used to retrieve the latitude, longitude and altitude from a digital map database. FLARM Radius is the distance in km up to which FLARM signals are to be used. Landout Radius is distance in metres from the airfield which is considered a landout. Data retention is number of days which data is to be held; after this specified number of days it is deleted. Horizon adjustment is determined by the height of the airfield above sea level and can be set zero. If known it gives a more accurate result in the calculation for determining dusk; at which time it is assumed all flying will have stopped and the database of the days flight details can be processed.

1.1.4 Flight Config Tab

This specifies the data used to determine which data is recorded and used to determine a flight. Minimum Flight Time is used to determine what is and what isn't a flight, for example a cable break on launch or some other abort. It has been determined by trial and error that 4mins is about right, but it is worth experimenting for your own use. Minimum Take Off and Landing Speed field are also used to determine what is and what isn't a flight. For example if it was zero then the aircraft wasn't flying the data would be logged and the database would get very large. So some value greater than zero is needed and 10kph has been found satisfactory. The same goes for Minimum QFE and 100ft has been found to give good results. Tug Launch Time is the time between a tug taking off and another aircraft, eg a glider. This is used to determine which tug launched which glider and again 50 seconds has been found to work. Min Time Between Flights is used to determine what is and what isn't a flight. For example a glider might start a take off run reach the minimum vertical take of speed and then for some reason drop down below that speed but subsequently pull away. In this case this could be considered as 2 separate flights but is really only one, the parameter stops this happening. Landout Msg Mode if specified will send an email to a designated address if a glider lands outside the specified airfield range with the glider registration and landing coordinates, at the moment only email can be specified but Txt msg is a possibility but not offered. The column of buttons on the right hand side enable various options to be set and are, hopefully self explanatory.

1.1.5 Fleet List Tab

This specifies the gliders, tugs etc which are part of the club fleet and for which flight data is to be logged. Aircraft can be added and removed from the list using the "Add Aircraft to Fleet" box. Each aircraft must be given a unique number in a designated range: 0-99 for gliders; 100-199 for tugs; 200-299 for motor gliders; 300-399 for anything else, eg helicopters etc. This coding is just to enable the system to determine which are gliders and tugs. The system does enable aircraft to be added and removed.

1.1.6 Advanced Tab

This section specifies data used to setup and control the application and should not be changed.

1.1.7 Flight Logs Tab

First example, more to follow showing winch launches, motor gliders etc. If you check the results with Ktrax Logbook, the results are the same except OGN-Flogger integrates the tug flights to gliders.

1.1.8 Flight Track Maps

This is an example of double clicking a row of a table similar to the one above.

1.2 Operation

1.2.1 General

Once OGN-Flogger has been successfully installed (see section 2) it has to be initiated from the command "python flogger_gui.py". However depending on how your system is set up it may be possible to just double click "flogger_gui.py" and it will start. If you initiate OGN-Flogger as a command then there will be a stream of console output, a Splash screen will appear and finally the main window as described in section 1.1; the console output will stop at this point. Once having configure the options, from the top drop down menu select "Start". The state will change from "Stopped" to running and the slider field below will move from side to side indicating the system is running. If you have console output enabled at this time a stream of output will appear illustrating the system is running, connected to the APRS Server for data, receiving data and processing it. This will continue until sunset at which time the console output indicate the day's data has been processed and the results available under the "Flight Log" tab, today's date will be highlighted and double clicking on the date will bring up the results in the box below, double clicking on any row will display the track on a map in a separate window (see 1.1.8).

1.2.1 Methodology

The processing method used is to build a database of flight information from the start time to sunset (it assumes all flights will have been completed by then), it computes sunset time using the airfield coordinates supplied in the configuration data. After sunset a series of algorithms are used to process the database to build a final table of actual flight data. This flight data table can then be emailed to a designated recipient and the track data table presented from which the actual flight tracks can then be displayed.

2. Installation

At the moment there is no really simple way to install this software, you can't just go to a website, double click and it's done. This is due to a number of technical reasons and it is the ultimate intention that this is possible. So for now the following methods are offered.

2.1 The Simple way

The simple way to install OGN-Flogger is to download the source code from the github website onto your machine, make sure you have the Python programming language installed (this might not standard in Microsoft Windows but is in all Linux systems and its derivatives - not sure about Android). You then need to install a set of Python programs used by OGN-Flogger. These include:

  • gpxpy
  • aerofiles
  • certifi
  • matplotlib
  • aprslib
  • pytz
  • geopy
  • requests
  • configobj
  • geocoder
  • mplleaflet
  • LatLon
  • PyQt4
  • pyephem
  • parse
  • adhocracy_pysqlite

This can be done by running the program pip, eg: pip install gpxpy etc.

You will also need to install the application sqlite3 and python-pysqlite2. Sqlite3 is not a Python program and can't be installed by pip but python-pysqlite2 can; sqlite3 should be installed by the method applicable to your operating system.

You will also need to install "pyrcc4" and "PyQt4". These are used by OGN-Flogger to create the UI. To install pyrcc4 and PyQt4 see
https://splinter.readthedocs.io/en/latest/drivers/installing_pyqt.html.

If you're using Ubuntu (or maybe a derivative) then pyrcc4 can be found here: http://manpages.ubuntu.com/manpages/bionic/man1/pyrcc4.1.html.

Having got this far goto the folder "src" in the downloaded code and execute "python flogger_gui.py". On Linux based systems this should be done from a console terminal window by the command line. On Windows this is not so obvious since it is a more graphically orientated OS; to do this select "Run", type in "cmd" and a window will come up into which type "python flogger_gui.py". For both operating systems if you just double click on "flogger-gui.py" if it fails to run you won't be able to see what the problem is. If everything is ok the program will run, more than likely it won't run but will say some modules are missing, it will tell you which ones. Keep running "python flogger_gui.py" until none of the missing module messages appear and the screen shown in this wiki will appear. Fill in the fields with your values and select "Run->Start from the top level menu bar.

2.2 The Developers way

Firstly install the Integrated Development Environment (IDE) "Eclipse". Add to Eclipse the PlugIns for PyDev and Git. Then clone OGN-Flogger from the github website as a new Project. You will need to install the additional programs on your machine as mentioned above. Now you can run src->flogger_gui.py by selecting "Run as"->"Python Run" from the Eclipse menus. If it fails with missing modules repeat as above.

The advantage of this method is that you can join in the development of OGN-Flogger, find bugs and suggest how to fix them, propose enhancement etc.

2.3 The Really Simple Way

The really simple method requires that the whole package has been built as a single executable using the application pyinstaller and the resultant package is on the OGN-Flogger website. Whilst this has been done and tested on both Linux and Windows machines the result has the minor drawback that the facility to present the flight tracks on a map doesn't work; this is due to an issue with the pyinstaller system and as yet a solution has not been found, until it is OGN-FLogger will not be available in this format.

2.3.1 Linux Install

TBS

2.3.2 Windows Install

TBS