@@ -1460,6 +1460,7 @@ function updateVehicleInfo(vcallsign, newPosition) {
1460
1460
timeChosen = timeSent ;
1461
1461
}
1462
1462
1463
+
1463
1464
//desktop
1464
1465
var a = '<div class="header">' +
1465
1466
'<span>' + sonde_type + vcallsign + ' <i class="icon-target"></i></span>' +
@@ -1816,7 +1817,7 @@ function redrawPrediction(vcallsign) {
1816
1817
vehicle . prediction_polyline . path_length = path_length ;
1817
1818
1818
1819
var image_src ;
1819
- if ( vcallsign != "wb8elk2" ) { // WhiteStar
1820
+ if ( vcallsign != "wb8elk2" ) { // WhiteStar - Not sure the reasons behind a check for this? Seems odd. May be from when WB8ELK was first doing floater flights?
1820
1821
var html = "" ;
1821
1822
if ( vehicle . prediction_target ) {
1822
1823
vehicle . prediction_target . setLatLng ( latlng ) ;
@@ -1836,7 +1837,13 @@ function redrawPrediction(vcallsign) {
1836
1837
} ) ;
1837
1838
}
1838
1839
vehicle . prediction_target . pdata = data [ data . length - 1 ] ;
1840
+ if ( vehicle . prediction . descent_rate == null ) {
1841
+ vehicle . prediction_target . pred_type = "Float Prediction" ;
1842
+ } else {
1843
+ vehicle . prediction_target . pred_type = "Standard, " + vehicle . prediction . descent_rate . toFixed ( 1 ) + " m/s descent rate." ;
1844
+ }
1839
1845
} else {
1846
+ // Suspect this will never be called?
1840
1847
if ( vehicle . prediction_target ) vehicle . prediction_target = null ;
1841
1848
}
1842
1849
@@ -1859,8 +1866,17 @@ function redrawPrediction(vcallsign) {
1859
1866
} ) ;
1860
1867
}
1861
1868
vehicle . prediction_burst . pdata = data [ burst_index ] ;
1869
+ if ( vehicle . prediction . descent_rate == null ) {
1870
+ vehicle . prediction_burst . pred_type = "Float Prediction" ;
1871
+ } else {
1872
+ vehicle . prediction_burst . pred_type = "Standard, " + vehicle . prediction . descent_rate . toFixed ( 1 ) + " m/s descent rate." ;
1873
+ }
1862
1874
} else {
1863
- if ( vehicle . prediction_burst ) vehicle . prediction_burst = null ;
1875
+ if ( vehicle . prediction_burst ) {
1876
+ // Remove burst icon from the map if no burst data in prediction.
1877
+ map . removeLayer ( vehicle . prediction_burst ) ;
1878
+ vehicle . prediction_burst = null ;
1879
+ }
1864
1880
}
1865
1881
}
1866
1882
@@ -2160,11 +2176,14 @@ function mapInfoBox_handle_prediction(event) {
2160
2176
altitude = Math . round ( data . alt ) + " m" ;
2161
2177
}
2162
2178
2179
+ console . log ( event ) ;
2180
+
2163
2181
mapInfoBox . setContent ( "<pre>" +
2164
2182
formatDate ( new Date ( parseInt ( data . time ) * 1000 ) , true ) + "\n\n" +
2165
2183
"<b>Altitude:</b> " + altitude + "\n" +
2166
2184
"<b>Latitude:</b> " + data . lat + "\n" +
2167
2185
"<b>Longitude:</b> " + data . lon + "\n" +
2186
+ "<b>Prediction Type:</b> " + event . target . pred_type + "\n" +
2168
2187
"</pre>"
2169
2188
) ;
2170
2189
mapInfoBox . setLatLng ( event . latlng ) ;
0 commit comments