Revert "Merge branch 'testing-AstroTaka' into testing"

This reverts commit edfd4017c3, reversing
changes made to 5972db70df.
pull/731/head
AstroTaka 2022-12-16 00:43:18 +09:00
rodzic edfd4017c3
commit c0fa387089
12 zmienionych plików z 37 dodań i 231 usunięć

Wyświetl plik

@ -167,7 +167,6 @@ def start_scanner():
rtl_fm_path=config["sdr_fm"],
rtl_device_idx=_device_idx,
gain=autorx.sdr_list[_device_idx]["gain"],
agc=autorx.sdr_list[_device_idx]["agc"],
ppm=autorx.sdr_list[_device_idx]["ppm"],
bias=autorx.sdr_list[_device_idx]["bias"],
save_detection_audio=config["save_detection_audio"],
@ -251,7 +250,6 @@ def start_decoder(freq, sonde_type, continuous=False):
rtl_fm_path=config["sdr_fm"],
rtl_device_idx=_device_idx,
gain=autorx.sdr_list[_device_idx]["gain"],
agc=autorx.sdr_list[_device_idx]["agc"],
ppm=autorx.sdr_list[_device_idx]["ppm"],
bias=autorx.sdr_list[_device_idx]["bias"],
# Other options

Wyświetl plik

@ -764,7 +764,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
_device_idx = config.get(_section, "device_idx")
_ppm = round(config.getfloat(_section, "ppm"))
_gain = config.getfloat(_section, "gain")
_agc = config.getint(_section, "agc")
_bias = config.getboolean(_section, "bias")
if (auto_rx_config["sdr_quantity"] > 1) and (_device_idx == "0"):
@ -779,7 +778,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
auto_rx_config["sdr_settings"][_device_idx] = {
"ppm": _ppm,
"gain": _gain,
"agc" : _agc,
"bias": _bias,
"in_use": False,
"task": None,
@ -816,7 +814,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"bias": 0,
"in_use": False,
"task": None,
"agc": 0,
}
elif auto_rx_config["sdr_type"] == "KA9Q":
@ -839,7 +836,6 @@ def read_auto_rx_config(filename, no_sdr_test=False):
"bias": 0,
"in_use": False,
"task": None,
"agc": 0,
}
logging.critical("Config - KA9Q SDR Support not implemented yet - exiting.")

Wyświetl plik

@ -133,7 +133,6 @@ class SondeDecoder(object):
rtl_device_idx=0,
ppm=0,
gain=-1,
agc=0,
bias=False,
save_decode_audio=False,
save_decode_iq=False,
@ -201,7 +200,6 @@ class SondeDecoder(object):
self.rtl_device_idx = rtl_device_idx
self.ppm = ppm
self.gain = gain
self.agc = agc
self.bias = bias
self.save_decode_audio = save_decode_audio
self.save_decode_iq = save_decode_iq
@ -378,7 +376,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
highpass = 20,
lowpass = 2600
@ -445,7 +442,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
highpass = 20,
lowpass = 2500
@ -479,7 +475,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
highpass = 20,
lowpass = 2000
@ -508,7 +503,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
highpass = 20
)
@ -535,7 +529,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -561,7 +554,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -589,7 +581,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -626,7 +617,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
fast_filter = True
)
@ -663,7 +653,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
highpass = 20,
lowpass = 2600
@ -690,7 +679,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -716,7 +704,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -780,13 +767,12 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
# Add in tee command to save IQ to disk if debugging is enabled.
if self.save_decode_iq:
demod_cmd += " tee decode_IQ_%s.bin |" % (str(self.rtl_device_idx) + '_RS41_' + datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='seconds').replace('+00:00', 'Z').replace(':',''))
demod_cmd += " tee decode_IQ_%s.bin |" % str(self.rtl_device_idx)
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s --stats=%d 2 %d %d - -" % (
_lower,
@ -855,7 +841,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -906,13 +891,12 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
# Add in tee command to save IQ to disk if debugging is enabled.
#if self.save_decode_iq:
# demod_cmd += " tee decode_IQ_%s.bin |" % (str(self.rtl_device_idx) + '_DFM_' + datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='seconds').replace('+00:00', 'Z').replace(':',''))
if self.save_decode_iq:
demod_cmd += " tee decode_IQ_%s.bin |" % str(self.rtl_device_idx)
demod_cmd += "./fsk_demod --cs16 -b %d -u %d -s --stats=%d 2 %d %d - -" % (
_lower,
@ -958,7 +942,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -1000,7 +983,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -1040,7 +1022,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -1082,7 +1063,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
# Add in tee command to save IQ to disk if debugging is enabled.
@ -1123,7 +1103,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
@ -1169,7 +1148,6 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias,
fast_filter = True # Don't use -F9
)
@ -1211,13 +1189,12 @@ class SondeDecoder(object):
rtl_device_idx = self.rtl_device_idx,
ppm = self.ppm,
gain = self.gain,
agc = self.agc,
bias = self.bias
)
# Add in tee command to save IQ to disk if debugging is enabled.
if self.save_decode_iq and self.sonde_freq > 405150000 :
demod_cmd += " tee decode_IQ_%s.bin |" % (str(self.rtl_device_idx) + '_MEISEI_' + datetime.datetime.now(datetime.timezone.utc).isoformat(timespec='seconds').replace('+00:00', 'Z').replace(':',''))
if self.save_decode_iq:
demod_cmd += " tee decode_IQ_%s.bin |" % str(self.rtl_device_idx)
demod_cmd += "./fsk_demod --cs16 -s -b %d -u %d --stats=%d 2 %d %d - -" % (
_lower,

Wyświetl plik

@ -67,10 +67,6 @@ def log_filename_to_stats(filename, quicklook=False):
# Third field is the sonde type, in 'shortform'
_type = _fields[2]
if _type=="MEISEI":
_type = _fields[1].split("-")[0]
_type_str = short_type_lookup(_type)
_short_type = short_short_type_lookup(_type)
@ -96,13 +92,7 @@ def log_filename_to_stats(filename, quicklook=False):
_output["has_snr"] = _quick["has_snr"]
_output["max_range"] = int(max(_output["first"]["range_km"],_output["last"]["range_km"]))
_output["last_range"] = int(_output["last"]["range_km"])
_output["first_height"] = int(_output["first"]["alt"])
_output["last_height"] = int(_output["last"]["alt"])
_output["freq"] = _quick["first"]["freq"]
try:
_output["max_height"] = int(_quick["max_height"])
except:
pass
_output["min_height"] = int(_output["last"]["alt"])
except Exception as e:
logging.error(f"Could not quicklook file {filename}: {str(e)}")
@ -142,7 +132,6 @@ def log_quick_look(filename):
_first_lat = float(_fields[3])
_first_lon = float(_fields[4])
_first_alt = float(_fields[5])
_first_freq = float(_fields[13])
_pos_info = position_info(
(
autorx.config.global_config["station_lat"],
@ -159,7 +148,6 @@ def log_quick_look(filename):
"range_km": _pos_info["straight_distance"] / 1000.0,
"bearing": _pos_info["bearing"],
"elevation": _pos_info["elevation"],
"freq": _first_freq,
}
except Exception as e:
# Couldn't read the first line, so likely no data.
@ -200,39 +188,6 @@ def log_quick_look(filename):
"bearing": _pos_info["bearing"],
"elevation": _pos_info["elevation"],
}
# find Max H
_seek_point = _filesize - 5000
start_check = True
while _seek_point>0:
_file.seek(_seek_point)
_remainder = _file.read(5000).split("\n")
alt1 = float(_remainder[1].split(",")[5])
alt2 = float(_remainder[-2].split(",")[5])
if alt2>alt1 and start_check==True:
# bumping...
break
if alt2>alt1:
# find bumping before burst
_remainder_num = len(_remainder)-2
max_alt1 = 0
for num in range(_remainder_num):
max_alt1 = max(max_alt1,float(_remainder[num+1].split(",")[5]))
_seek_point+=5000
_file.seek(_seek_point)
_remainder = _file.read(5000).split("\n")
_remainder_num = len(_remainder)-2
max_alt2 = 0
for num in range(_remainder_num):
max_alt2 = max(max_alt2,float(_remainder[num+1].split(",")[5]))
_output['max_height']=max(max_alt1,max_alt2)
break
_seek_point-=5000
start_check = False
return _output
except Exception as e:
# Couldn't read in the last line for some reason.

Wyświetl plik

@ -236,7 +236,6 @@ def detect_sonde(
rtl_device_idx=0,
ppm=0,
gain=-1,
agc=0,
bias=False,
save_detection_audio=False,
ngp_tweak=False,
@ -325,7 +324,6 @@ def detect_sonde(
rtl_fm_path = rtl_fm_path,
ppm = ppm,
gain = gain,
agc=agc,
bias = bias,
sdr_hostname = sdr_hostname,
sdr_port = sdr_port,
@ -375,7 +373,6 @@ def detect_sonde(
rtl_fm_path = rtl_fm_path,
ppm = ppm,
gain = gain,
gac=agc,
bias = bias,
sdr_hostname = "",
sdr_port = 1234,
@ -645,7 +642,6 @@ class SondeScanner(object):
rtl_fm_path="rtl_fm",
rtl_device_idx=0,
gain=-1,
agc=0,
ppm=0,
bias=False,
@ -735,7 +731,6 @@ class SondeScanner(object):
self.rtl_fm_path = rtl_fm_path
self.rtl_device_idx = rtl_device_idx
self.gain = gain
self.agc = agc
self.ppm = ppm
self.bias = bias
@ -1093,7 +1088,6 @@ class SondeScanner(object):
rtl_device_idx=self.rtl_device_idx,
ppm=self.ppm,
gain=self.gain,
agc=self.agc,
bias=self.bias,
dwell_time=self.detect_dwell_time,
save_detection_audio=self.save_detection_audio,

Wyświetl plik

@ -191,7 +191,6 @@ def get_sdr_iq_cmd(
fast_filter: bool = False,
ppm = 0,
gain = None,
agc = None,
bias = False,
sdr_hostname = "",
sdr_port = 5555,
@ -228,11 +227,6 @@ def get_sdr_iq_cmd(
if gain >= 0:
_gain = f"-g {gain:.1f} "
_agc = ""
if agc:
if agc >= 1:
_agc = f"-E agc "
_cmd = (
f"{rtl_fm_path} -M raw "
f"{'' if fast_filter else '-F9 '}"
@ -240,7 +234,6 @@ def get_sdr_iq_cmd(
f"-p {int(ppm)} "
f"-d {str(rtl_device_idx)} "
f"{_gain}"
f"{_agc}"
f"-s {int(sample_rate)} "
f"-f {int(frequency)} "
f"- 2>/dev/null | "
@ -312,18 +305,12 @@ def get_sdr_fm_cmd(
if gain >= 0:
_gain = f"-g {gain:.1f} "
_agc = ""
if agc:
if agc >= 1:
_agc = f"-E agc "
_cmd = (
f"{rtl_fm_path} -M fm -F9 "
f"{'-T ' if bias else ''}"
f"-p {int(ppm)} "
f"-d {str(rtl_device_idx)} "
f"{_gain}"
f"{_agc}"
f"-s {int(filter_bandwidth)} "
f"-f {int(frequency)} "
f"2>/dev/null | "

Wyświetl plik

@ -17,7 +17,7 @@ var SkewT = function(div) {
var tan = Math.tan(55*deg2rad);
var basep = 1050;
var topp = 100; // Note: If we want to increase this to 50 hPa we need to fix generation of the temp grid.
var plines = [1000,900,800,700,600,500,400,300,200,100];
var plines = [1000,850,700,500,300,200,100];
var pticks = [950,900,800,750,650,600,550,450,400,350,250,150];
var barbsize = 25;
// functions for Scales and axes. Note the inverted domain for the y-scale: bigger is up!
@ -43,7 +43,7 @@ var SkewT = function(div) {
height = width; //to fix
w = width - margin.left - margin.right;
h = width - margin.top - margin.bottom;
x = d3.scale.linear().range([0, w]).domain([-50,50]);
x = d3.scale.linear().range([0, w]).domain([-45,50]);
y = d3.scale.log().range([0, h]).domain([topp, basep]);
xAxis = d3.svg.axis().scale(x).tickSize(0,0).ticks(10).orient("bottom").tickFormat(function(e) {
return e.toFixed(0) + "°C"
@ -227,44 +227,7 @@ var SkewT = function(div) {
wspdfocus.select("text").text(Math.round(convert(d.wspd, unit)*10)/10 + " " + unit + ", " + Math.round(d.wdir) + "˚ ");
});
}
var drawToolTipsTest = function(skewtlines) {
var lines = skewtlines.reverse();
// Draw tooltips
lines.forEach(function(d) {
// Draw tooltips
var tmpcfocus = skewtgroup.append("g").attr("class", "focus tmpc").style("display", "none");
tmpcfocus.append("circle").attr("r", 4);
tmpcfocus.append("text").attr("x", 9).attr("dy", ".35em");
var dwpcfocus = skewtgroup.append("g").attr("class", "focus dwpc").style("display", "none");
dwpcfocus.append("circle").attr("r", 4);
dwpcfocus.append("text").attr("x", -9).attr("text-anchor", "end").attr("dy", ".35em");
var hghtfocus = skewtgroup.append("g").attr("class", "focus").style("display", "none");
hghtfocus.append("text").attr("x", 0).attr("text-anchor", "start").attr("dy", ".35em");
var wspdfocus = skewtgroup.append("g").attr("class", "focus windspeed").style("display", "none");
wspdfocus.append("text").attr("x", 0).attr("text-anchor", "end").attr("dy", ".35em");
tmpcfocus.style("display", null);
dwpcfocus.style("display", null);
hghtfocus.style("display", null);
wspdfocus.style("display", null);
tmpcfocus.attr("transform", "translate(" + (x(d.temp) + (y(basep)-y(d.press))/tan)+ "," + y(d.press) + ")");
dwpcfocus.attr("transform", "translate(" + (x(d.dwpt) + (y(basep)-y(d.press))/tan)+ "," + y(d.press) + ")");
hghtfocus.attr("transform", "translate(0," + y(d.press) + ")");
tmpcfocus.select("text").text(Math.round(d.temp)+"°C");
dwpcfocus.select("text").text(Math.round(d.dwpt)+"°C");
hghtfocus.select("text").text("-- "+Math.round(d.hght)+" m"); //hgt or hghtagl ???
wspdfocus.attr("transform", "translate(" + (w-65) + "," + y(d.press) + ")");
wspdfocus.select("text").text(Math.round(convert(d.wspd, unit)*10)/10 + " " + unit + ", " + Math.round(d.wdir) + "˚ ");
});
}
var plot = function(s){
data = s;
skewtgroup.selectAll("path").remove(); //clear previous paths from skew
@ -303,8 +266,7 @@ var SkewT = function(div) {
.attr("transform", function(d,i) { return "translate("+w+","+y(d.press)+") rotate("+(d.wdir+180)+")"; });
//mouse over
//drawToolTips(skewtlines[0]);
drawToolTipsTest(skewtlines[0]);
drawToolTips(skewtlines[0]);
}
var clear = function(s){

Wyświetl plik

@ -30,8 +30,6 @@
<script src="{{ url_for('static', filename='js/skewt.js') }}"></script>
<script>
timezone = new Date().toLocaleDateString(undefined, {day:'2-digit',timeZoneName: 'short' }).substring(4);
var autorx_config = {
lat: 0.0,
lon: 0.0
@ -73,8 +71,8 @@
if (document.getElementById("mySidenav").style.width == "0px" || document.getElementById("mySidenav").style.width == 0) {
if ((window.innerWidth/window.innerHeight) > 1) { // 620px wide on desktop.
x.style.display = "none";
document.getElementById("mySidenav").style.width = "890px";
document.getElementById("main").style.marginLeft = "890px";
document.getElementById("mySidenav").style.width = "665px";
document.getElementById("main").style.marginLeft = "665px";
document.getElementById("mySidenav").style.borderRadius = "0px 25px 25px 0px";
} else { // Fullsize on mobile.
x.style.display = "block";
@ -115,28 +113,9 @@
headerTooltip:"First Observed Date/Time"
},
{title:"Type", field:"short_type", width:85, resizable:false}, // 90
{title:"Serial", field:"serial", width:90, resizable:false, // 105
formatter:function(cell, formatterParams, onRendered){
return cell.getValue().replace(/^(IMS100)-/,"");
}},
{title:"Freq", field:"freq", width:65, resizable:false, headerTooltip:"Frequency (MHz)",
formatter:function(cell, formatterParams, onRendered){
return cell.getValue().toFixed(3);
}},
{title:"Serial", field:"serial", width:90, resizable:false}, // 105
{title:"Count", field:"lines", width:72, resizable:false, headerTooltip:"Received Lines of Telemetry"}, // 75
{title:"1st H", field:"first_height", width:75, resizable:false, headerTooltip:"Fiest Observed Height (m)",
formatter:function(cell, formatterParams, onRendered){
return cell.getValue() + " m"; //return the contents of the cell;
}},
{title:"Max H", field:"max_height", width:75, resizable:false, headerTooltip:"Max Observed Height (m)",
formatter:function(cell, formatterParams, onRendered){
if(cell.getValue()!=undefined){
return cell.getValue() + " m"; //return the contents of the cell;
} else {
return '--'
}
}},
{title:"Last H", field:"last_height", width:75, resizable:false, headerTooltip:"Last Observed Height (m)",
{title:"Last H", field:"min_height", width:75, resizable:false, headerTooltip:"Last Observed Height (m)",
formatter:function(cell, formatterParams, onRendered){
return cell.getValue() + " m"; //return the contents of the cell;
}},
@ -277,8 +256,7 @@
landing_alt = parseFloat(value['last']['alt']);
}
if (getCookie('UTC') == 'false') {
landing_time = new Date(value['last']['datetime']).toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
landing_time = new Date(value['last']['datetime']).toLocaleString("en-AU");
} else {
landing_time = value['last']['datetime'];
}
@ -381,7 +359,7 @@
launch_alt = parseFloat(value['first']['alt']);
}
if (getCookie('UTC') == 'false') {
launch_time = new Date(value['first']['datetime']).toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
launch_time = new Date(value['first']['datetime']).toLocaleString("en-AU");
} else {
launch_time = value['first']['datetime'];
}
@ -512,7 +490,7 @@
launch_alt = parseFloat(data['first'][2]);
}
if (getCookie('UTC') == 'false') {
launch_time = new Date(data['first_time']).toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
launch_time = new Date(data['first_time']).toLocaleString("en-AU");
} else {
launch_time = data['first_time'];
}
@ -597,7 +575,7 @@
landing_alt = parseFloat(data['last'][2]);
}
if (getCookie('UTC') == 'false') {
landing_time = new Date(data['last_time']).toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
landing_time = new Date(data['last_time']).toLocaleString("en-AU");
} else {
landing_time = data['last_time']
}
@ -680,7 +658,7 @@
burst_alt = parseFloat(data['burst'][2]);
}
if (getCookie('UTC') == 'false') {
burst_time = new Date(data['burst_time']).toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
burst_time = new Date(data['burst_time']).toLocaleString("en-AU");
} else {
burst_time = data['burst_time'];
}
@ -882,7 +860,7 @@
//sidebar needs to be open first time
if (document.getElementById("mySettings").style.width == "0px" || document.getElementById("mySettings").style.width == 0) {
if ((window.innerWidth/window.innerHeight) > 1) {
document.getElementById("mySettings").style.width = "90vh";
document.getElementById("mySettings").style.width = "100vh";
} else {
document.getElementById("mySettings").style.width = "100%";
}
@ -892,23 +870,12 @@
}
if (getCookie('UTC') == 'false') {
launch_time = new Date(data['first_time']).toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
launch_time = new Date(data['first_time']).toLocaleString("en-AU");
} else {
launch_time = data['first_time'];
}
$('#skewt-header').html("Skew-T - "+_type + " " + _serial + " " + launch_time);
if(data['burst_time']!=data['last_time']){
if (getCookie('UTC') == 'false') {
burst_time = new Date(data['burst_time']).toLocaleString(window.navigator.language,{year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
} else {
burst_time = data['burst_time'];
}
$('#skewt-header-sub').html("First Lat/Lon/Alt: "+data['first'][0]+" "+data['first'][1]+" "+data['first'][2]+"m, Burst: "+burst_time + ' at '+Math.floor(parseFloat(data['burst'][2])) + 'm');
} else {
$('#skewt-header-sub').html("First Lat/Lon/Alt: "+data['first'][0]+" "+data['first'][1]+" "+data['first'][2]+"m, Burst: --");
}
try {
skewt.plot(data.skewt);
$("#skewt-buttons").css('visibility', 'visible');
@ -924,7 +891,7 @@
enableMenu();
if (document.getElementById("mySettings").style.width == "0px" || document.getElementById("mySettings").style.width == 0) {
if ((window.innerWidth/window.innerHeight) > 1) {
document.getElementById("mySettings").style.width = "90vh";
document.getElementById("mySettings").style.width = "100vh";
} else {
document.getElementById("mySettings").style.width = "100%";
}
@ -953,11 +920,7 @@
disableMenu();
showSkewT();
});
$("#plotalllabel-skewt").click(function(){
disableMenu();
showSkewT();
});
function downloadLogs() {
// Download a set of log files.
selectedrows = table.getSelectedData();
@ -1174,8 +1137,8 @@
if ((window.innerWidth/window.innerHeight) > 1) { // 620px wide on desktop.
x.style.display = "none";
y.style.display = "block";
document.getElementById("mySidenav").style.width = "890px";
document.getElementById("main").style.marginLeft = "890px";
document.getElementById("mySidenav").style.width = "665px";
document.getElementById("main").style.marginLeft = "665px";
document.getElementById("mySidenav").style.borderRadius = "0px 25px 25px 0px";
mymap.invalidateSize();
} else { // Fullsize on mobile.
@ -1200,8 +1163,8 @@
if (document.getElementById("mySettings").style.width == "0px" || document.getElementById("mySettings").style.width == 0) {
if ((window.innerWidth/window.innerHeight) > 1) { // 350px wide on desktop.
y.style.display = "block";
document.getElementById("mySettings").style.width = "90vh";
document.getElementById("main").style.marginRight = "90vh";
document.getElementById("mySettings").style.width = "100vh";
document.getElementById("main").style.marginRight = "100vh";
document.getElementById("mySettings").style.borderRadius = "25px 0px 0px 25px";
mymap.invalidateSize();
} else { // Fullsize on mobile.
@ -1272,14 +1235,9 @@
<!-- Wrapper for settings sidebar -->
<div id="mySettings" class="settings">
<a href="javascript:void(0)" class="closebtn2" id="closebtn2" onclick="changeSettings()">&#10006;</a>
<h2 id="skewt-header" style="width:100%;text-align:center;margin-bottom: 0px;">Skew-T Plot</h2>
<div id="skewt-header-sub" style="width:100%;text-align:center;margin-top: 0px;margin-bottom: 0px;">Burst: --</div>
<div id="skewt" style="width:100%;margin:3px auto;padding-left: 4%;"></div>
<h2 id="skewt-header" style="width:100%;text-align:center;">Skew-T Plot</h2>
<div id="skewt" style="width:90%;margin:3px auto"></div>
<span id="skewt-buttons", style="width:100%;text-align:center;visibility:hidden;vertical-align:middle;">
<span style="margin:10px;display:inline-block;">
<input type="checkbox" id="plotalllabel-skewt" name="plotalllabel">
<label for="plotalllabel">Plot All Label</label>
</span>
Decimation:
<input style="vertical-align:middle;" type="range" min="1" max="100" value="25" class="slider" id="skewt-decimation" list="my-detents">
<datalist id="my-detents">

Wyświetl plik

@ -31,8 +31,6 @@
<script src="{{ url_for('static', filename='js/tabulator.min.js') }}"></script>
<script>
timezone = new Date().toLocaleDateString(undefined, {day:'2-digit',timeZoneName: 'short' }).substring(4);
var autorx_config = {
lat: 0.0,
lon: 0.0
@ -171,7 +169,7 @@
temp_date = temp_date.slice(0, -3);
temp_date += "Z";
var date = new Date(temp_date);
var date_converted = date.toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'}) + ' ' + timezone;
var date_converted = date.toLocaleString(window.navigator.language,{hourCycle:'h23', year:"numeric", month:"2-digit", day:'2-digit', hour:'2-digit',minute:'2-digit', second:'2-digit'});
$('#scan_results').html('<b>Latest Scan:</b> ' + date_converted);
} else {
$('#scan_results').html('<b>Latest Scan:</b> ' + (data.timestamp.slice(0, -3) + 'Z').replace("T", " ").replace("Z", "").slice(0, -4) + ' UTC');
@ -481,23 +479,12 @@
columns:[ //Define Table Columns
{title:"SDR", field:"sdr_device_idx", headerSort:true},
{title:"Age", field:"age", headerSort:true},
{title:"Type", field:"type", headerSort:true, formatter:function(cell, formatterParams, onRendered){
_type = cell.getValue();
if(_type=="MEISEI"){
_subtype = cell.getData().id.split("-")[0];
if(_subtype=="IMS100"){
return "iMS-100";
} else if(_subtype=="RS11G"){
return "RS-11G";
}
}
return _type;
}},
{title:"Type", field:"type", headerSort:true},
{title:'Freq (MHz)', field:"freq", headerSort:true},
{title:"ID", field:"id", width:125, headerSort:true, formatter:function(cell, formatterParams, onRendered){
_cell_data = cell.getData();
_id = _cell_data.id.replace(/^(DFM|M10|M20|IMET|IMET5|IMET54|MRZ|IMS100|RS11G)-/,"");
_sondehub_id = _cell_data.id.replace(/^(DFM|M10|M20|IMET|IMET5|IMET54|MRZ|IMS100)-/,"");
_id = _cell_data.id.replace(/^(DFM|M10|M20|IMET|IMET5|IMET54|MRZ)-/,"");
_sondehub_id = _cell_data.id.replace(/^(DFM|M10|M20|IMET|IMET5|IMET54|MRZ)-/,"");
// Add Sondehub Link
_id += "&nbsp;<a href='http://sondehub.org/" + _sondehub_id + "' title='View on Sondehub' target='_blank'>" + "<img src='{{ url_for('static', filename='img/sondehub.png')}}'/>" + "</a>";

Wyświetl plik

@ -181,10 +181,6 @@ def short_type_lookup(type_name):
return "Intermet Systems iMet-5x"
elif type_name == "MEISEI":
return "Meisei iMS-100/RS-11"
elif type_name == "IMS100":
return "Meisei iMS-100"
elif type_name == "RS11G":
return "Meisei RS-11G"
elif type_name == "MRZ":
return "Meteo-Radiy MRZ"
elif type_name == "MTS01":
@ -221,10 +217,6 @@ def short_short_type_lookup(type_name):
return "iMet-5x"
elif type_name == "MEISEI":
return "iMS-100"
elif type_name == "IMS100":
return "iMS-100"
elif type_name == "RS11G":
return "RS-11G"
elif type_name == "MRZ":
return "MRZ"
elif type_name == "MTS01":

Wyświetl plik

@ -1,7 +1,7 @@
crcmod
python-dateutil
flask==2.2.2
flask-socketio==5.2.0
flask
flask-socketio
numpy
requests
semver

Wyświetl plik

@ -77,8 +77,8 @@ def position_info(listener, balloon):
eb = sin(angle_at_centre) * tb
elevation = atan2(ea, eb)
# Use pythagorean theorem to find unknown side.
distance = sqrt((ea ** 2) + (eb ** 2))
# Use cosine rule to find unknown side.
distance = sqrt((ta ** 2) + (tb ** 2) - 2 * tb * ta * cos(angle_at_centre))
# Give a bearing in range 0 <= b < 2pi
if bearing < 0: