Routing strategy in indoor mobile network was highly related to users' positions, and so an effective indoor location algorithm was needed for the network to provide an efficient routing scheme. Meanwhile, at certain departments, such as police, military and firehouse, indoor location algorithm was an urge. However, because of the influence of the circumstance, the estimated distances between mobile and base stations may deviate from the real ones seriously. In this paper, a relative indoor location and tracking algorithm based on the received powers was introduced. Simulations show that this algorithm can provide an high accuracy.