How to merge two GPS coordinates without losing decimals I want to take the GPS coordinates like 42.1234 per 22.1234 and merge them as a string, with a separator character:

42.1234 x 22.1234

But using this code:

gps_string = (String)gps.location.lat()+' x '+(String)gps.location.lng();

I lose the last decimals and I get:

42.12 x 22.12

The only way I could see full coordinates is by specifying an extra parameter to println, like this:

Serial.println(gps.location.lat(), 6);

How can I create a string containing both two coordinates without losing decimals ? e.g 42.1234 x 22.1234
If you want 4 decimal places, you may try something like this:

gps_string = String(gps.location.lat(), 4)
           + " x "
           + String(gps.location.lng(), 4);