' +
'
';
var b = '
' +
@@ -2152,7 +2229,7 @@ function drawLaunchPrediction(vcallsign) {
color: balloon_colors[vehicle.color_index],
opacity: 0.4,
weight: 3,
- }).addTo(map);
+ })//.addTo(map);
vehicle.prediction_launch_polyline.on('click', function (e) {
mapInfoBox_handle_prediction_path(e);
@@ -2206,54 +2283,52 @@ function redrawPrediction(vcallsign) {
color: balloon_colors[vehicle.color_index],
opacity: 0.5, // Was 0.4
weight: 3,
- }).addTo(map);
- vehicle.prediction_polyline.on('click', function (e) {
- mapInfoBox_handle_prediction_path(e);
- });
+ })//.addTo(map);
+ // vehicle.prediction_polyline.on('click', function (e) {
+ // mapInfoBox_handle_prediction_path(e);
+ // });
}
vehicle.prediction_polyline.path_length = path_length;
var image_src;
- if(vcallsign != "wb8elk2") { // WhiteStar
- var html = "";
- if(vehicle.prediction_target) {
- vehicle.prediction_target.setLatLng(latlng);
- } else {
- image_src = host_url + markers_url + "target-" + balloon_colors_name[vehicle.color_index] + ".png";
- predictionIcon = new L.icon({
- iconUrl: image_src,
- iconSize: [20,20],
- iconAnchor: [10, 10],
- });
- vehicle.prediction_target = new L.Marker(latlng, {
- zIndexOffset: Z_SHADOW,
- icon: predictionIcon,
- }).addTo(map);
- vehicle.prediction_target.on('click', function (e) {
- mapInfoBox_handle_prediction(e);
- });
- }
- vehicle.prediction_target.pdata = data[data.length-1];
- if(vehicle.prediction.descent_rate == null){
- vehicle.prediction_target.pred_type = "
Prediction Type: Float\n";
+ var html = "";
+ if(vehicle.prediction_target) {
+ vehicle.prediction_target.setLatLng(latlng);
+ } else {
+ image_src = host_url + markers_url + "target-" + balloon_colors_name[vehicle.color_index] + ".png";
+ predictionIcon = new L.icon({
+ iconUrl: image_src,
+ iconSize: [20,20],
+ iconAnchor: [10, 10],
+ });
+ vehicle.prediction_target = new L.Marker(latlng, {
+ zIndexOffset: Z_SHADOW,
+ icon: predictionIcon,
+ })//addTo(map);
+ // vehicle.prediction_target.on('click', function (e) {
+ // mapInfoBox_handle_prediction(e);
+ // });
+ }
+ vehicle.prediction_target.pdata = data[data.length-1];
+
+ if(vehicle.prediction.descent_rate == null){
+ vehicle.prediction_target.pred_type = "
Prediction Type: Float\n";
+ } else {
+ if(vehicle.prediction.descending == 1){
+ vehicle.prediction_target.pred_type = "
Prediction Type: Standard \n" +
+ "
Descent Rate: " + vehicle.prediction.descent_rate.toFixed(1) + " m/s \n";
} else {
- if(vehicle.prediction.descending == 1){
- vehicle.prediction_target.pred_type = "
Prediction Type: Standard \n" +
- "
Descent Rate: " + vehicle.prediction.descent_rate.toFixed(1) + " m/s \n";
- } else {
- vehicle.prediction_target.pred_type = "
Prediction Type: Standard \n" +
- "
Ascent Rate: " + vehicle.prediction.ascent_rate.toFixed(1) + " m/s \n" +
- "
Burst Altitude: " + vehicle.prediction.burst_altitude.toFixed(0) + " m\n" +
- "
Descent Rate: " + vehicle.prediction.descent_rate.toFixed(1) + " m/s \n";
- }
+ vehicle.prediction_target.pred_type = "
Prediction Type: Standard \n" +
+ "
Ascent Rate: " + vehicle.prediction.ascent_rate.toFixed(1) + " m/s \n" +
+ "
Burst Altitude: " + vehicle.prediction.burst_altitude.toFixed(0) + " m\n" +
+ "
Descent Rate: " + vehicle.prediction.descent_rate.toFixed(1) + " m/s \n";
}
- } else {
- if(vehicle.prediction_target) vehicle.prediction_target = null;
}
+
- if(burst_index !== 0 && vcallsign != "wb8elk2") {
+ if(burst_index !== 0 ) {
if(vehicle.prediction_burst) {
vehicle.prediction_burst.setLatLng(latlng_burst);
} else {
@@ -3104,13 +3179,13 @@ function addPosition(position) {
} catch (err) {}
});
- polyline_visible = true;
+ polyline_visible = false;
polyline = [
new L.Polyline(point, {
color: balloon_colors[color_index],
opacity: 1,
weight: 3,
- }).addTo(map)
+ })
];
}
@@ -3738,10 +3813,10 @@ function liveData() {
if (wvar.query && sondePrefix.indexOf(wvar.query) == -1) {
var topic = "sondes/" + wvar.query;
client.subscribe(topic);
- clientTopic = topic;
+ clientTopic = [topic];
} else {
- client.subscribe("batch");
- clientTopic = "batch";
+ client.subscribe("sondes-new/#");
+ clientTopic = ["sondes-new/#"];
}
// Also subscribe to listener data, for listener and chase-car telemetry.
// To revert listener-via-websockets change, comment out this line,
@@ -3783,7 +3858,14 @@ function liveData() {
if ( document.getElementById("stTimer").classList.contains('friendly-dtime') ) {
document.getElementById("stTimer").classList.remove('friendly-dtime');
}
- $("#stTimer").text(Math.round(messageRate/10) + " msg/s");
+ var tracking_sondes = clientTopic.length;
+ if (clientTopic[0] = "sondes-new/#"){ // need to subtract one if we are subbed to the slow feed
+ tracking_sondes = tracking_sondes - 1;
+ }
+
+
+
+ $("#stTimer").text(Math.round(messageRate/10) + " msg/s " + tracking_sondes + " sondes");
$("#updatedText").text(" ");
var dateNow = new Date().getTime();
try {
@@ -4166,21 +4248,21 @@ function updateReceiverMarker(receiver) {
if (pledges.hasOwnProperty(receiver.name)) {
if (pledges[receiver.name].icon == "bronze") {
receiver.marker = new L.CircleMarker(latlng, {
- radius: 8,
+ radius: Math.min(map.getZoom(),6*1.3),
fillOpacity: 0.6,
color: "#CD7F32",
});
receiver.infobox = new L.popup({ autoClose: false, closeOnClick: false, className: "bronze" }).setContent(receiver.description);
} else if (pledges[receiver.name].icon == "silver") {
receiver.marker = new L.CircleMarker(latlng, {
- radius: 8,
+ radius: Math.min(map.getZoom(),6*1.3),
fillOpacity: 0.6,
color: "#C0C0C0",
});
receiver.infobox = new L.popup({ autoClose: false, closeOnClick: false, className: "silver" }).setContent(receiver.description);
} else {
receiver.marker = new L.CircleMarker(latlng, {
- radius: 8,
+ radius: Math.min(map.getZoom(),6*1.3),
fillOpacity: 0.6,
color: "#FFD700",
});
@@ -4188,7 +4270,7 @@ function updateReceiverMarker(receiver) {
};
} else {
receiver.marker = new L.CircleMarker(latlng, {
- radius: 6,
+ radius: Math.min(map.getZoom(),6),
fillOpacity: 0.6,
color: "#008000",
});
@@ -4306,8 +4388,58 @@ function updateReceivers(r, single) {
receiver.lon = lon;
receiver.alt = alt;
receiver.age = age.toISOString();
- receiver.description = "
"+receiver.name+"
Radio: " + last.software_name + "-" + last.software_version
- + "
Antenna: " + last.uploader_antenna + "
Last Contact: " + last.ts + "Z
";
+
+ var receiver_description_html = document.createElement("p")
+ var receiver_name = document.createElement("font")
+ receiver_name.style.fontSize = "13px"
+ receiver_name.textContent = receiver.name
+ receiver_description_html.appendChild(receiver_name)
+ receiver_description_html.appendChild(document.createElement("br"))
+
+ var subSection = document.createElement("font")
+ subSection.style.fontSize = "-2"
+ var radioSoftware = document.createElement("b")
+ radioSoftware.textContent = "Software: "
+ subSection.appendChild(radioSoftware)
+
+ var receiverSoftware = document.createTextNode(last.software_name + "-" + last.software_version)
+ subSection.appendChild(receiverSoftware)
+
+ subSection.appendChild(document.createElement("br"))
+
+ if (last.uploader_radio){
+ var radioHeading = document.createElement("b")
+ radioHeading.textContent = "Radio: "
+ subSection.appendChild(radioHeading)
+
+ var uploaderRadio = document.createTextNode(last.uploader_radio)
+ subSection.appendChild(uploaderRadio)
+
+ subSection.appendChild(document.createElement("br"))
+ }
+
+
+ if (last.uploader_antenna){
+ var antennaHeading = document.createElement("b")
+ antennaHeading.textContent = "Antenna: "
+ subSection.appendChild(antennaHeading)
+
+ var uploaderAntenna = document.createTextNode(last.uploader_antenna)
+ subSection.appendChild(uploaderAntenna)
+
+ subSection.appendChild(document.createElement("br"))
+ }
+
+ var lastContactHeading = document.createElement("b")
+ lastContactHeading.textContent = "Last Contact: "
+ subSection.appendChild(lastContactHeading)
+
+ var lastContact = document.createTextNode(last.ts + "Z")
+ subSection.appendChild(lastContact)
+
+ receiver_description_html.appendChild(subSection)
+
+ receiver.description = receiver_description_html.innerHTML;
receiver.fresh = true;
updateReceiverMarker(receiver);
@@ -4749,6 +4881,7 @@ function update(response, none) {
};
ctx_init.run(ctx_init);
+ sub_to_nearby_sondes();
}
function zoom_on_payload() {