Shrinking bandwidth, improving parsing.

This commit is contained in:
Marat Fayzullin 2023-08-20 21:09:57 -04:00
parent 45b09e89dc
commit 3c2cea7d39
3 changed files with 9 additions and 3 deletions

View File

@ -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),

View File

@ -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',

View File

@ -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