Measuring resistance to earth