   if(distance1 <= 200){
     Serial.print("SF ");
     Serial.print(distance1);// In inches
-    Serial.println();
+    Serial.print(" ");
+    //Serial.println();
+  }
+  else{
+    Serial.print("SF ");
+    Serial.print(0);// In inches
+    Serial.print(" ");
   }
   if(distance2 >= 100){
     Serial.print("SL ");
     Serial.print(distance2);// In inches
-    Serial.println();
+    Serial.print(" ");
+    //Serial.println();
+  }
+  else{
+    Serial.print("SL ");
+    Serial.print(0);// In inches
+    Serial.print(" ");
   }
   if(distance3 >= 100){
     Serial.print("SR ");
     Serial.print(distance3);// In inches
-    Serial.println();
+    Serial.print(" ");
+    //Serial.println();
+  }
+  else{
+    Serial.print("SR ");
+    Serial.print(0);// In inches
+    Serial.print(" ");
   }
 }
 //Print gps lat and long

  {
    Serial.print(F("INVALID"));
  }
  Serial.println();
  
}//end print_gps

//Read gps Lat and long
void read_gps(){
  while (ss.available() > 0)
    if (gps.encode(ss.read()))
      print_gps();
   
  if (millis() > 5000 && gps.charsProcessed() < 10)
  {
    Serial.println(F("No GPS detected: check wiring."));
    while(true);
  }

  
}//end read_gps



  {
    x=(Serial.read()-'0');
  }
  if(x == 1)
  {
    print_all();
    calibrate();
    x=0;
  }
  else
  {
    print_all();
    read_gps();
  }
  
  Serial.println();
}


