From 3c2cea7d390efbe0ef1bf138c2959f9e92ab57eb Mon Sep 17 00:00:00 2001 From: Marat Fayzullin Date: Sun, 20 Aug 2023 21:09:57 -0400 Subject: [PATCH] Shrinking bandwidth, improving parsing. --- csdr/chain/toolbox.py | 2 +- htdocs/lib/MapMarkers.js | 5 +++++ owrx/aircraft.py | 5 +++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/csdr/chain/toolbox.py b/csdr/chain/toolbox.py index 937f358d..cfc46982 100644 --- a/csdr/chain/toolbox.py +++ b/csdr/chain/toolbox.py @@ -124,7 +124,7 @@ class HfdlDemodulator(ServiceDemodulator, DialFrequencyReceiver): class Vdl2Demodulator(ServiceDemodulator, DialFrequencyReceiver): def __init__(self, service: bool = False): - self.sampleRate = 525000 #1050000 + self.sampleRate = 210000 #525000 #1050000 self.parser = Vdl2Parser(service=service) workers = [ Agc(Format.COMPLEX_FLOAT), diff --git a/htdocs/lib/MapMarkers.js b/htdocs/lib/MapMarkers.js index d0218e66..bab7a0f0 100644 --- a/htdocs/lib/MapMarkers.js +++ b/htdocs/lib/MapMarkers.js @@ -368,6 +368,7 @@ AprsMarker.prototype.update = function(update) { this.gain = update.location.gain; this.device = update.location.device; this.aircraft = update.location.aircraft; + this.airport = update.location.airport; this.directivity = update.location.directivity; // Implementation-dependent function call @@ -525,6 +526,10 @@ AprsMarker.prototype.getInfoHTML = function(name, receiverMarker = null) { detailsString += Marker.makeListItem('Aircraft', this.aircraft); } + if (this.airport) { + detailsString += Marker.makeListItem('Destination', this.airport); + } + // Combine course and speed if both present if (this.course && this.speed) { detailsString += Marker.makeListItem('Course', diff --git a/owrx/aircraft.py b/owrx/aircraft.py index e9ab98aa..099e134c 100644 --- a/owrx/aircraft.py +++ b/owrx/aircraft.py @@ -177,6 +177,7 @@ class Vdl2Parser(AircraftParser): # Collect data out["type"] = "XID " + data["type_descr"] if "vdl_params" in data: + # Parse VDL parameters array for p in data["vdl_params"]: if p["name"] == "ac_location": # Parse location @@ -184,14 +185,14 @@ class Vdl2Parser(AircraftParser): out["lon"] = p["value"]["loc"]["lon"] # Convert altitude from feet into meters out["altitude"] = round(p["value"]["alt"] / 3.28084) - # Report location on the map - self.updateMap(out) elif p["name"] == "dst_airport": # Parse destination airport out["airport"] = p["value"] elif p["name"] == "modulation_support": # Parse supported modulations out["modes"] = p["value"] + # Report location on the map + self.updateMap(out) # Done return out