public static String getDirectionFromBearing(final float bb) {
        final float bearing = (bb + 360) % 360f;
        final boolean north = bearing <= 67.5 || bearing >= 292.5;
        final boolean south = bearing >= 112.5 && bearing <= 247.5;
        final boolean east = bearing >= 22.5 && bearing <= 157.5;
        final boolean west = bearing >= 202.5 && bearing <= 337.5;

        return (north ? "N" : (south ? "S" : "")) + (east ? "E" : (west ? "W" : ""));

    }
formats given elevation in meters or feet, no fractions, no kilometers/miles
main/src/main/java/cgeo/geocaching/location/Units.java