Hi,
You don't have to use the 40-pin 18F45K22. You can use the 28-pin 18F25K22 with very minor changes to the code (CONFIG) or you can use another PIC - as long as it has a TMR1 & TMR2. But, if you want the code to run as-is then 45K22 it is.

If the distance per pulse is not 0.6m then you need to change the 39322 constant. For 0.61m it would be 39977 and for 0.59m it would be 38666 so as I think you can see you should be able to calibrate very accuratly. The final result will always suffer from truncation in the math routines so the display can be short as much as one count (0.6m or whatever distance one pulse equals) - which I don't think matters much.

/Henrik.