Skip to content

Commit 3e531b1

Browse files
author
xss
committed
remove launch predictions and fix listener url
1 parent 6e3cfd4 commit 3e531b1

File tree

1 file changed

+1
-58
lines changed

1 file changed

+1
-58
lines changed

js/tracker.js

Lines changed: 1 addition & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
var mission_id = 0;
22
var position_id = 0;
33
var newdata_url = "https://api.v2.sondehub.org/amateur/telemetry";
4-
var receivers_url = "https://api.v2.sondehub.org/listeners/telemetry";
4+
var receivers_url = "https://api.v2.sondehub.org/amateur/listeners/telemetry";
55
var predictions_url = "https://api.v2.sondehub.org/amateur/predictions?vehicles=";
6-
var launch_predictions_url = "https://api.v2.sondehub.org/predictions/reverse";
76

87
var clientConnected = false;
98
var clientActive = false;
@@ -22,7 +21,6 @@ var elm_uuid = 0;
2221
var receiver_names = [];
2322
var receivers = [];
2423

25-
var launchPredictions = {};
2624
var stationMarkerLookup = {};
2725
var markerStationLookup = {};
2826
var predictionAjax = [];
@@ -1587,34 +1585,7 @@ function removePrediction(vcallsign) {
15871585
}
15881586
}
15891587

1590-
function drawLaunchPrediction(vcallsign) {
1591-
var vehicle = vehicles[vcallsign];
1592-
var data = vehicle.prediction_launch.data;
1593-
1594-
var line = [];
1595-
var latlng = null;
1596-
var path_length = 0;
1597-
1598-
for(var i = 0, ii = data.length; i < ii; i++) {
1599-
latlng = new L.LatLng(data[i].lat, data[i].lon);
1600-
line.push(latlng);
1601-
if(i > 1) path_length += line[i-1].distanceTo(line[i]);
1602-
}
1603-
1604-
vehicle.prediction_launch_path = line;
1605-
1606-
vehicle.prediction_launch_polyline = new L.Wrapped.Polyline(line, {
1607-
color: balloon_colors[vehicle.color_index],
1608-
opacity: 0.4,
1609-
weight: 3,
1610-
}).addTo(map);
1611-
1612-
vehicle.prediction_launch_polyline.on('click', function (e) {
1613-
mapInfoBox_handle_prediction_path(e);
1614-
});
16151588

1616-
vehicle.prediction_launch_polyline.path_length = path_length;
1617-
}
16181589

16191590
function redrawPrediction(vcallsign) {
16201591
var vehicle = vehicles[vcallsign];
@@ -3178,22 +3149,6 @@ function refreshPredictions() {
31783149
periodical_predictions = setTimeout(refreshPredictions, 60 * 1000);
31793150
}
31803151
});
3181-
3182-
var data_str = "duration=" + wvar.mode + "&vehicles=" + encodeURIComponent(wvar.query);
3183-
3184-
ajax_predictions = $.ajax({
3185-
type: "GET",
3186-
url: launch_predictions_url,
3187-
data: data_str,
3188-
dataType: "json",
3189-
success: function(response, textStatus) {
3190-
updateLaunchPredictions(response);
3191-
},
3192-
error: function() {
3193-
},
3194-
complete: function(request, textStatus) {
3195-
}
3196-
});
31973152
}
31983153

31993154
var periodical, periodical_focus, periodical_focus_new, periodical_receivers, periodical_listeners;
@@ -3422,18 +3377,6 @@ function updateReceivers(r) {
34223377
if(follow_vehicle !== null) drawLOSPaths(follow_vehicle);
34233378
}
34243379

3425-
function updateLaunchPredictions(r) {
3426-
for (serial in r) {
3427-
prediction = r[serial];
3428-
if(vehicles.hasOwnProperty(serial)) {
3429-
vehicle = vehicles[serial];
3430-
if (vehicle.prediction_launch == null) {
3431-
vehicle.prediction_launch = prediction;
3432-
drawLaunchPrediction(serial);
3433-
}
3434-
}
3435-
}
3436-
}
34373380

34383381
function updatePredictions(r) {
34393382
if(!r) return;

0 commit comments

Comments
 (0)