Accurate altimetry is essential for location-based services in commercial and industrial applications. However, current altimetry methods only provide low-accuracy measurements, particularly in multistorey buildings with irregular structures, such as hollow areas found in various industrial and commercial sites. This paper innovatively proposes a tightly coupled indoor altimetry system that utilizes floor identification to improve height measurement accuracy. The system includes two optimized algorithms that improve floor identification accuracy through activity detection and address the problem of difficult convergence ofz-axis coordinates due to indoor coplanarity by applying constraints to iterative least squares (ILS). Two experiments were conducted in a teaching building and a laboratory, including an irregular environment with a hollow area. The results show that our proposed method for identifying floors based on activity detection outperforms other methods. In dynamic experiments, our method effectively eliminates repeated transformations during the up- and downstairs process, and in static experiments, it minimizes the impact of barometric drift. Furthermore, our proposed altimetry method based on constrained ILS achieves significantly improved positioning accuracy compared to ILS, 1D-CNN, and WC. Specifically, in the teaching building, our method achieves improvements of 0.84 m, 0.288 m, and 0.248 m, respectively, while in the laboratory, the improvements are 2.607 m, 0.696 m, and 0.625 m.