  }
  
  float formatDistance(int meters){
-  return meters / (float) 1000;
+   if(meters > 1000){
+    return meters / (float) 1000;
+   } else {
+    return meters;
+   } 
  }
  
   void gpsdump(TinyGPS &gps){

   int distance = getDistance(mCurrentWayPoint, flat, flon);
   
   //Check if distance is less then 2 meters
   if(distance < MIN_DISTANCE){
     lcd2.setCursor(0,3);
     //Advance to next way point
     mCurrentWayPoint++;

//Kalman filter for smoothing compass value
//Kalman compassFilter(0.125,32,1023,0); //suggested initial values for high noise filtering

/* true if in a turn */
boolean turning = false;
 
//Method definitions
void gpsdump(TinyGPS &gps);
bool feedgps();
