From 4a37bf2cc5d902aa0c7bd42ec6b64629931e90e9 Mon Sep 17 00:00:00 2001 From: badvectors Date: Sat, 9 Dec 2023 11:27:01 +1000 Subject: [PATCH] Added FSS to map. --- atc.js | 6 +++--- public/map.js | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/atc.js b/atc.js index 486a806..58581a1 100644 --- a/atc.js +++ b/atc.js @@ -244,8 +244,8 @@ export async function getOnlinePositions() { // iterate txvrs.element.transceivers.element frequency/1000000 if(stations){ stations.forEach(function(station, index){ - // Keep only CTR, APP, and TWR. - if(station.callsign.toUpperCase().includes("CTR") || station.callsign.toUpperCase().includes("APP") || station.callsign.toUpperCase().includes("TWR")) + // Keep only FSS, CTR, APP, and TWR. + if(station.callsign.toUpperCase().includes("FSS") || station.callsign.toUpperCase().includes("CTR") || station.callsign.toUpperCase().includes("APP") || station.callsign.toUpperCase().includes("TWR")) { // Join sectors by callsign var sector = sectors.find(function cb(element){ @@ -276,7 +276,7 @@ export async function getOnlinePositions() { sectors.find(function cb(element){ activeFrequencies = uniq(activeFrequencies); - var type = station.callsign.toUpperCase().includes("CTR"); + var type = station.callsign.toUpperCase().includes("FSS") || station.callsign.toUpperCase().includes("CTR"); if(element.Frequency == frequency && element.Callsign != station.callsign && type && sectorWithSubsectors != false){ diff --git a/public/map.js b/public/map.js index a626d4b..abb48d7 100644 --- a/public/map.js +++ b/public/map.js @@ -285,18 +285,18 @@ async function getATCSectors() { var tmas = []; var twrs = []; - // Split CTR, TMA, and TWRs + // Split FSSS & CTR, TMA, and TWRs json.features.forEach(function (e) { //console.log(e.properties.Callsign) - if (e.properties.Callsign.includes("CTR")) { + if (e.properties.Callsign.includes("FSS") || e.properties.Callsign.includes("CTR")) { //console.log(e) ctrs.push(e); } - if (e.properties.Callsign.includes("APP")) { + else if (e.properties.Callsign.includes("APP")) { //console.log(e) tmas.push(e); } - if (e.properties.Callsign.includes("TWR")) { + else if (e.properties.Callsign.includes("TWR")) { twrs.push(e); } });