mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 02:35:33 +08:00
Minor fixes, style
* make sure ATC view is updated when disconnected * prepared rounding, can be enabled at any time
This commit is contained in:
committed by
Mat Sutcliffe
parent
1deeaf39e8
commit
e1498adc8e
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "blackmisc/logmessage.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
using namespace BlackMisc::Network;
|
||||
|
||||
namespace BlackCore
|
||||
@@ -50,7 +51,7 @@ namespace BlackCore
|
||||
{
|
||||
if (tokens.size() < 7)
|
||||
{
|
||||
BlackMisc::CLogMessage(static_cast<AtcDataUpdate *>(nullptr)).warning(u"Wrong number of arguments.");
|
||||
CLogMessage(static_cast<AtcDataUpdate *>(nullptr)).warning(u"Wrong number of arguments.");
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
@@ -881,8 +881,11 @@ namespace BlackCore
|
||||
|
||||
CFrequency freq(atcDataUpdate.m_frequencykHz, CFrequencyUnit::kHz());
|
||||
freq.switchUnit(CFrequencyUnit::MHz()); // we would not need to bother, but this makes it easier to identify
|
||||
const CLength networkRange(atcDataUpdate.m_visibleRange, CLengthUnit::NM());
|
||||
|
||||
// Here we could round to channel spacing, based on https://discordapp.com/channels/539048679160676382/539486489977946112/651514202405601291
|
||||
// CComSystem::roundToChannelSpacing(freq, CComSystem::ChannelSpacing25KHz);
|
||||
|
||||
const CLength networkRange(atcDataUpdate.m_visibleRange, CLengthUnit::NM());
|
||||
const CLength range = fixAtcRange(networkRange, cs);
|
||||
const CCoordinateGeodetic position(atcDataUpdate.m_latitude, atcDataUpdate.m_longitude, 0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user