Measured locations of position sensors on a steerable medical device are used to determine the insertion depth of the steerable medical device with respect to a foundation point, which is initialized by an operator. The insertion depth, in turn, is used to determine the state of each segment that has passed the foundation point, i.e., is distal to the foundation point.