I guess this is only relevant to 3D printing?
How do you know your gantry is moving in a perfect plane? As I see it you are only measuring the distance between the gantry and the bed not absolute plane