@@ -218,17 +218,17 @@ function habitat_data(jsondata) {
218218 if ( suffixes [ key ] !== undefined )
219219 suffix = " " + suffixes [ key ] ;
220220
221- output . push ( "<b >" + name + ":</b> " + data [ key ] + suffix + "<br / >") ;
221+ output . push ( "<dt >" + data [ key ] + suffix + "</dt><dd> " + name + "</dd >") ;
222222 }
223223
224224 output . sort ( ) ;
225225 return output . join ( " " ) ;
226226 }
227227 catch ( error )
228228 {
229- if ( jsondata && jsondata != '' )
230- return "<b>Data:</b> " + jsondata + "<br /> " ;
231- else
229+ // if (jsondata && jsondata != '')
230+ // return "<b>Data:</b> " + jsondata + "<br /> ";
231+ // else
232232 return "" ;
233233 }
234234}
@@ -527,12 +527,16 @@ function updateVehicleInfo(index, position) {
527527 + '</div>' // right
528528 + '</div>' // data
529529 + '' ;
530+ var c = '<dt class="recievers">Recieved by:</dt><dd class="recievers">'
531+ + position . callsign . split ( "," ) . join ( ", " ) + '</dd>'
532+
533+ if ( ! position . callsign ) c = '' ;
534+
530535 // mid for portrait
531536 var p = '<dt>' + position . gps_time + '</dt><dd>time</dd>'
532537 + '<dt>' + coords_text + '</dt><dd>time</dd>'
533- + '<dt class="recievers">Recieved by:</dt><dd class="recievers">'
534- + position . callsign . split ( "," ) . join ( ", " )
535- + '</dd></dl>'
538+ + c // recievers if any
539+ + '</dl>'
536540 + '</div>' // left
537541 + '<div class="right">'
538542 + '<dl>'
@@ -545,64 +549,14 @@ function updateVehicleInfo(index, position) {
545549 + '<dt>' + position . gps_alt + 'm (' + vehicles [ index ] . max_alt + 'm)</dt><dd>altitude (max)</dd>'
546550 + '<dt>' + position . gps_time + '</dt><dd>time</dd>'
547551 + '<dt>' + coords_text + '</dt><dd>coordinates</dd>'
548- + '<dt class="recievers">Recieved by:</dt><dd class="recievers">'
549- + position . callsign . split ( "," ) . join ( ", " )
550- + '</dd>' ;
552+ + habitat_data ( position . data )
553+ + c // recievers if any
551554 + '' ;
552555
553556
554557 $ ( '.portrait .vehicle' + index ) . html ( a + p + b ) ;
555558 $ ( '.landscape .vehicle' + index ) . html ( a + l + b ) ;
556559 return true ;
557-
558- /// old code
559-
560- var html = ' <div class="altitude_container" id="altitude_' + index + '">'
561- + ' <div class="altitude" style="font-size:0px; border-top: solid white ' + ( 98 - pixels ) + 'px; height: ' + pixels + 'px;"></div>'
562- + ' </div>'
563- + ' <div class="vehicle_info_wrapper">'
564- + ' <div class="vehicle_info" style="background: url(' + image + ') no-repeat top right;">'
565- + ' <b style="font-size:12px">' + vehicle_names [ index ] + '</b><br />' ;
566-
567- /* XXX OSIRIS INVISIBILITY */ if ( vehicle_names [ index ] != "OSIRIS" && vehicle_names [ index ] != "PETUNIA" )
568- html += ' <b>Time:</b> ' + position . gps_time + '<br />'
569- + ' <b>Position:</b> ' + roundNumber ( position . gps_lat , 6 ) + ',' + roundNumber ( position . gps_lon , 6 ) + '<br />'
570- + ' <b>Altitude:</b> ' + position . gps_alt + ' m' + ascent_text + '<br />'
571- + ( vehicles [ index ] . vehicle_type == "balloon" ? ( '<b>Max. Altitude:</b> ' + vehicles [ index ] . max_alt + ' m<br />' ) : '' ) ;
572-
573-
574- /* XXX OSIRIS INVISIBILITY */ else
575- html += ' <b>Sentence ID:</b> ' + position . sequence + '<br />' ;
576-
577- html += optional ( "Heading" , position . gps_heading , "°" )
578- + optional ( "Speed" , position . gps_speed , " km/h" )
579- + optional ( "Temperature" , position . temp_inside , "C" ) ;
580-
581- /* Use habitat data! Just add the keys you want to the habitat_data function
582- * if (position.vehicle == "wb8elk2")
583- * html += whitestar_data("Data", position.data, "");
584- * else if (position.vehicle == "apex")
585- * html += apex_data("Data", position.data, "");
586- * else if (position.vehicle == "picochu-1")
587- * html += picochu_data("Data", position.data, "");
588- * else if (position.vehicle == "DARKSIDE")
589- * html += darkside_data("Dara", position.data, "");
590- * else
591- * // html += optional("Data", position.data, "");
592- */
593-
594- html += habitat_data ( position . data ) ;
595- html += optional ( "Receivers" , position . callsign . split ( "," ) . join ( ", " ) , "" ) ;
596- /* XXX OSIRIS INVISIBILITY */ if ( vehicle_names [ index ] != "OSIRIS" && vehicle_names [ index ] != "PETUNIA" )
597- html += vehicleButtons ( index ) ;
598-
599- html += ' </div>'
600- + ' </div>'
601- + ' <div style="clear:both;"></div>' ;
602-
603- container . innerHTML = html ;
604- //$("#debug_box").html("Height: " + container.offsetHeight);
605- $ ( "#altitude_" + index ) . css ( "margin-top" , container . offsetHeight - 100 ) ;
606560}
607561
608562function showSignals ( index , position ) {
0 commit comments