How emper0r/ivao-status works
Project Type & Purpose
• This is a desktop application developed in Python using PyQt4 that displays the status of pilots on the International Virtual Aviation Organisation (IVAO) network.
• Its aim is to allow Linux users to check the status of players online, integrating a graphical user interface (GUI) and mapping via OpenLayers (JavaScript-based) for geographic information display.
• The project includes a SQLite database (built via ivao_status.sql and rebuilt by BuildDB.py) storing aviation-related data (aircraft, airlines, airports, etc.).
Main Components
a. User Interface (UI):
• QtUI directory: Contains Qt Designer .ui files (e.g., MainWindow_UI.ui, SettingWindow_UI.ui) which define the layout for various windows.
• GUI related modules in the modules folder (e.g., MainWindow_UI.py, FOLME_UI.py, ControllerInfo_UI.py, PilotInfo_UI.py, etc.) that bind these UI definitions with application logic.
b. Business Logic & Modules:
• Python modules under the modules directory implement core application logic including database building (BuildDB.py), mapping (MapView.py), scheduling (Schedule.py), and flight status (StatusFlight.py).
• Additional helper modules (e.g., distance.py, format.py, util.py) for computations and formatting.
• The presence of subdirectories like “windows”, “x64”, and “x86” can be seen as support code variations, likely for different operational modes or architectures.
c. Data Storage:
• The database directory contains various .dat files and ivao.db (an SQLite database) which holds detailed aviation data such as aircraft, airlines, airports, fir (flight information regions), etc.
• The ivao_status.sql script is used to rebuild the database if necessary.
d. Mapping Component:
• The OpenLayers directory holds JavaScript and CSS assets needed to render maps (using the OpenLayers library), which is integrated with the application to display geographic layers.
• This part demonstrates an integration of Python business logic with web-based mapping technology.
e. Static Resources & Assets:
• Config.cfg and Settings.py provide configuration settings controlling aspects of the application.
Relationships & Interactions
• The UI components (from QtUI) interact with backend modules (inside modules) to fetch and present data.
• Database operations are abstracted in modules like BuildDB.py and SQL_queries.py which interact with the SQLite database stored in the database directory.
• The mapping functionality (through OpenLayers) is invoked by modules such as MapView.py to render flight locations and other spatial data.
• Helper modules manage computations used across different parts of the system (e.g., converting units or calculating distances).
Architectural Patterns & Technologies
• Separation of concerns: The project clearly separates user interface components (QtUI and their corresponding modules) from business logic and data handling (modules and database directory).
• MVC-like structure: Although not a strict MVC, there’s a division between UI (View), application logic (Controller in modules), and data (the SQLite database).
• Technologies used: Python as the programming language, PyQt4 for the GUI, OpenLayers for geographic mapping (web technology), and SQLite for local database management.