Being an active positioning system, China's Beidou Double-star Positioning System cannot achieve continuous and real-time positioning, and capacity of the system is limited as users consume system resources during positioning. In order to overcome these shortcomings, a passive positioning algorithm is proposed based on three-dimensional grid search. According to a newly defined cost function, as well as the data collected from the two synchronous satellites, atomic clock and altitude gauge carried by a user, passive positioning is fulfilled through the grid search algorithm. The operational area of Beidou system is first divided into some grids. Secondly, the grid with the lowest cost and its eight neighboring grids, i.e. sub-area, is chosen as the next search area. Thirdly, the sub-area is further divided into some sub-grids so as to calculate the cost of each sub-grid and find out the sub-grid with the lowest cost. This process repeats until the positioning accuracy is satisfactory or a predetermined iteration time is reached. At this point, the center of the current search grid is taken as the position of the user. During simulation, a digital map is used to validate the three-dimensional search algorithm. The influence of ionospheric error on positioning accurate is considered. Simulation results show that the method is fast and accurate enough for real-time positioning, and that the number of partition grids greatly affects positioning accuracy and positioning time. It is a possible way to turn the active Beidou Double-star positioning system into a passive one.