mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +08:00
refactor(pq): Remove unused constants
This commit is contained in:
@@ -139,8 +139,7 @@ namespace swift::sample
|
|||||||
<< tsqv.userType() << Qt::endl;
|
<< tsqv.userType() << Qt::endl;
|
||||||
|
|
||||||
// Aviation
|
// Aviation
|
||||||
const CComSystem comSystem =
|
const CComSystem comSystem = CComSystem("DBUS COM1", CPhysicalQuantitiesConstants::FrequencyUnicom(),
|
||||||
CComSystem("DBUS COM1", CPhysicalQuantitiesConstants::FrequencyInternationalAirDistress(),
|
|
||||||
CPhysicalQuantitiesConstants::FrequencyUnicom());
|
CPhysicalQuantitiesConstants::FrequencyUnicom());
|
||||||
testServiceInterface.receiveComUnit(comSystem);
|
testServiceInterface.receiveComUnit(comSystem);
|
||||||
qtout << "Send COM via interface " << comSystem << Qt::endl;
|
qtout << "Send COM via interface " << comSystem << Qt::endl;
|
||||||
|
|||||||
@@ -61,13 +61,6 @@ namespace swift::misc::aviation
|
|||||||
this->setFrequencyActive(physical_quantities::CPhysicalQuantitiesConstants::FrequencyUnicom());
|
this->setFrequencyActive(physical_quantities::CPhysicalQuantitiesConstants::FrequencyUnicom());
|
||||||
}
|
}
|
||||||
|
|
||||||
void CComSystem::setActiveInternationalAirDistress()
|
|
||||||
{
|
|
||||||
this->toggleActiveStandby();
|
|
||||||
this->setFrequencyActive(
|
|
||||||
physical_quantities::CPhysicalQuantitiesConstants::FrequencyInternationalAirDistress());
|
|
||||||
}
|
|
||||||
|
|
||||||
CComSystem CComSystem::getCom1System(double activeFrequencyMHz, double standbyFrequencyMHz)
|
CComSystem CComSystem::getCom1System(double activeFrequencyMHz, double standbyFrequencyMHz)
|
||||||
{
|
{
|
||||||
return CComSystem(
|
return CComSystem(
|
||||||
|
|||||||
@@ -89,9 +89,6 @@ namespace swift::misc::aviation
|
|||||||
//! Set UNICOM frequency as active
|
//! Set UNICOM frequency as active
|
||||||
void setActiveUnicom();
|
void setActiveUnicom();
|
||||||
|
|
||||||
//! Set International Air Distress 121.5MHz
|
|
||||||
void setActiveInternationalAirDistress();
|
|
||||||
|
|
||||||
//! Get channel spacing
|
//! Get channel spacing
|
||||||
ChannelSpacing getChannelSpacing() const { return m_channelSpacing; }
|
ChannelSpacing getChannelSpacing() const { return m_channelSpacing; }
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
|
|
||||||
#include "misc/pq/frequency.h"
|
#include "misc/pq/frequency.h"
|
||||||
#include "misc/pq/pressure.h"
|
#include "misc/pq/pressure.h"
|
||||||
#include "misc/pq/temperature.h"
|
|
||||||
#include "misc/swiftmiscexport.h"
|
#include "misc/swiftmiscexport.h"
|
||||||
|
|
||||||
namespace swift::misc::physical_quantities
|
namespace swift::misc::physical_quantities
|
||||||
@@ -19,20 +18,6 @@ namespace swift::misc::physical_quantities
|
|||||||
class SWIFT_MISC_EXPORT CPhysicalQuantitiesConstants
|
class SWIFT_MISC_EXPORT CPhysicalQuantitiesConstants
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Triple point of purified water, 0.01°C
|
|
||||||
static const CTemperature &TemperatureTriplePointOfVSMOW()
|
|
||||||
{
|
|
||||||
static CTemperature t(-273.16, CTemperatureUnit::K());
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Temperature absolute Zero in °C
|
|
||||||
static const CTemperature &TemperatureAbsoluteZeroC()
|
|
||||||
{
|
|
||||||
static CTemperature t(-273.15, CTemperatureUnit::C());
|
|
||||||
return t;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! International Standard Atmosphere pressure at mean sea level, 1013.25hPa
|
//! International Standard Atmosphere pressure at mean sea level, 1013.25hPa
|
||||||
static const CPressure &ISASeaLevelPressure()
|
static const CPressure &ISASeaLevelPressure()
|
||||||
{
|
{
|
||||||
@@ -40,47 +25,12 @@ namespace swift::misc::physical_quantities
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! ICAO standard pressure datum for flight levels, 1013.2hPa
|
|
||||||
static const CPressure &ICAOFlightLevelPressure()
|
|
||||||
{
|
|
||||||
static CPressure p(1013.2, CPressureUnit::mbar());
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Standard pressure datum for flight levels in USA, Canada, parts of Latin America, 29.92inHg
|
|
||||||
static const CPressure &USFlightLevelPressure()
|
|
||||||
{
|
|
||||||
static CPressure p(29.92, CPressureUnit::inHg());
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Standard pressure datum for flight levels expressed in mmHg, such as in Russia, 760mmHg
|
|
||||||
static const CPressure &RuFlightLevelPressure()
|
|
||||||
{
|
|
||||||
static CPressure p(760, CPressureUnit::mmHg());
|
|
||||||
return p;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Unicom frequency
|
//! Unicom frequency
|
||||||
static const CFrequency &FrequencyUnicom()
|
static const CFrequency &FrequencyUnicom()
|
||||||
{
|
{
|
||||||
static CFrequency f(122.8, CFrequencyUnit::MHz());
|
static CFrequency f(122.8, CFrequencyUnit::MHz());
|
||||||
return f;
|
return f;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! Civil aircraft emergency frequency
|
|
||||||
static const CFrequency &FrequencyInternationalAirDistress()
|
|
||||||
{
|
|
||||||
static CFrequency f(121.5, CFrequencyUnit::MHz());
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
|
|
||||||
//! Military aircraft emergency frequency
|
|
||||||
static const CFrequency &FrequencyMilitaryAirDistress()
|
|
||||||
{
|
|
||||||
static CFrequency f(243.0, CFrequencyUnit::MHz());
|
|
||||||
return f;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace swift::misc::physical_quantities
|
} // namespace swift::misc::physical_quantities
|
||||||
|
|||||||
Reference in New Issue
Block a user