Skip to content

Commit 3e0d8ef

Browse files
authored
Merge pull request #764 from projecthorus/testing
v1.6.1 Release
2 parents 1308f34 + 353193b commit 3e0d8ef

File tree

10 files changed

+465
-125
lines changed

10 files changed

+465
-125
lines changed

auto_rx/autorx/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# MINOR - New sonde type support, other fairly big changes that may result in telemetry or config file incompatability issus.
1313
# PATCH - Small changes, or minor feature additions.
1414

15-
__version__ = "1.6.0"
15+
__version__ = "1.6.1"
1616

1717

1818
# Global Variables

auto_rx/autorx/log_files.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ def log_filename_to_stats(filename, quicklook=False):
9393
_output["max_range"] = int(max(_output["first"]["range_km"],_output["last"]["range_km"]))
9494
_output["last_range"] = int(_output["last"]["range_km"])
9595
_output["min_height"] = int(_output["last"]["alt"])
96+
_output["freq"] = _quick["first"]["freq"]
9697
except Exception as e:
9798
logging.error(f"Could not quicklook file {filename}: {str(e)}")
9899

@@ -132,6 +133,7 @@ def log_quick_look(filename):
132133
_first_lat = float(_fields[3])
133134
_first_lon = float(_fields[4])
134135
_first_alt = float(_fields[5])
136+
_first_freq = float(_fields[13])
135137
_pos_info = position_info(
136138
(
137139
autorx.config.global_config["station_lat"],
@@ -148,6 +150,7 @@ def log_quick_look(filename):
148150
"range_km": _pos_info["straight_distance"] / 1000.0,
149151
"bearing": _pos_info["bearing"],
150152
"elevation": _pos_info["elevation"],
153+
"freq": _first_freq,
151154
}
152155
except Exception as e:
153156
# Couldn't read the first line, so likely no data.
@@ -417,7 +420,7 @@ def calculate_skewt_data(
417420

418421
_temp = temperature[i]
419422

420-
if humidity[i] >= 0.0:
423+
if humidity[i] > 0.0:
421424
_rh = humidity[i]
422425

423426
_dp = (

auto_rx/autorx/static/css/main.css

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,23 @@ a {
7676
flex-direction: column;
7777
}
7878

79+
.skewt {
80+
height: 100%;
81+
width: 0;
82+
position: fixed;
83+
z-index: 1;
84+
top: 0;
85+
right: 0;
86+
background-color: #111;
87+
overflow: hidden;
88+
transition: 0.5s;
89+
padding-top: 20px;
90+
text-align: centre;
91+
flex: auto;
92+
display: flex;
93+
flex-direction: column;
94+
}
95+
7996
.settings form {
8097
margin-left: 35px;
8198
color: white;
@@ -243,20 +260,37 @@ table {
243260
color: white;
244261
}
245262

246-
#myBtn {
263+
.skewt .closebtn3 {
264+
position: absolute;
265+
top: 6px;
266+
left: 16px;
267+
font-size: 36px;
268+
text-decoration: none;
269+
color: black;
270+
}
271+
272+
#myBtn1 {
247273
cursor: pointer;
248274
position: absolute;
249275
right: 16px;
250276
}
251277

252-
#historyBtn {
278+
#myBtn2 {
253279
cursor: pointer;
254280
position: absolute;
255281
right: 6vh;
256282
right: calc(4vh + 24px);
257283
color: white;
258284
}
259285

286+
#myBtn3 {
287+
cursor: pointer;
288+
position: absolute;
289+
right: 6vh;
290+
right: calc(8vh + 36px);
291+
color: white;
292+
}
293+
260294
.switch {
261295
position: relative;
262296
display: inline-block;

auto_rx/autorx/static/js/scan_chart.js

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ var scan_chart_spectra;
44
var scan_chart_peaks;
55
var scan_chart_threshold;
66
var scan_chart_obj;
7+
var scan_chart_latest_timestamp;
8+
var scan_chart_last_drawn = "none";
79

810
function setup_scan_chart(){
911
scan_chart_spectra = {
@@ -64,4 +66,44 @@ function setup_scan_chart(){
6466
},
6567
point:{r:10}
6668
});
69+
}
70+
71+
function redraw_scan_chart(){
72+
// Plot the updated data.
73+
if(scan_chart_last_drawn === scan_chart_latest_timestamp){
74+
// No need to re-draw.
75+
//console.log("No need to re-draw.");
76+
return;
77+
}
78+
scan_chart_obj.load(scan_chart_spectra);
79+
scan_chart_obj.load(scan_chart_peaks);
80+
scan_chart_obj.load(scan_chart_threshold);
81+
82+
scan_chart_last_drawn = scan_chart_latest_timestamp;
83+
84+
//console.log("Scan plot redraw - " + scan_chart_latest_timestamp);
85+
86+
// Run dark mode check again to solve render issues.
87+
var z = getCookie('dark');
88+
if (z == 'true') {
89+
changeTheme(true);
90+
} else if (z == 'false') {
91+
changeTheme(false);
92+
} else if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
93+
changeTheme(true);
94+
} else {
95+
changeTheme(false);
96+
}
97+
98+
// Show the latest scan time.
99+
if (getCookie('UTC') == 'false') {
100+
temp_date = scan_chart_latest_timestamp;
101+
temp_date = temp_date.slice(0, -3);
102+
temp_date += "Z";
103+
var date = new Date(temp_date);
104+
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'});
105+
$('#scan_results').html('<b>Latest Scan:</b> ' + date_converted);
106+
} else {
107+
$('#scan_results').html('<b>Latest Scan:</b> ' + (scan_chart_latest_timestamp.slice(0, -3) + 'Z').replace("T", " ").replace("Z", "").slice(0, -4) + ' UTC');
108+
}
67109
}

auto_rx/autorx/static/js/utils.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ function calculate_lookangles(a, b) {
7979
'range': distance,
8080
'bearing': str_bearing
8181
};
82-
}
82+
}
83+

0 commit comments

Comments
 (0)