From 9e8e55eb4f56b6600ebc9d58a9c6e7d0e7dbd3d3 Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Thu, 14 Mar 2024 20:50:22 -0400 Subject: [PATCH] Adding MID codes for ground stations, by continent. --- csdr/chain/toolbox.py | 2 +- htdocs/lib/Utils.js | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/csdr/chain/toolbox.py b/csdr/chain/toolbox.py index f7340224..97a36af2 100644 --- a/csdr/chain/toolbox.py +++ b/csdr/chain/toolbox.py @@ -1,4 +1,4 @@ -from csdr.chain.demodulator import ServiceDemodulator, DialFrequencyReceiver, FixedIfSampleRateChain +from csdr.chain.demodulator import ServiceDemodulator, DialFrequencyReceiver from csdr.module.toolbox import Rtl433Module, MultimonModule, DumpHfdlModule, DumpVdl2Module, Dump1090Module, AcarsDecModule, RedseaModule, SatDumpModule from pycsdr.modules import FmDemod, AudioResampler, Convert, Agc, Squelch from pycsdr.types import Format diff --git a/htdocs/lib/Utils.js b/htdocs/lib/Utils.js index 7ea6218c..2360b2c1 100644 --- a/htdocs/lib/Utils.js +++ b/htdocs/lib/Utils.js @@ -204,6 +204,11 @@ Utils.mmsi2country = function(mmsi) { return mid in this.MID2COUNTRY? this.MID2COUNTRY[mid] : ''; }; +// Check if a MID corresponds to a ground station. +Utils.mmsiIsGround = function(mmsi) { + return mmsi.substring(0, 2) === '00'; +}; + // // Local Storage Access // @@ -1015,6 +1020,12 @@ Utils.CALL2COUNTRY = { // Utils.MID2COUNTRY = { + "002" : "Ground Station (Europe)", + "003" : "Ground Station (North America)", + "004" : "Ground Station (Asia)", + "005" : "Ground Station (Oceania)", + "006" : "Ground Station (Africa)", + "007" : "Ground Station (South America)", "501" : "Adelie Land (France)", "401" : "Afghanistan", "303" : "Alaska (USA)",