I have just tested your sketch using Kai Morich's
Bluetooth Serial Terminal app and I can see the lat/lon being printed on both the phone and monitor with the BT wiring through hardware serial.
There are some issues with your sketch and the use of String for lt and lg. TinyGPSPlus is returning a float, and is is printed and received as ascii without any need for conversion. If for some reason, you do convert, your syntax was not correct.
#include <TinyGPS++.h>
#include <SoftwareSerial.h>
static const int RXPin = 4, TXPin = 3;
static const uint32_t GPSBaud = 9600;
// The TinyGPS++ object
TinyGPSPlus gps;
// The serial connection to the GPS device
SoftwareSerial gps_ss(RXPin, TXPin);
char c;
//String lg,lt;
void setup()
{
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
gps_ss.begin(GPSBaud);
}
void loop()
{
//Bluetooth signals
while(Serial.available()){
c = Serial.read();
Serial.println(c);
if(c=='S')
{
// Stop();
Serial.println(c);
}
else if(c=='F')
{
Serial.println("case F");
//forward();
}
else if(c=='B')
{
Serial.println("case b");
//back();
}
else if(c=='L')
{
Serial.println("case l");
//left();
}
else if(c=='R')
{
Serial.println("case r");
//right();
}
}
//GPS signals
gps_ss.listen();
//Serial.println("In GPS");
while (gps_ss.available() > 0)
{
gps.encode(gps_ss.read());
if (gps.location.isUpdated())
{
Serial.print("Latitude= ");
//lt= String(gps.location.lat(),6);
//Serial.println(lt);
Serial.println(gps.location.lat());
Serial.print(" Longitude= ");
//lg=String(gps.location.lng(), 6);
//Serial.println(lg);
Serial.println(gps.location.lng());
}
}
}