File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -2118,6 +2118,7 @@ function addPosition(position) {
21182118 else if ( dt >= 0 ) {
21192119 if ( vehicle . num_positions > 0 ) {
21202120 // calculate vertical rate
2121+ // TODO - Make this average over more points rather than use a FIR.
21212122 var rate = ( position . gps_alt - vehicle . curr_position . gps_alt ) / dt ;
21222123 vehicle . ascent_rate = 0.7 * rate + 0.3 * vehicle . ascent_rate ;
21232124
@@ -3057,8 +3058,10 @@ function update(response) {
30573058 offline . set ( 'positions' , ctx . lastPositions ) ;
30583059
30593060 if ( got_positions && ! zoomed_in && Object . keys ( vehicles ) . length ) {
3060- // Disable for now.
3061- //zoom_on_payload();
3061+ // Enable zooming when we only have a single payload filtered.
3062+ if ( Object . keys ( vehicles ) . length == 1 ) {
3063+ zoom_on_payload ( ) ;
3064+ }
30623065 }
30633066
30643067 if ( periodical_predictions === null ) refreshPredictions ( ) ;
You can’t perform that action at this time.
0 commit comments