private static String format1(double n) {
        final String s = "" + (long) (n * 10 + 0.5);
        final int len = s.length();
        return s.substring(0, len - 1) + "." + s.charAt(len - 1);
    }
writes the track in a selected output format to a string

@param t the track to format
@return the formatted string
main/src/main/java/cgeo/geocaching/brouter/core/Formatter.java