From c0e4ca9be28c5e84a30a17a84d0dc4a3a1d67d1f Mon Sep 17 00:00:00 2001 From: danieldegroot2 <67521919+danieldegroot2@users.noreply.github.com> Date: Thu, 23 Oct 2025 18:08:41 +0200 Subject: [PATCH 1/6] Update sondehub.js - Use preferred tile.openstreetmap.org URL See https://github.com/openstreetmap/operations/issues/737 --- js/sondehub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/sondehub.js b/js/sondehub.js index d29944f..1296cc4 100644 --- a/js/sondehub.js +++ b/js/sondehub.js @@ -570,7 +570,7 @@ function makeQuad(x, y, zoom) { // map type list -var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { +var osm = L.tileLayer('https://tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 19, attribution: '© OpenStreetMap contributors' }); From d9ef24ecdc075cc8bb12701f8b8cb7a2187d2ea6 Mon Sep 17 00:00:00 2001 From: xssfox Date: Wed, 24 Dec 2025 16:15:37 +1100 Subject: [PATCH 2/6] Add banner --- css/layout.css | 16 ++++++++++++++++ index.template.html | 1 + js/app.js | 14 ++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/css/layout.css b/css/layout.css index 2b915f2..8ebfd8f 100644 --- a/css/layout.css +++ b/css/layout.css @@ -179,4 +179,20 @@ header h1{ padding: 10px; border-width: 1px; display: none; +} + +#banner { + display: none +} +@media only screen and (min-width: 768px){ + #banner { + line-height: 1.1; + font-size: small; + display: block; + margin-left: 300px; + text-align: center; + overflow-y: auto; + font-weight: bold; + height: 100%; + } } \ No newline at end of file diff --git a/index.template.html b/index.template.html index 8d3f3b0..964bc91 100644 --- a/index.template.html +++ b/index.template.html @@ -84,6 +84,7 @@ no
location
+ diff --git a/js/app.js b/js/app.js index 8a2454f..2731e23 100644 --- a/js/app.js +++ b/js/app.js @@ -1126,6 +1126,19 @@ function update_site(){ window.location.reload(true) } +function check_banner(){ + const bannerRequest = new Request("https://api.v2.sondehub.org/banner"); + fetch(bannerRequest) + .then(function(response){ return response.json()}) + .then(function(response){ + if (response['banner']) { + document.getElementsByTagName("header")[0].style.backgroundColor = "#ff6259" + document.getElementsByTagName("header")[0].style.borderColor = "#eb3d34" + document.getElementById("banner").innerText = response['banner'] + } + }) +} + function update_countdown(){ var date = new Date(0); time_remaining = (reload_end_time - new Date().getTime())/1000 @@ -1135,6 +1148,7 @@ function update_countdown(){ } check_version() +check_banner() update_check = setInterval(check_version, 15 * 60 * 1000) load_hash(); startAjax(); From 59d59dd33efa2273bec6f516feacd67eecb44d41 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Wed, 7 Jan 2026 17:07:57 +1100 Subject: [PATCH 3/6] Add notice about synoptic times to try and reduce invalid launch site suggestions --- js/station.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/station.js b/js/station.js index 6ad8857..580ee72 100644 --- a/js/station.js +++ b/js/station.js @@ -957,6 +957,7 @@ function generateLaunchSites() { popupContent += "
Know when this site launches? Contribute here"; popupContent += "
Site Code: " + key; + popupContent += "
Launch times are synoptic times. Sonde launches may occur up to 1 hr prior to this." // Generate view historical button popupContent += "
"; From f36809707f22363d57e49a0b9fbb68dfb74816e6 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sun, 1 Feb 2026 12:15:24 +1030 Subject: [PATCH 4/6] Handle frequencies supplied as strings (auto_rx 1.5.10) --- js/sondehub.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/sondehub.js b/js/sondehub.js index 1296cc4..c8bc10b 100644 --- a/js/sondehub.js +++ b/js/sondehub.js @@ -1894,8 +1894,9 @@ function updateVehicleInfo(vcallsign, newPosition) { } } if(newPosition.callsign[callsign].hasOwnProperty('frequency')){ - if(newPosition.callsign[callsign].frequency){ - vehicle.receiver_info[i].frequency = newPosition.callsign[rxcall].frequency.toFixed(4) + const freq = Number(newPosition.callsign[rxcall].frequency); + if(!Number.isNaN(freq)){ + vehicle.receiver_info[i].frequency = freq.toFixed(4) } } return @@ -1913,8 +1914,9 @@ function updateVehicleInfo(vcallsign, newPosition) { } } if(newPosition.callsign[callsign].hasOwnProperty('frequency')){ - if(newPosition.callsign[callsign].frequency){ - temp_receiver.frequency = newPosition.callsign[rxcall].frequency.toFixed(4) + const freq = Number(newPosition.callsign[rxcall].frequency); + if(!Number.isNaN(freq)){ + temp_receiver.frequency = freq.toFixed(4) } } vehicle.receiver_info[callsign] = temp_receiver; From 5457397df2ddedbb58b30bca7456afee63ab1ef2 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sat, 7 Feb 2026 13:12:21 +1030 Subject: [PATCH 5/6] Horizon Rings Changes (#427) --- index.template.html | 7 ---- js/app.js | 11 +----- js/sondehub.js | 86 ++++++++++++++++++++------------------------- 3 files changed, 39 insertions(+), 65 deletions(-) diff --git a/index.template.html b/index.template.html index 964bc91..0630f4b 100644 --- a/index.template.html +++ b/index.template.html @@ -270,13 +270,6 @@

Visibility

-
- Show Horizon Rings -
- - -
-
Hide Titles
diff --git a/js/app.js b/js/app.js index 2731e23..ce08051 100644 --- a/js/app.js +++ b/js/app.js @@ -809,7 +809,6 @@ $(window).ready(function() { "#sw_hide_chase", "#sw_hide_timebox", "#sw_hilight_vehicle", - '#sw_hide_horizon', '#sw_hide_titles', '#sw_layers_launches', '#sw_selective_sidebar', @@ -907,14 +906,6 @@ $(window).ready(function() { $('#lookanglesbox').css({top:'40px'}); } break; - case "opt_hide_horizon": - if(on) { - showHorizonRings(); - } - else { - hideHorizonRings(); - } - break; case "opt_hide_titles": if(on) { hideTitles(); @@ -1152,4 +1143,4 @@ check_banner() update_check = setInterval(check_version, 15 * 60 * 1000) load_hash(); startAjax(); -load(); \ No newline at end of file +load(); diff --git a/js/sondehub.js b/js/sondehub.js index c8bc10b..e51ad4c 100644 --- a/js/sondehub.js +++ b/js/sondehub.js @@ -998,27 +998,25 @@ function load() { map.on('zoomend', function() { sub_to_nearby_sondes(); //do check for horizon labels - if (offline.get("opt_hide_horizon")) { - for (key in vehicles) { - if (vehicles[key]["vehicle_type"] == "balloon") { - if (vehicles[key]["horizon_circle"]["_map"]) - { - try { - var zoom = map.getZoom(); - var horizonzoom = (Math.abs(Math.log(vehicles[key]["horizon_circle"].getRadius()/2000000)/0.75)); - var subhorizonzoom = (Math.abs(Math.log(vehicles[key]["subhorizon_circle"].getRadius()/2000000)/0.75)); - if (horizonzoom > zoom) { - map.removeLayer(vehicles[key]["horizon_circle_title"]); - } else { - map.addLayer(vehicles[key]["horizon_circle_title"]); - } - if (subhorizonzoom > zoom) { - map.removeLayer(vehicles[key]["subhorizon_circle_title"]); - } else { - map.addLayer(vehicles[key]["subhorizon_circle_title"]); - } - } catch(e){}; - } + for (key in vehicles) { + if (vehicles[key]["vehicle_type"] == "balloon") { + if (vehicles[key]["horizon_circle"]["_map"]) + { + try { + var zoom = map.getZoom(); + var horizonzoom = (Math.abs(Math.log(vehicles[key]["horizon_circle"].getRadius()/2000000)/0.75)); + var subhorizonzoom = (Math.abs(Math.log(vehicles[key]["subhorizon_circle"].getRadius()/2000000)/0.75)); + if (horizonzoom > zoom) { + map.removeLayer(vehicles[key]["horizon_circle_title"]); + } else { + map.addLayer(vehicles[key]["horizon_circle_title"]); + } + if (subhorizonzoom > zoom) { + map.removeLayer(vehicles[key]["subhorizon_circle_title"]); + } else { + map.addLayer(vehicles[key]["subhorizon_circle_title"]); + } + } catch(e){}; } } } @@ -1564,6 +1562,7 @@ function stopFollow(no_data_reset) { if(follow_vehicle !== null) { if(!no_data_reset) { focusVehicle(null); + hideHorizonRings(); // remove target mark $("#main .row.follow").removeClass("follow"); @@ -1612,6 +1611,7 @@ function followVehicle(vcallsign, noPan, force) { follow_vehicle = vcallsign; vehicles[follow_vehicle].follow = true; + updateHorizonVisibility(); // add target mark $("#main .row.follow").removeClass("follow"); @@ -3307,12 +3307,7 @@ function addPosition(position) { } else { map.addLayer(vehicle.marker.shadow); - if(!offline.get('opt_hide_horizon') == false){ - map.addLayer(vehicle.horizon_circle); - map.addLayer(vehicle.subhorizon_circle); - map.addLayer(vehicle.horizon_circle_title); - map.addLayer(vehicle.subhorizon_circle_title); - } + updateHorizonVisibility(); if(mode == "parachute") { img_src = recolorSVG(host_url + markers_url + "parachute.svg", this.balloonColor); @@ -3384,11 +3379,6 @@ function addPosition(position) { title: "Line-of-right (radio) horizon of the payload" }); - if (offline.get("opt_hide_horizon")) { - horizon_circle.addTo(map); - horizon_circle_title.addTo(map); - } - horizon_circle.on('move', function (e) { try { var latlng = L.latLng(e.target.getBounds()._southWest.lat, ((e.target.getBounds()._northEast.lng + e.target.getBounds()._southWest.lng)/2)); @@ -3417,11 +3407,6 @@ function addPosition(position) { title: "Payload is greater than 5 degrees above the horizon within this circle, which indicates it should be fairly easily receivable." }); - if (offline.get("opt_hide_horizon")) { - subhorizon_circle.addTo(map); - subhorizon_circle_title.addTo(map); - } - subhorizon_circle.on('move', function (e) { try { var latlng = L.latLng(e.target.getBounds()._southWest.lat, ((e.target.getBounds()._northEast.lng + e.target.getBounds()._southWest.lng)/2)); @@ -3587,6 +3572,7 @@ function addPosition(position) { } vehicles[vcallsign] = vehicle_info; + updateHorizonVisibility(); } var vehicle = vehicles[vcallsign]; @@ -5059,17 +5045,21 @@ function hideHorizonRings(){ } } -function showHorizonRings(){ - for(var vcallsign in vehicles) { - if(vehicles[vcallsign].vehicle_type == "balloon"){ - map.addLayer(vehicles[vcallsign].horizon_circle); - map.addLayer(vehicles[vcallsign].subhorizon_circle); - vehicles[vcallsign].horizon_circle.fire("move") - vehicles[vcallsign].subhorizon_circle.fire("move") - map.addLayer(vehicles[vcallsign].horizon_circle_title); - map.addLayer(vehicles[vcallsign].subhorizon_circle_title); - } - } +function updateHorizonVisibility(){ + // Only show horizon rings for the sonde we are currently 'following' + // (the last selected sonde) + hideHorizonRings(); + + if (follow_vehicle === null) return; + if (!vehicles.hasOwnProperty(follow_vehicle)) return; + if (vehicles[follow_vehicle].vehicle_type != "balloon") return; + + map.addLayer(vehicles[follow_vehicle].horizon_circle); + map.addLayer(vehicles[follow_vehicle].subhorizon_circle); + vehicles[follow_vehicle].horizon_circle.fire("move"); + vehicles[follow_vehicle].subhorizon_circle.fire("move"); + map.addLayer(vehicles[follow_vehicle].horizon_circle_title); + map.addLayer(vehicles[follow_vehicle].subhorizon_circle_title); } function hideTitles(){ From 5a829a5dc45506fc98d0f224bea2e364e96aff24 Mon Sep 17 00:00:00 2001 From: Mark Jessop Date: Sat, 7 Feb 2026 13:14:16 +1030 Subject: [PATCH 6/6] Fix typo in horizon ring tooltip --- js/sondehub.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/sondehub.js b/js/sondehub.js index e51ad4c..f8b3f4c 100644 --- a/js/sondehub.js +++ b/js/sondehub.js @@ -3376,7 +3376,7 @@ function addPosition(position) { horizon_circle_title = new L.Marker(point, { icon: horizon_circle_title_icon, interactive: true, - title: "Line-of-right (radio) horizon of the payload" + title: "Line-of-sight (radio) horizon of the payload" }); horizon_circle.on('move', function (e) {