Enroute Flight Navigation
A navigation app for VFR pilots
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
14namespace Traffic {
15
22class TransponderDB : public QObject {
23 Q_OBJECT
24
25public:
32 explicit TransponderDB(QObject* parent = nullptr);
33
40 Q_INVOKABLE QString getRegistration(const QString& address) const;
41
42private:
49 QString registration_from_hexid(const QString& address) const;
50};
51
52} // namespace Traffic
Q_INVOKABLE QString getRegistration(const QString &address) const
Get registration for a given ICAO address.
TransponderDB(QObject *parent=nullptr)
Default constructor.