Giter Club home page Giter Club logo

openpilotlog's Introduction

openPilotLog

Welcome to openPilotLog, the free and open source airline pilot logbook application! You can find the latest release here. Please not that this is still an early testing version.

Tl;dr

Airline pilots are required to maintain a logbook containing details of their flights. These logbooks were historically written by hand on paper, but of course nowadays more and more people are doing it electronically, be it in their own excel sheet or using a paid logbook software.

I have used paid solutions for many years, and have seen more and of them move from being a one-time license purchase to becoming a "Logbook as a Service" type subscription. After the one I have been using for the last couple of years, and had bought a "lifetime license" for ended up announcing they also moved to a subscription based service, I decided that it is time for a free and open source alternative that is fast, easy to use, and does not require a subscription.

How does it look like?

Here are some screenshots:

Alt Screenshot 1

Alt Screenshot 2

The state of the project!

openPilotLog is currently in development, it is not recommended to use it as your primary logbook solution just yet. If you would like to be informed about upcoming stable releases, you can subscribe to our newsletter.

If you want to learn more about this project, check out the wiki or the blog!

For developers, the code documentation can be found at our doxygen pages. If you are interested in contributing to the project, you can get in touch here.

Installation

Right now, there are only testing versions available, so I have not created installers for them. Since this version is aimed at early testers and advanced users, some manual steps may be required to install openPilotLog.

Windows

Download and install the release and unzip it to a destination folder of your liking.

macOS

Download and open the .dmg file for your configuration (arm64 - M1/M2 based machines, x86_64 - Intel based).

Linux - using flatpak

Make sure you have flatpak installed and working. Then download the release and install the package.

# Requires kde platform runtime version `5.15-21.08`.
flatpak install org.kde.Platform 
flatpak install --user [PathToDownloadedPackage].flatpak

# Then run the program with
flatpak run org.opl.openPilotLog

Linux - build latest from source

If you want to build the project from source you can use cmake-ninja, Qt Creator flatpak-builder (see yaml file located here). You can find more information in the deployment docs

openpilotlog's People

Contributors

fiffty-50 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

openpilotlog's Issues

Simplification of NewFlightDialog

NewFlightDialog could use some work.

  • Move the mandatoryLineEdits and the mandatoryLineEditsGood to a struct
  • Clear up naming of variables

Enhance User Experience in FirstRunDialog

Creating the database after clicking done on the last page might take a few seconds. If the user clicks done again because he got impatient, bad things happen.

  • Deactivate done button after it is pressed
  • Optionally add a QProgressDialog

The QDateEdits on the currency page are a quite unintuitive, since their time format is not obvious.

  • Add a QComboBox with choices for date formatting. Use 2-3 most widely used ones, or offer to default to system locale.
  • Add a hint (label, toolbox,...) as to which date format is used, when inputRejected is emitted, e.g. MM/DD/YYYY or DD/MM/YYYY

Affects:

  • FirstRunDialog
  • ASettings
  • SettingsWidget
  • NewFlightDialog (date format setting)

OOOI Logging

Currently only Flight Time is logged, and this is equivalent to Block Time as per EASA definition, however logging Take-Off and Landing Time should also be a possibility

How to set intial values

Hi!

Thanks for you work, it looks very nice.
I cannot find an option, to set my initial values like landings, flight time etc

It would be a little difficult to write my flights from the last year manually.

Thanks for you message, Roema

: is an illegal character in file names for windows

Upon testing a windows build I came across this problem preventing FirstRunDialog from finishing correctly. Leaving this here because I don't have access to git on this machine.

bool ADataBaseSetup::backupOldData()
{
    auto database_file = aDB->databaseFile;
    if(!database_file.exists()) {
        DEB << "No Database to backup, returning.";
        return true;
    }

    auto date_string = QDateTime::currentDateTime().toString("yyyy_MM_dd_T_hh_mm");
    auto backup_dir = QDir(AStandardPaths::absPathOf(AStandardPaths::DatabaseBackup));
    auto backup_name = database_file.baseName() + "_bak_" + date_string + ".db";
    auto file = QFile(aDB->databaseFile.absoluteFilePath());

    if (!file.rename(backup_dir.absolutePath() + '/' + backup_name)) {
        DEB << "Unable to backup old database.";
        return false;
    }
    DEB << "Backed up old database as: " << backup_name;
    return true;
}

openPilotLog not compatible with QStringBuilder globally

Qt offers QStringBuilder to efficiently create strings from concatenations using the % operator to replace +.

If DEFINES *= QT_USE_QSTRINGBUILDER is in the .pro file, the + operator can be used in the source code and will automatically interpreted as % where appropriate, making its use very convenient. Unfortunately this solution is not entirely source compatible, and currently not possible for this project.

Using the % operator is counter-intuitive and not a widely known way of concatenating strings, so it would be desirable to be able to enable QStringBuilder globally and keep using the + operator.

In order to enable QStringBuilder globally, we would need to refactor the incompatible code. At a first view these seem to be the parts creating problems:

  • REPR makro
  • ADatabaseError

Aircraft Type not correctly displayed

The aircraft type is not always correctly displayed in the LogbookWidget.

When displaying a flight with an aircraft that has only make and model values filled out, it is shown as blank in the logbookwidget.

Most likely this is a problem with the sqlite views (default view as well as easaview).

type_empty

ac_entry

Observed on: Windows 10

Work required on ADownload class/FirstRunDialog

The ADownload class depends on a working openSSL installation in order to properly download the templates.

With the current behaviour, if a connection cannot be established, the download finished signal is triggered and the result written as an empty file. This is a problem in general, but more so in the FirstRunDialog, where overwriting the template csv files renders template database creation inop and leaves the user stuck with a failing FirstRunDialog.

The ADownload class needs guards not to overwrite local files unless a connection was successfully established.
We should also harden the FirstRunDialog, I am thinking about seperating the 'default' templates from the 'downloaded' templates, in order to always have a working fallback in case errors occur during the download.

It might even be worth considering to always use local data for the database templates in the firstrundialog and add an option to "update" the database at a later stage from the gui. Like this, even if an error occurs, the user still has a working application.

Print (to PDF) function

Required functionality for v 1.0

The database needs to be printable.

The solution should be built with customization in mind:

  • what columns of the table are to be printed
  • layouts and paper sizes
  • print to different file types

However, the first implementation should follow the EASA specifications for logbooks and print to PDF.

viewComboBox in LogbookWidget does not display correct views

There is a mismatch between the viewComboBox which is selecting the logbook view to be displayed on the logbookwidget and the view that is set active on the qsqltablemodel.

Affects:

  • LogbookWidget
  • opl.h (mapping of views to indexes)
  • Settings

Change implementation of warning about expiring currencies

At the moment, expiring currencies are only shown on the HomeWidget if they are selected as 'active' in the settingswidget. This is only the case for Take-off and Landing currency at the moment.

With approaching currency expiration dates, the expiring currency should be shown in the homewidget, even if it is not 'active', if the user has selected to be warned about expiring currencies.

Affects:

  • HomeWidget

Develop BackupWidget

The purpose of the BackupWidget is to primarily enable backing up and restoring the database to and from backupdir as in AStandardPaths, but should also allow exporting and importing the database to an external path (a Pen Drive, a cloud folder etc.)

So what I have in mind is a widget containing the following:

  • 'Backup Database' (or similar) button that creates a copy of the current database and places it in backupdir
  • A view of available backups in backupdir, maybe a QTableView or QListView presenting the backup dates from which the user can select a backup.
  • 'Restore Backup' (or similar) button that copies the selected backup from the list from backupdir to DatabaseLocation.
  • Delete Backup to delete an outdated backup, a duplicate or do some 'housekeeping'
  • Similar to Backup and Restore, the option to Import and Export the database, but instead of writing/reading to/from the backupdir, a QFileDialog (or similar) enables the user to choose the Location of the Backup.

Apart from that basic layout, we also need to think about how to verify that the file the user wants to import is valid, so we need to establish some requirements that a file must fulfill in order to be acceptable.

Nice to have: The list of available backups can display a few key dates about the backup itself when selecting a line from the QTableView, for example something like:

"Backup from 2021-02-12, 364 Flights with 748:33h Total Time, last Flight: KJFK-EDDF on 2021-01-03"

User-facing style options could be more straight-forward

In the settings widget, the user can select a style for the application.

At the moment, this is done using a Drop-Down menu (QCombobox) filled with the available styles on the system, and an additional Checkbox to activate the dark stylesheet.

This leads to a somewhat confusing user experience, since selecting the stylesheet overrides the selection in the Drop-Down menu.

Since the distinction between style and stylesheet is irrelevant to the end user, I would suggest handling this behind the scenes, by integrating the option for the dark stylesheet into the Dropdown Menu as Breeze-dark (and Breeze-light for the light theme) so that on each platform we can offer the styles that are available on the system, plus the Breeze styles via stylesheets.

Default Style Sheet Dark

Observed behaviour:

On first run, the FirstRunDialog is styled with the dark stylesheet

Desired behaviour:

Default stylesheet should be no style shee.

Observed on: Windows 10, Qt 5.15.2

Steps to reproduce: Delete all config files and start the application.

Additional Observation: Fusion is a good choice for windows, the 'native' windows style looks horrible.

Database import not working on first launch

When the program is launched and no valid database is detected, or upon first launch, the option to import an existing database is not working consistently across platforms.

Affects:

  • FirstRunDialog
  • Database::restoreBackup
  • BackupWidget

Aircraft Database incomplete

The aircraft database has some missing fields in the templates, e.g. engine types, weight classes for EMB/CRJ

File preprocessing to avoid `QStringLiteral` and loss of sanity

After going up and down in oplconstant.h i have started seeing stars in the form of QStringLiterals.
It would ease developement boilerplate to separate syntax checking and add a custom preprocessing command to set any "literal" to QStringLiteral("literal"). That way the dev wont have to write it every time. The build tools will do it for him.

Clang and gcc have flags to check for syntax errors and exit. Should the error code be 0 it means that the code is syntactically valid and we can do text substitution to replace the literals to QStringLiterals. With python the substitution logic is 2 lines

import re
new_content = re.sub(r'(?<!\()(".+")', 'QStringLiteral(\g<1>)', src)

image

That requires setting up the CI/CD chain however so its no trivial task

Importing flights

An interface for automatically importing flight data is desirable. This is something I am planning on introducing after the initial release due to its complexity.

There are several ways of doing this

Importing and parsing a PDF

  • very complex, lots of different formats, PDF parsing breaks easily with minor changes
  • probably a nightmare to maintain, requires constant care

Accessing a flight tracker API

  • FlightRadar24 or similar
  • Should contain all the basic data required (OOOI, Registration, Departure, Destination,...)
  • Should require little maintenance once implemented
  • Problem: Most APIs have a commercial license ($$$)

Handling Unknown Airport Identifier

Currently it is only possible to log a flight to / from an airport contained in the database.

An option needs to be created to allow for logging flights to / from airfields not contained in the database.

Implications for:

  • Night Time Logging
  • Interface with Aiports Database via Widget - Enable editing globally or just for user created entries?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.