Enroute Flight Navigation
A navigation app for VFR pilots
src
traffic
TransponderDB.h
1
/*
2
* This class implements an algorithm to decode the 24-bit transponder address to a callsign for some countries.
3
* It is based on code from dump1090 at
4
* https://github.com/mutability/dump1090/blob/unmaintained/public_html/registrations.js
5
* under GPLv2 license.
6
*/
7
8
#pragma once
9
10
#include <QObject>
11
#include <QHash>
12
#include <QString>
13
14
namespace
Traffic {
15
22
class
TransponderDB
:
public
QObject {
23
Q_OBJECT
24
25
public
:
32
explicit
TransponderDB
(QObject* parent =
nullptr
);
33
40
Q_INVOKABLE QString
getRegistration
(
const
QString& address)
const
;
41
42
private
:
49
QString registration_from_hexid(
const
QString& address)
const
;
50
};
51
52
}
// namespace Traffic
Traffic::TransponderDB::getRegistration
Q_INVOKABLE QString getRegistration(const QString &address) const
Get registration for a given ICAO address.
Traffic::TransponderDB::TransponderDB
TransponderDB(QObject *parent=nullptr)
Default constructor.
Generated by
1.14.0