     Serial.println(current_loc.lng, 6);
     Serial.println(current_dist);
     Serial.println(delta_dist);
-    Serial.println(eta_time / 1000);
+    Serial.println(get_avg());
     Serial.println();
   }
 }

  return sqrt(pow(from.lat - to.lat, 2) + pow(from.lng - to.lng, 2));
}

void on_new_gps(double lat, double lng) {
  current_loc.lat = lat;
  current_loc.lng = lng;

  delta_dist = current_dist - last_dist;

  eta_time = -delta_time * current_dist / delta_dist;
  put_avg(eta_time / 1000);
}

// Used for simulating GPS data
unsigned long update_at = 0;

// Start serial
void setup() {
  Serial.begin(9600);
}

// Fake GPS data and print calculated values
void loop() {
  if (millis() >= update_at) {
    update_at = millis() + 250;
