If the lat_frac has leading zeros, they are dropped, leading to the incorrect value being printed:  I know examples 10 and 11 are effected but there may be others:   One solution is to use printf Serial.printf("%d.%07d\n", lat_int, lat_frac); // Print the integer part of the latitude But I know its support is iffy. We might have to break down and just write a silly helper function inside these examples.