Shrinking bandwidth, improving parsing.
This commit is contained in:
parent
45b09e89dc
commit
3c2cea7d39
|
|
@ -124,7 +124,7 @@ class HfdlDemodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||||
|
|
||||||
class Vdl2Demodulator(ServiceDemodulator, DialFrequencyReceiver):
|
class Vdl2Demodulator(ServiceDemodulator, DialFrequencyReceiver):
|
||||||
def __init__(self, service: bool = False):
|
def __init__(self, service: bool = False):
|
||||||
self.sampleRate = 525000 #1050000
|
self.sampleRate = 210000 #525000 #1050000
|
||||||
self.parser = Vdl2Parser(service=service)
|
self.parser = Vdl2Parser(service=service)
|
||||||
workers = [
|
workers = [
|
||||||
Agc(Format.COMPLEX_FLOAT),
|
Agc(Format.COMPLEX_FLOAT),
|
||||||
|
|
|
||||||
|
|
@ -368,6 +368,7 @@ AprsMarker.prototype.update = function(update) {
|
||||||
this.gain = update.location.gain;
|
this.gain = update.location.gain;
|
||||||
this.device = update.location.device;
|
this.device = update.location.device;
|
||||||
this.aircraft = update.location.aircraft;
|
this.aircraft = update.location.aircraft;
|
||||||
|
this.airport = update.location.airport;
|
||||||
this.directivity = update.location.directivity;
|
this.directivity = update.location.directivity;
|
||||||
|
|
||||||
// Implementation-dependent function call
|
// Implementation-dependent function call
|
||||||
|
|
@ -525,6 +526,10 @@ AprsMarker.prototype.getInfoHTML = function(name, receiverMarker = null) {
|
||||||
detailsString += Marker.makeListItem('Aircraft', this.aircraft);
|
detailsString += Marker.makeListItem('Aircraft', this.aircraft);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.airport) {
|
||||||
|
detailsString += Marker.makeListItem('Destination', this.airport);
|
||||||
|
}
|
||||||
|
|
||||||
// Combine course and speed if both present
|
// Combine course and speed if both present
|
||||||
if (this.course && this.speed) {
|
if (this.course && this.speed) {
|
||||||
detailsString += Marker.makeListItem('Course',
|
detailsString += Marker.makeListItem('Course',
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ class Vdl2Parser(AircraftParser):
|
||||||
# Collect data
|
# Collect data
|
||||||
out["type"] = "XID " + data["type_descr"]
|
out["type"] = "XID " + data["type_descr"]
|
||||||
if "vdl_params" in data:
|
if "vdl_params" in data:
|
||||||
|
# Parse VDL parameters array
|
||||||
for p in data["vdl_params"]:
|
for p in data["vdl_params"]:
|
||||||
if p["name"] == "ac_location":
|
if p["name"] == "ac_location":
|
||||||
# Parse location
|
# Parse location
|
||||||
|
|
@ -184,14 +185,14 @@ class Vdl2Parser(AircraftParser):
|
||||||
out["lon"] = p["value"]["loc"]["lon"]
|
out["lon"] = p["value"]["loc"]["lon"]
|
||||||
# Convert altitude from feet into meters
|
# Convert altitude from feet into meters
|
||||||
out["altitude"] = round(p["value"]["alt"] / 3.28084)
|
out["altitude"] = round(p["value"]["alt"] / 3.28084)
|
||||||
# Report location on the map
|
|
||||||
self.updateMap(out)
|
|
||||||
elif p["name"] == "dst_airport":
|
elif p["name"] == "dst_airport":
|
||||||
# Parse destination airport
|
# Parse destination airport
|
||||||
out["airport"] = p["value"]
|
out["airport"] = p["value"]
|
||||||
elif p["name"] == "modulation_support":
|
elif p["name"] == "modulation_support":
|
||||||
# Parse supported modulations
|
# Parse supported modulations
|
||||||
out["modes"] = p["value"]
|
out["modes"] = p["value"]
|
||||||
|
# Report location on the map
|
||||||
|
self.updateMap(out)
|
||||||
# Done
|
# Done
|
||||||
return out
|
return out
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue