Hi John,
How about using the O'Rourke's algorithm?
It's much faster and accurate even if an SMI disturbance occurred
during the calibration process.
Reference
O'Rourke, J. (1981). An on-line algorithm for fitting straight lines
between data ranges.
Communications of the ACM, 24, 574-578. doi:10.1145/358746.358758
--