public static int tensionUnitStringToIndex(String unit) {
       switch (unit) {
            case "N":
                return 0;
            case "lbf":
                return 1;
            case "kgf": 
                return 2;
            case "daN":
                return 3;
            default:
                return 0;
        } 
    }