Skip to content

Commit 90b7c1f

Browse files
committed
Update station.js
1 parent 559b11b commit 90b7c1f

File tree

1 file changed

+0
-83
lines changed

1 file changed

+0
-83
lines changed

js/station.js

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -789,89 +789,6 @@ function plotPrediction (data, dates, marker, properties) {
789789

790790
}
791791

792-
////Existing function
793-
// function plotPrediction (data, dates, marker, properties) {
794-
// if (!launchPredictions.hasOwnProperty(marker)) {
795-
// launchPredictions[marker] = {};
796-
// }
797-
// launchPredictions[marker][dates.indexOf(data.request.launch_datetime)+1] = {};
798-
// plot = launchPredictions[marker][dates.indexOf(data.request.launch_datetime)+1];
799-
800-
// ascent = data.prediction[0].trajectory;
801-
// descent = data.prediction[1].trajectory;
802-
// var predictionPath = [];
803-
// for (var i = 0; i < ascent.length; i++) {
804-
// if (ascent[i].longitude > 180.0) {
805-
// var longitude = ascent[i].longitude - 360.0;
806-
// } else {
807-
// var longitude = ascent[i].longitude;
808-
// }
809-
// predictionPath.push([ascent[i].latitude, longitude]);
810-
// };
811-
// for (var x = 0; x < descent.length; x++) {
812-
// if (descent[x].longitude > 180.0) {
813-
// var longitude = descent[x].longitude - 360.0;
814-
// } else {
815-
// var longitude = descent[x].longitude;
816-
// }
817-
// predictionPath.push([descent[x].latitude, longitude]);
818-
// };
819-
// var burstPoint = ascent[ascent.length-1];
820-
// var landingPoint = descent[descent.length-1];
821-
822-
// plot.predictionPath = new L.polyline(predictionPath, {color: 'red'}).addTo(map);
823-
824-
// burstIconImage = host_url + markers_url + "balloon-pop.png";
825-
826-
// burstIcon = new L.icon({
827-
// iconUrl: burstIconImage,
828-
// iconSize: [20,20],
829-
// iconAnchor: [10, 10],
830-
// });
831-
832-
// if (burstPoint.longitude > 180.0) {
833-
// var burstLongitude = burstPoint.longitude - 360.0;
834-
// } else {
835-
// var burstLongitude = burstPoint.longitude;
836-
// }
837-
838-
// plot.burstMarker = new L.marker([burstPoint.latitude, burstLongitude], {
839-
// icon: burstIcon
840-
// }).addTo(map);
841-
842-
// var burstTime = new Date(burstPoint.datetime);
843-
// var burstTooltip = "<b>Time: </b>" + burstTime.toLocaleString() + "<br><b>Altitude: </b>" + Math.round(burstPoint.altitude) + "m";
844-
// plot.burstMarker.bindTooltip(burstTooltip, {offset: [5,0]});
845-
846-
847-
848-
849-
// if (landingPoint.longitude > 180.0) {
850-
// var landingLongitude = landingPoint.longitude - 360.0;
851-
// } else {
852-
// var landingLongitude = landingPoint.longitude;
853-
// }
854-
855-
// plot.landingMarker = new L.marker([landingPoint.latitude, landingLongitude], {
856-
// icon: new L.NumberedDivIcon({number: dates.indexOf(data.request.launch_datetime)+1})
857-
// }).addTo(map);
858-
859-
// var coords_text = format_coordinates(landingPoint.latitude, landingLongitude, "Prediction");
860-
861-
// var landingTime = new Date(landingPoint.datetime);
862-
// if (properties[3] != "" && properties[4] != "") {
863-
// var landingTooltip = "<b>Time:</b> " + landingTime.toLocaleString() + "<br><b>Model Dataset:</b> " + data.request.dataset +
864-
// "<br><b>Prediction:</b>" + coords_text +
865-
// "<br><b>Model Assumptions:</b><br>- " + data.request.ascent_rate + "m/s ascent<br>- " + data.request.burst_altitude + "m burst altitude (" + properties[3] + " samples)<br>- " + data.request.descent_rate + "m/s descent (" + properties[4] + " samples)";
866-
// } else {
867-
// var landingTooltip = "<b>Time:</b> " + landingTime.toLocaleString() + "<br><b>Model Dataset:</b> " + data.request.dataset +
868-
// "<br><b>Prediction:</b>" + coords_text +
869-
// "<br><b>Model Assumptions:</b><br>- " + data.request.ascent_rate + "m/s ascent<br>- " + data.request.burst_altitude + "m burst altitude<br>- " + data.request.descent_rate + "m/s descent";
870-
// }
871-
// plot.landingMarker.bindTooltip(landingTooltip, {offset: [13,-28]});
872-
// //var popup = new L.popup({ autoClose: false, closeOnClick: false }).setContent(serial);
873-
// }
874-
875792
function showPrediction(url) {
876793
var ajaxReq = $.ajax({
877794
type: "GET",

0 commit comments

Comments
 (0)