This paper presents a flexible deployment of ultrasonic position sensors and a novel positioning algorithm suitable for the navigation of mobile robots (MRs) in extensive indoor environments. Our proposal uses several independently-referenced local positioning systems (LPS), which means that each one of them operates within its own local reference system. In a typical layout, an indoor extensive area can be covered using just a reduced set of globally-referenced LPS (GRLPS), whose beacon positions are known to the global reference system, while the rest of the space can be covered using locally-referenced LPSs (LRLPS) that can be distributed arbitrarily. The number of LRLPS and their position can be also changed at any moment. The algorithm is composed of several Bayesian filters running in parallel, so that when an MR is under the GRLPS coverage area, its position is updated by a global filter, whereas when the MR is inside the LRLPS area, its position is updated using position increments within a local filter. The navigation algorithm has been tested by simulation and with actual data obtained using a real set of ultrasonic LPSs.