Add code for reading distance to object

Required a foefel factor to get it accurate.