     Serial.print(", ");
     Serial.println(current_loc.lng, 6);
     Serial.println(current_dist);
-    Serial.println(delta_dist);
-    Serial.println(get_avg());
+    Serial.println(current_bearing);
     Serial.println();
   }
 }

unsigned long current_time = 0;
unsigned long last_time = 0;
double delta_time = 0;
// Distance in degrees
double current_dist = 0;
double last_dist = 0;
double delta_dist = 0;
// ETA in milliseconds. If negative, we're traveling away from current_dest
double eta_time = 0;


  double a = pow(sin(dlat/2), 2) + cos(from.lat) * cos(to.lat) * pow(sin(dlng/2), 2);
  double c = 2 * atan2(sqrt(a), sqrt(1-a));
  return EARTH_RADIUS * c;
}

// http://www.movable-type.co.uk/scripts/latlong.html
// http://forum.arduino.cc/index.php?topic=45760.0
// returns bearing in degrees
double bearing(Location from, Location to) {
  double lat1 = from.lat * RADS_PER_DEG;
  double lng1 = from.lng * RADS_PER_DEG;
  double lat2 = to.lat * RADS_PER_DEG;
  double lng2 = to.lng * RADS_PER_DEG;

  double bearing = atan2(
    sin(lng2-lng1) * cos(lat2),
    (cos(lat1) * sin(lat2)) - (sin(lat1) * cos(lat2) * cos(lng2-lng1))
  ) / RADS_PER_DEG;

  // use mod to turn -90 = 270
  return fmod((bearing + 360.0), 360);
}

// Stores a value for the sliding window average
