@@ -377,7 +377,7 @@ function updateVehicleInfo(index, position) {
377377 // mid for landscape
378378 var l = '<dt>' + ascent_text + '</dt><dd>rate</dd>'
379379 + '<dt>' + position . gps_alt + 'm (' + vehicles [ index ] . max_alt + 'm)</dt><dd>altitude (max)</dd>'
380- + '<dt>' + position . gps_time + '</dt><dd>time </dd>'
380+ + '<dt>' + position . gps_time + '</dt><dd>datetime </dd>'
381381 + '<dt>' + coords_text + '</dt><dd>coordinates</dd>'
382382 + habitat_data ( position . data )
383383 + c // recievers if any
@@ -514,6 +514,7 @@ function updatePolyline(vehicle_index) {
514514
515515function convert_time ( gps_time ) {
516516 // example: "2009-05-28 20:29:47"
517+ /*
517518 year = parseInt(gps_time.substring(0, 4), 10);
518519 month = parseInt(gps_time.substring(5, 7), 10);
519520 day = parseInt(gps_time.substring(8, 10), 10);
@@ -528,11 +529,14 @@ function convert_time(gps_time) {
528529 date.setUTCHours(hour);
529530 date.setUTCMinutes(minute);
530531 date.setUTCSeconds(second);
532+ */
531533
532- return date . getTime ( ) / 1000 ; // seconds since 1/1/1970 @ 12:00 AM
534+ return ( new Date ( gps_time ) ) . getTime ( ) / 1000 ; // seconds since 1/1/1970 @ 12:00 AM
533535}
534536
535537function addPosition ( position ) {
538+ position . gps_time = position . gps_time . replace ( / ( \d + ) - ( \d + ) - ( \d + ) / , "$2/$3/$1" ) ;
539+
536540 // check if the vehicle is already in the list, if not create a new item
537541 if ( $ . inArray ( position . vehicle , vehicle_names ) == - 1 ) {
538542 vehicle_names . push ( position . vehicle ) ;
@@ -931,6 +935,9 @@ function update(response) {
931935 // pan and follow that balloon
932936 followVehicle ( i ) ;
933937
938+ // expand list element
939+ $ ( '.vehicle' + i ) . addClass ( 'active' ) ;
940+
934941 // scroll list to the expanded element
935942 listScroll . refresh ( ) ;
936943 listScroll . scrollToElement ( '.portrait .vehicle' + i ) ;
0 commit comments