 double current_bearing = 0;
 // ETA in milliseconds. If negative, we're traveling away from current_dest
 double eta_time = 0;
-
-// For averaging ETA
-const int avg_count = 10;
-double avg_buf[avg_count] = {0};
-int avg_buf_pos = 0;
+// Averaged ETA in milliseconds
+Average<double> avg_eta_time(10);
 
 // Change current_dest to change the distance and eta
 Location current_dest = dests[0].loc;

#include "ILI9341_t3.h"
#include "SPI.h"
#include <math.h>

// Hardware

  current_bearing = bearing(current_loc, current_dest);

  double inst_eta = -delta_time * current_dist / delta_dist;
  avg_eta_time.push(inst_eta);
  eta_time = avg_eta_time.mean();
}

void draw_dist_eta() {
