diff --git a/css/main.css b/css/main.css index 29c62c2..28ef1da 100644 --- a/css/main.css +++ b/css/main.css @@ -323,9 +323,6 @@ header .search form input[type='submit'] { border-left: 5px solid #ccc; } -#main .vehicle0 .header { - border-top: 1px solid #33b5e5; -} #main .header.empty { text-align: center; width: 100%; @@ -454,14 +451,6 @@ header .search form input[type='submit'] { border: 1px solid #5E5E5E; } -#main .portrait .row .data .vbutton { - top: 50px !important; -} - -#main .portrait .row .data .sbutton { - top: 80px !important; -} - #main .row .data img { position: absolute; z-index: 2; @@ -842,7 +831,7 @@ header .search form input[type='submit'] { } #main .data .left { float: left; - width: 160px; + width: 80%; padding-left: 5px; } #main .data dl > dt { @@ -878,7 +867,7 @@ header .search form input[type='submit'] { } #main .data .left { float: left; - width: 60%; + width: 55%; padding-left: 5px; } #main .data .right { diff --git a/index.html b/index.html index ef2b516..84eb567 100644 --- a/index.html +++ b/index.html @@ -94,17 +94,15 @@

SondeHub Status Pages

You can find the status of the SondeHub Database on the SondeHub Dashboard.
You can view outages of the SondeHub Database at SondeHub Status. +

Info

+ This site uses data from the SondeHub v2 database, which will remove the radiosonde + load from the Habitat tracking database. + +

Chase Cars

+ Chase Cars can show up on the map using this tracker's chase-car features (look for the car icon at top-right) + or upload their position from Chasemapper or rdzTTGOsonde. + -
-

Under Beta!

-
- This site uses data from the SondeHub v2 database, which will remove the radiosonde - load from the Habitat tracking database. We are still working to being this tracker up to feature-parity with the previous - tracker, so some features like filtering by type are still in-progress. -

- Chase Cars can show up on the map using this tracker's chase-car features (look for the car icon at top-right) - or upload their position from Chasemapper or rdzTTGOsonde. -

Contribute


@@ -366,12 +364,6 @@

Report Recovery

- - - - - - + + + + + + + diff --git a/js/tracker.js b/js/tracker.js index a8f2238..6fe8316 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -23,6 +23,8 @@ var recoveries = []; var launches = null; var receiverCanvas = null; +var sondePrefix = ["RS92", "RS92-SGP", "RS92-NGP", "RS41", "RS41-SG", "RS41-SGP", "RS41-SGM", "DFM", "DFM06", "DFM09", "DFM17", "M10", "M20", "iMet-4", "iMet-54", "LMS6", "LMS6-400", "LMS6-1680", "iMS-100", "MRZ"]; + var got_positions = false; var zoomed_in = false; var max_positions = 0; // maximum number of positions that ajax request should return (0 means no maximum) @@ -1219,23 +1221,30 @@ function updateVehicleInfo(vcallsign, newPosition) { callsign_list = callsign_list.join(", "); } + //desktop var a = '
' + '' + sonde_type + vcallsign + ' ' + - //'' + vcallsign + ' ' + '' + '
' + - '
' + + '
' + '' + 'Path' + ((vehicle.vehicle_type!="car") ? 'Share' : '') + ((vehicle.vehicle_type!="car") ? 'Card' : '') + - ((vcallsign in hysplit) ? 'HYSPLIT' : '') + - ((vcallsign.substr(0, 6) in ssdv) ? 'SSDV' : '') + '
' + '
'; - // end + //mobile + var aa = '
' + + '' + sonde_type + vcallsign + ' ' + + '' + + '
' + + '
' + + '' + + 'Path' + + ((vehicle.vehicle_type!="car") ? 'Share' : '') + + ((vehicle.vehicle_type!="car") ? 'Card' : '') + + '
' + + '
'; var b = '
' + '
' + // right '
' + // data @@ -1268,7 +1277,7 @@ function updateVehicleInfo(vcallsign, newPosition) { ''; // update html - $('.portrait .vehicle'+vehicle.uuid).html(a + p + b); + $('.portrait .vehicle'+vehicle.uuid).html(aa + p + b); $('.landscape .vehicle'+vehicle.uuid).html(a + l + b); // redraw canvas @@ -2628,7 +2637,11 @@ function refresh() { mode = (mode == "position") ? "latest" : mode.replace(/ /g,""); if (wvar.query) { - var data_str = "mode=3days&type=positions&format=json&max_positions=" + max_positions + "&position_id=0&vehicles=" + encodeURIComponent(wvar.query); + if (sondePrefix.indexOf(wvar.query) > -1) { + var data_str = "mode="+mode+"&type=positions&format=json&max_positions=" + max_positions + "&position_id=" + position_id + "&vehicles="; + } else { + var data_str = "mode=3days&type=positions&format=json&max_positions=" + max_positions + "&position_id=0&vehicles=" + encodeURIComponent(wvar.query); + } } else { var data_str = "mode="+mode+"&type=positions&format=json&max_positions=" + max_positions + "&position_id=" + position_id + "&vehicles=" + encodeURIComponent(wvar.query); } @@ -2641,15 +2654,19 @@ function refresh() { success: function(response, textStatus) { $("#stText").text("loading |"); response.fetch_timestamp = Date.now(); - if (wvar.query != null) { + if (sondePrefix.indexOf(wvar.query) > -1) { + update(response); + } else if (wvar.query != null) { if (JSON.stringify(response).indexOf(wvar.query) == -1) { //check using new API ajax_inprogress = false; refreshSingleOld(wvar.query); } else { + ajax_inprogress_old = wvar.query; update(response); } } else { + ajax_inprogress_old = wvar.query; update(response); } $("#stText").text(""); @@ -2753,7 +2770,7 @@ function refreshSingleOld(serial) { if (data[i].hasOwnProperty('subtype')) { if (data[i].subtype != "SondehubV1") { var dataTempEntry = {}; - var station = data[i].uploader_callsign + var station = data[i].uploader_callsign; dataTempEntry.callsign = {}; dataTempEntry.callsign[station] = {}; dataTempEntry.callsign[station].snr = data[i].snr; @@ -2795,13 +2812,41 @@ function refreshSingleOld(serial) { if (data[i].pressure) { dataTempEntry.data.pressure = data[i].pressure; } - dataTemp.push(dataTempEntry) + if (data[i].xdata) { + dataTempEntry.data.xdata = data[i].xdata; + } + dataTemp.push(dataTempEntry); + } else { + var dataTempEntry = {}; + var station = data[i].uploader_callsign; + dataTempEntry.callsign = {}; + dataTempEntry.callsign[station] = {}; + dataTempEntry.gps_alt = parseFloat(data[i].alt); + dataTempEntry.gps_lat = parseFloat(data[i].lat); + dataTempEntry.gps_lon = parseFloat(data[i].lon); + dataTempEntry.gps_time = data[i].time_received; + dataTempEntry.server_time = data[i].time_received; + dataTempEntry.vehicle = data[i].serial; + dataTempEntry.position_id = data[i].serial + "-" + data[i].time_received; + dataTempEntry.data = {}; + if (data[i].humidity) { + dataTempEntry.data.humidity = parseFloat(data[i].humidity); + } + if (data[i].temp) { + dataTempEntry.data.temperature_external = parseFloat(data[i].temp); + } + dataTemp.push(dataTempEntry); } } } response.positions.position = dataTemp; response.fetch_timestamp = Date.now(); - update(response, "old"); + if (response.positions.position.length == 0) { + update(response); + } else { + update(response, "old"); + } + } }); } @@ -3471,6 +3516,16 @@ function update(response, flag) { } } + if (sondePrefix.indexOf(wvar.query) > -1) { + for (var i = response.positions.position.length - 1; i >= 0; i--) { + try { + if (!response.positions.position[i].type.includes(wvar.query)) { + response.positions.position.splice(i, 1) + } + } catch (e) {} + } + } + ssdv = (!response.ssdv) ? {} : response.ssdv; // create a dummy response object for postions