Skip to content

Commit

Permalink
Merge pull request #17 from badvectors/master
Browse files Browse the repository at this point in the history
Added FSS to map.
  • Loading branch information
Kahn authored Dec 11, 2023
2 parents f891699 + 4a37bf2 commit 1898b48
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions atc.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down Expand Up @@ -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){

Expand Down
8 changes: 4 additions & 4 deletions public/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
});
Expand Down

0 comments on commit 1898b48

Please sign in to comment.