In this paper, a novel three-dimensional coordinate positioning algorithm based on factor graph is proposed to improve the measurement accuracy of the indoor global positioning system (iGPS) under large scale conditions. Different from the traditional iGPS positioning algorithm based on the least squares estimation, which has the problems of fixed solution model, low confidence results and poor stability, this proposed algorithm utilized Bayesian filtering to solve the coordinate positioning problem. Aiming at the character of plug and play for iGPS, a factor graph model based on Bayesian network is built, and then a sum product algorithm is used to convert the fixed model into the form of the product of every node, which reduces the independence of measurement information, and improves the confidence of the results. Furthermore, to further improve the positioning accuracy of the algorithm, an idea of maximum posterior estimation is integrated into the proposed algorithm, which enhances the stability of the algorithm at the same time. In order to verify the effectiveness of the proposed algorithm, a series of simulation and prototype tests have been carried out. The results show that compared with the traditional positioning algorithm based on least squares estimation, the accuracy of the proposed algorithm is improved by about 50%, and the positioning accuracy can achieve 0.3mm within a range of 10 meters, which realizes a highprecision measurement under large scale conditions. INDEX TERMS Coordinate positioning, factor graph, least squares estimation, indoor global positioning system, laser scan.