calculation of mill settings