Progress in the direct interpretation of resistivity soundings: an algorithm