diff --git a/js/app.js b/js/app.js index ae143b9..4ce1030 100644 --- a/js/app.js +++ b/js/app.js @@ -243,8 +243,8 @@ function trackerInit() { if(wvar.graph) $('#telemetry_graph').attr('style',''); // fetch hysplit jobs - setInterval(refresh_hysplit, 60 * 1000); - refresh_hysplit(); + // setInterval(refresh_hysplit, 60 * 1000); + // refresh_hysplit(); return; } diff --git a/js/tracker.js b/js/tracker.js index 7ad37c1..3505ba5 100644 --- a/js/tracker.js +++ b/js/tracker.js @@ -1473,7 +1473,7 @@ var mapInfoBox_handle_path_fetch = function(id,vehicle) { html += ""; - html += "
"+data.vehicle+"("+data.position_id+")
"; + html += "
"+data.vehicle+"("+data.position_id+")
"; html += "
"; html += "
 "+roundNumber(data.gps_lat, 5) + ', ' + roundNumber(data.gps_lon, 5)+"
"; @@ -1504,7 +1504,30 @@ var mapInfoBox_handle_path_fetch = function(id,vehicle) { if(data.vehicle.search(/(chase)/i) == -1) { html += "
"; - html += "
Received via: "+data.callsign.replace(/,/g,', ')+"
"; + html += "
" + var callsign_list = [] + for(var rxcall in data.callsign){ + if(data.callsign.hasOwnProperty(rxcall)) { + _new_call += "Received via:  "; + _new_call = rxcall; + if(data.callsign[rxcall].hasOwnProperty('snr')){ + if(data.callsign[rxcall].snr){ + _new_call += " (" + data.callsign[rxcall].snr.toFixed(0) + " dB)"; + callsign_list.push(_new_call) + continue; + } + } + if(data.callsign[rxcall].hasOwnProperty('rssi')){ + if(data.callsign[rxcall].rssi){ + _new_call += " (" + data.callsign[rxcall].snr.toFixed(0) + " dBm)"; + callsign_list.push(_new_call) + continue; + } + } + } + } + callsign_list = callsign_list.join("
"); + html += callsign_list + "
"; } div.innerHTML = html; @@ -2972,7 +2995,14 @@ function update(response) { for (; i < max ; i++) { var row = ctx.positions[i]; - if(row.position_id > position_id) { position_id = row.position_id; } + // set the position based on the last record (oldest) returned from the server. Only provide minute accuracy to allow better hit rate with cloudfront + this_position_id = new Date(row.gps_time); + this_position_id.setSeconds(0) + this_position_id.setMilliseconds(0) + + if (new Date(position_id) < this_position_id || position_id == 0){ + position_id = this_position_id.toISOString() + } if (!row.picture) { addPosition(row);