1
1
var mission_id = 0 ;
2
2
var position_id = 0 ;
3
3
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" ;
5
5
var predictions_url = "https://api.v2.sondehub.org/amateur/predictions?vehicles=" ;
6
- var launch_predictions_url = "https://api.v2.sondehub.org/predictions/reverse" ;
7
6
8
7
var clientConnected = false ;
9
8
var clientActive = false ;
@@ -22,7 +21,6 @@ var elm_uuid = 0;
22
21
var receiver_names = [ ] ;
23
22
var receivers = [ ] ;
24
23
25
- var launchPredictions = { } ;
26
24
var stationMarkerLookup = { } ;
27
25
var markerStationLookup = { } ;
28
26
var predictionAjax = [ ] ;
@@ -1587,34 +1585,7 @@ function removePrediction(vcallsign) {
1587
1585
}
1588
1586
}
1589
1587
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
- } ) ;
1615
1588
1616
- vehicle . prediction_launch_polyline . path_length = path_length ;
1617
- }
1618
1589
1619
1590
function redrawPrediction ( vcallsign ) {
1620
1591
var vehicle = vehicles [ vcallsign ] ;
@@ -3178,22 +3149,6 @@ function refreshPredictions() {
3178
3149
periodical_predictions = setTimeout ( refreshPredictions , 60 * 1000 ) ;
3179
3150
}
3180
3151
} ) ;
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
- } ) ;
3197
3152
}
3198
3153
3199
3154
var periodical , periodical_focus , periodical_focus_new , periodical_receivers , periodical_listeners ;
@@ -3422,18 +3377,6 @@ function updateReceivers(r) {
3422
3377
if ( follow_vehicle !== null ) drawLOSPaths ( follow_vehicle ) ;
3423
3378
}
3424
3379
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
- }
3437
3380
3438
3381
function updatePredictions ( r ) {
3439
3382
if ( ! r ) return ;
0 commit comments