mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 02:45:33 +08:00
Remove unused adfsystem
This commit is contained in:
committed by
Mat Sutcliffe
parent
c0efc9ea81
commit
beeabb51c2
@@ -1,79 +0,0 @@
|
|||||||
/* Copyright (C) 2013
|
|
||||||
* swift project Community / Contributors
|
|
||||||
*
|
|
||||||
* This file is part of swift project. It is subject to the license terms in the LICENSE file found in the top-level
|
|
||||||
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
|
|
||||||
* or distributed except according to the terms contained in the LICENSE file.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//! \file
|
|
||||||
|
|
||||||
#ifndef BLACKMISC_AVIATION_ADFSYSTEM_H
|
|
||||||
#define BLACKMISC_AVIATION_ADFSYSTEM_H
|
|
||||||
|
|
||||||
#include "blackmisc/blackmiscexport.h"
|
|
||||||
#include "blackmisc/aviation/modulator.h"
|
|
||||||
|
|
||||||
namespace BlackMisc::Aviation
|
|
||||||
{
|
|
||||||
//! ADF system ("for NDBs")
|
|
||||||
class BLACKMISC_EXPORT CAdfSystem :
|
|
||||||
public CModulator<CAdfSystem>,
|
|
||||||
public Mixin::MetaType<CAdfSystem>,
|
|
||||||
public Mixin::JsonOperators<CAdfSystem>,
|
|
||||||
public Mixin::Index<CAdfSystem>
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
//! Base type
|
|
||||||
using base_type = CModulator<CAdfSystem>;
|
|
||||||
|
|
||||||
BLACKMISC_DECLARE_USING_MIXIN_METATYPE(CAdfSystem)
|
|
||||||
BLACKMISC_DECLARE_USING_MIXIN_INDEX(CAdfSystem)
|
|
||||||
|
|
||||||
//! Default constructor
|
|
||||||
CAdfSystem() = default;
|
|
||||||
|
|
||||||
//! Constructor
|
|
||||||
CAdfSystem(const QString &name, const PhysicalQuantities::CFrequency &activeFrequency,
|
|
||||||
const PhysicalQuantities::CFrequency &standbyFrequency = { 0, BlackMisc::PhysicalQuantities::CFrequencyUnit::nullUnit() }):
|
|
||||||
CModulator(name, activeFrequency, standbyFrequency.isNull() ? activeFrequency : standbyFrequency)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
//! Valid aviation frequency?
|
|
||||||
static bool isValidFrequency(const PhysicalQuantities::CFrequency &f)
|
|
||||||
{
|
|
||||||
double fr = f.valueRounded(PhysicalQuantities::CFrequencyUnit::kHz(), 3);
|
|
||||||
return fr >= 190.0 && fr <= 1750.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! ADF1 unit
|
|
||||||
static CAdfSystem GetAdf1System(double activeFrequencyKHz, double standbyFrequencyKHz = -1)
|
|
||||||
{
|
|
||||||
return CAdfSystem(CModulator::NameCom1(), PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()));
|
|
||||||
}
|
|
||||||
|
|
||||||
//! ADF1 unit
|
|
||||||
static CAdfSystem GetAdf1System(const PhysicalQuantities::CFrequency &activeFrequency,
|
|
||||||
const PhysicalQuantities::CFrequency &standbyFrequency = { 0, BlackMisc::PhysicalQuantities::CFrequencyUnit::nullUnit() })
|
|
||||||
{
|
|
||||||
return CAdfSystem(CModulator::NameCom1(), activeFrequency, standbyFrequency.isNull() ? activeFrequency : standbyFrequency);
|
|
||||||
}
|
|
||||||
|
|
||||||
//! ADF2 unit
|
|
||||||
static CAdfSystem GetAdf2System(double activeFrequencyKHz, double standbyFrequencyKHz = -1)
|
|
||||||
{
|
|
||||||
return CAdfSystem(CModulator::NameCom2(), PhysicalQuantities::CFrequency(activeFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()), PhysicalQuantities::CFrequency(standbyFrequencyKHz < 0 ? activeFrequencyKHz : standbyFrequencyKHz, PhysicalQuantities::CFrequencyUnit::MHz()));
|
|
||||||
}
|
|
||||||
|
|
||||||
//! ADF2 unit
|
|
||||||
static CAdfSystem GetAdf2System(const PhysicalQuantities::CFrequency &activeFrequency,
|
|
||||||
const PhysicalQuantities::CFrequency &standbyFrequency = { 0, BlackMisc::PhysicalQuantities::CFrequencyUnit::nullUnit() })
|
|
||||||
{
|
|
||||||
return CAdfSystem(CModulator::NameCom2(), activeFrequency, standbyFrequency.isNull() ? activeFrequency : standbyFrequency);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
} // ns
|
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(BlackMisc::Aviation::CAdfSystem)
|
|
||||||
|
|
||||||
#endif // guard
|
|
||||||
@@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
#include "blackmisc/aviation/altitude.h"
|
#include "blackmisc/aviation/altitude.h"
|
||||||
#include "blackmisc/aviation/heading.h"
|
#include "blackmisc/aviation/heading.h"
|
||||||
#include "blackmisc/aviation/adfsystem.h"
|
|
||||||
#include "blackmisc/aviation/comsystem.h"
|
#include "blackmisc/aviation/comsystem.h"
|
||||||
#include "blackmisc/aviation/navsystem.h"
|
#include "blackmisc/aviation/navsystem.h"
|
||||||
#include "blackmisc/aviation/transponder.h"
|
#include "blackmisc/aviation/transponder.h"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include "blackmisc/aviation/modulator.h"
|
#include "blackmisc/aviation/modulator.h"
|
||||||
#include "blackmisc/aviation/comsystem.h"
|
#include "blackmisc/aviation/comsystem.h"
|
||||||
#include "blackmisc/aviation/navsystem.h"
|
#include "blackmisc/aviation/navsystem.h"
|
||||||
#include "blackmisc/aviation/adfsystem.h"
|
|
||||||
#include "blackmisc/pq/units.h"
|
#include "blackmisc/pq/units.h"
|
||||||
#include "blackmisc/propertyindexref.h"
|
#include "blackmisc/propertyindexref.h"
|
||||||
#include "blackmisc/comparefunctions.h"
|
#include "blackmisc/comparefunctions.h"
|
||||||
@@ -243,26 +242,11 @@ namespace BlackMisc::Aviation
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class AVIO>
|
|
||||||
const QString &CModulator<AVIO>::NameAdf1()
|
|
||||||
{
|
|
||||||
static QString n("ADF1");
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
template <class AVIO>
|
|
||||||
const QString &CModulator<AVIO>::NameAdf2()
|
|
||||||
{
|
|
||||||
static QString n("ADF2");
|
|
||||||
return n;
|
|
||||||
}
|
|
||||||
|
|
||||||
// see here for the reason of the forward instantiations
|
// see here for the reason of the forward instantiations
|
||||||
// https://isocpp.org/wiki/faq/templates#separate-template-fn-defn-from-decl
|
// https://isocpp.org/wiki/faq/templates#separate-template-fn-defn-from-decl
|
||||||
//! \cond PRIVATE
|
//! \cond PRIVATE
|
||||||
template class CModulator<CComSystem>;
|
template class CModulator<CComSystem>;
|
||||||
template class CModulator<CNavSystem>;
|
template class CModulator<CNavSystem>;
|
||||||
template class CModulator<CAdfSystem>;
|
|
||||||
//! \endcond
|
//! \endcond
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -116,12 +116,6 @@ namespace BlackMisc::Aviation
|
|||||||
//! NAV3
|
//! NAV3
|
||||||
static const QString &NameNav3();
|
static const QString &NameNav3();
|
||||||
|
|
||||||
//! ADF1
|
|
||||||
static const QString &NameAdf1();
|
|
||||||
|
|
||||||
//! ADF2
|
|
||||||
static const QString &NameAdf2();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_name; //!< name of the unit
|
QString m_name; //!< name of the unit
|
||||||
PhysicalQuantities::CFrequency m_frequencyActive; //!< active frequency
|
PhysicalQuantities::CFrequency m_frequencyActive; //!< active frequency
|
||||||
@@ -158,11 +152,9 @@ namespace BlackMisc::Aviation
|
|||||||
//! \cond PRIVATE
|
//! \cond PRIVATE
|
||||||
class CComSystem;
|
class CComSystem;
|
||||||
class CNavSystem;
|
class CNavSystem;
|
||||||
class CAdfSystem;
|
|
||||||
|
|
||||||
extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE CModulator<CComSystem>;
|
extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE CModulator<CComSystem>;
|
||||||
extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE CModulator<CNavSystem>;
|
extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE CModulator<CNavSystem>;
|
||||||
extern template class BLACKMISC_EXPORT_DECLARE_TEMPLATE CModulator<CAdfSystem>;
|
|
||||||
//! \endcond
|
//! \endcond
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
void registerMetadata()
|
void registerMetadata()
|
||||||
{
|
{
|
||||||
CAdfSystem::registerMetadata();
|
|
||||||
CAircraftEngine::registerMetadata();
|
CAircraftEngine::registerMetadata();
|
||||||
CAircraftEngineList::registerMetadata();
|
CAircraftEngineList::registerMetadata();
|
||||||
CAircraftIcaoCode::registerMetadata();
|
CAircraftIcaoCode::registerMetadata();
|
||||||
|
|||||||
Reference in New Issue
Block a user