public static String calculateUuidString(final byte[] uuid) {
        final StringBuilder sb = new StringBuilder();

        for (int i = 0; i < uuid.length; i++) {
            if (i == 4) {
                sb.append('-');
            }
            if (i == 6) {
                sb.append('-');
            }
            if (i == 8) {
                sb.append('-');
            }
            if (i == 10) {
                sb.append('-');
            }

            final int intFromByte = ByteUtils.getIntFromByte(uuid[i]);
            if(intFromByte <= 0xF){
                sb.append('0');
            }
            sb.append(Integer.toHexString(intFromByte));
        }


        return sb.toString();
    }
Calculates the accuracy of an RSSI reading.
<p/>
The code was taken from <a href="http://stackoverflow.com/questions/20416218/understanding-ibeacon-distancing" /a>

@param txPower the calibrated TX power of an iBeacon
@param rssi    the RSSI value of the iBeacon
@return the calculated Accuracy
library/src/main/java/dev/alt236/bluetoothlelib/device/beacon/ibeacon/IBeaconUtils.java