public static int pressureUnitStringToIndex(String unit) {
       switch (unit) {
            case "hPa": 
                return 0;
            case "kPa":
                return 1;
            case "psi":
                return 2;
            case "bar":
                return 3;
            case "millibar":
                return 4; 
            case "atm":
                return 5; 
            default:
                return 0;
        } 
    }