     Serial.print(F("INVALID"));
   }
   Serial.print(latitude/samples, 6);
-  Serial.print(F(" "));
+  Serial.print(" ");
   Serial.print(longitude/samples, 6);
-  Serial.println();
+  Serial.print(" ");
   
 }
 void read_sensors(){

  {
    x=(Serial.read()-'0');
  }
  if(x == 1 || distance1 == 0)
  {
    calibrate();
    x=0;
  }
  else
  {
    print_all();
  }
  read_gps();
  //delay(150);
}


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


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

  }
}//end read_gps


