A method for estimating and compensating quasistatic errors of machine tools