mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-01 05:26:45 +08:00
Consider Channel Spacing (50, 25, 8.33kHz) for COM frequencies.
Deals with a special topic: While frequencies at VATSIM/flightsim are usually set in 25kHz spacing, some ATC stations (radar) require 8.33kHz tuning. The now made extension handles this and allows to listen to a voice room even if the corresponding frequency is not exactly tuned in. Example: EKDK_CTR 135,270 but needs to be tuned in as 135,275
This commit is contained in:
@@ -55,12 +55,23 @@ namespace BlackMisc
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Find if on frequency of COM unit
|
||||
*/
|
||||
CAtcStationList CAtcStationList::findIfComUnitTunedIn25KHz(const CComSystem &comUnit) const
|
||||
{
|
||||
return this->findBy([&](const CAtcStation & atcStation)
|
||||
{
|
||||
return atcStation.isComUnitTunedIn25KHz(comUnit);
|
||||
});
|
||||
}
|
||||
|
||||
/*
|
||||
* Distances to own plane
|
||||
*/
|
||||
void CAtcStationList::calculateDistancesToPlane(const Geo::CCoordinateGeodetic &position)
|
||||
{
|
||||
std::for_each(this->begin(), this->end(), [ & ](CAtcStation &station)
|
||||
std::for_each(this->begin(), this->end(), [ & ](CAtcStation & station)
|
||||
{
|
||||
station.calculcateDistanceToPlane(position);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user