Abstract
With the rapid development of science and technology, positioning technology has been widely used in people’s daily lives and related scientific research activities. However, the traditional positioning system mostly uses GPS for positioning, and then transmits the positioning information to the remote server through GPRS / GSM, but it is not applicable in remote mountain areas where some base station signals cannot reach. Moreover, the accuracy of single GPS positioning is difficult to be guaranteed. This paper mainly studies the design of Beidou-GPS dual-mode positioning system based on Android platform mobile communication equipment. First, analyse the composition of the satellite positioning system and design the overall architecture of the Beidou-GPS dual-mode positioning system for mobile communication equipment. Then, it analyses the most important star selection algorithm in dual-mode positioning technology, and proposes an improved star selection algorithm based on azimuth. Second, build the overall architecture of the Android platform for mobile communication devices based on dual-mode positioning. Finally, by comparing with the traditional star selection algorithm, the proposed improved positioning algorithm is experimentally verified. Simulation experiment results show that the proposed dual-mode positioning algorithm has high accuracy and can meet the real-time requirements of the system.
Introduction
The Global Navigation Satellite System (GNSS) is a general term for all satellite navigation systems, including existing and under construction. A satellite navigation system that provides users with all-weather 3D coordinates and speed and time information at any location on the surface of the earth or in near-Earth space. The four most well-known satellite navigation systems in the world, GPS, Beidou, GLONASS and GALILEO, can all be called GNSS [1, 2].
In 1978, the US Department of Défense established Navigation System with Timing and Ranging (NAVSTAR) for military applications, also known as Global Positioning System (GPS). GPS consists of 24 satellites (3 spare satellites). The inclination of the satellite orbital plane is about 55 ° based on the earth’s equatorial plane [3]. The average altitude of the orbit is about 20200 km, and the satellite operation period is 11 hours and 58 minutes. By 1994, it had been launched and put into operation, consisting of 24 GPS satellites, and the global coverage rate reached 98%. In 1995, GPS was officially put into use, and has been widely used in various fields as of now. GPS, which was born for military purposes, has greatly promoted technological progress in various fields [4].
The research of China’s Beidou satellite navigation system began in the 1980 s, and its development route is divided into “three-step” route rules. First, the first step is the test phase of the Beidou satellite navigation system. It is a global Beidou test system built in 1994. Secondly, the second step is to start building a Beidou system with service capabilities covering the Asia-Pacific region in 2004. The third step is to achieve global passive service capabilities by 2020 [5]. At present, the global Beidou navigation system has preliminary functions such as positioning, timing, navigation, and two-way short message communication. Among them, only the Beidou satellite navigation system can communicate short messages. The positioning accuracy reaches 10 meters, covering the entire Asia-Pacific region.
Foreign research on GPS positioning machines has been around since the beginning of the year, and has a history of recent years. After years of development, positioning technology has matured and gradually realized a single system to multi-system leap [6]. At present, the mainstream positioning machine is still using a single system, so the positioning results obtained have problems of low positioning accuracy, lack of integrity, and lack of service availability and continuity. It is difficult to meet all-round application requirements.
The dual mode satellite receiving technology can take advantage of and combine the advantages of multiple satellite navigation systems. Using fusion technology in positioning calculation can effectively improve the positioning accuracy, availability, correctness and reliability of the system. At present, domestic and foreign researchers are mainly focusing on how to improve positioning accuracy and improve positioning results during the calculation process. In the past, most studies have been conducted for GPS, GLONASS and GALILEO. With the rapid development of Beidou satellite navigation system in China How to carry out the multi-mode foot position for Beidou Rice urgently needs people’s attention and exploration [7–9]. Most of the researches on dual-mode positioning at home and abroad are directed to the dual-mode positioning method, which cannot meet the requirements of Beidou dual-mode positioning. The research on Beidou dual-mode positioning system is rarely involved. With the continuous advancement of technical level, the development potential of Beidou positioning system in China cannot be underestimated. Research on Beidou dual-mode positioning is currently in its infancy, and further research is urgently needed.
This paper is devoted to the research of Beidou-GPS dual-mode positioning algorithm, using the star selection algorithm based on the determinant value, and studying the dual-mode solution method of Beidou-GPS dual-mode system. Finally, design a dual-mode positioning system for mobile communication devices based on the Android platform.
The rest of this paper is organized as follows. The second part analyses the general architecture of the satellite positioning system and proposes the overall architecture of the dual-mode positioning system for mobile communication devices based on the Android platform. The third part studies the dual-mode positioning algorithm and the construction architecture of the Android platform. Section 4 presents the simulation results. Finally, the full text is summarized in Section 5.
Research of dual-mode positioning system for mobile devices based on Android platform
Basic principles of satellite positioning and navigation system
The common satellite-based navigation system consists of three independent parts: the satellite space part, the ground monitoring part and the user equipment part. As shown in Fig. 1, first, some space satellites broadcast signals to the ground monitoring part. Then, the ground monitoring part receives the satellite signals, determines the satellite orbit, and then returns the calculated orbit to the satellite. When the satellite transmits a signal to the user, the orbit information is forwarded [10, 11]. Finally, the user part obtains satellite orbit information from the signal based on receiving the visible satellite signal, and then determines the user receiver’s own space position.

The common satellite-based navigation system.
After receiving the visible satellite signal through the antenna, the user-receiving end performs data processing on the received signal to calculate the transmission time of each satellite signal accurately. Then it subtracts the signal reception time it displays from the measured signal transmission time and then multiplies it by the speed of light to obtain the spatial distance between the user end and the satellite end [12]. Not only that, the receiver also obtains the space orbit information of the corresponding satellite in the navigation message broadcast by the visible satellite, and calculates the current satellite position accordingly. If the space coordinate of the observation satellite n in a rectangular coordinate system is (x(n), y(n), z(n)), and the distance between the user and the observation satellite obtained by measurement is, we can obtain the following equation:
Among them, (x, y, z) is the coordinate information of the user’s location in the same coordinate system. If the receiver has measured values for three visible satellites, then the receiver can separately list the same equation as the above formula, and then solve an unknown number from this equation. At the same time, because the satellite clock is not synchronized with the user receiver clock, the receiver needs to have the measured values of four satellites, and then a simultaneous equation can be solved, and the clock difference with the receiver is unknown. This is the positioning of the navigation system.
Many developers of positioning systems design user interaction functions on positioning terminals, that is, mobile communication devices. In fact, even if the functions of the smart device are designed to be extremely simple and easy to use, it cannot be ruled out that the mobile device is damaged [13]. Therefore, this paper believes that the positioning terminal of the positioning system is mainly responsible for being carried and completing the positioning task and it is worth studying the improvement of the positioning algorithm accuracy. Moreover, it is necessary to design the function of the application or server.
The main function of the mobile communication device positioning system based on the Android platform of Beidou navigation and GPS navigation dual mode navigation is to use the global satellite positioning system to lock the geographic location of the mobile device, and the location information will be uploaded to the server and mobile communication device in real time. The specific requirements are as follows.
First, a handheld positioning terminal is needed. When going out, the mobile terminal can be carried on the body. The basic function of the positioning terminal is to receive satellite signals and transmit positioning information to the server. Secondly, a server needs to be built to store user information, positioning information, etc. The positioning information of the handheld positioning terminal is not directly transmitted to the application program used by the mobile terminal, but is first uploaded to the server. The application program of the mobile communication device requests access to the cloud server through the network to obtain positioning information, which is beneficial to information storage and management. Finally, the smartphone terminal in use requires an Android application that can be bound to a handheld positioning terminal device to obtain its positioning information and display the positioning information in the form of map markers. At the same time, it has the functions of drawing the historical track of the map and electronic fence according to the historical information.
As shown in Fig. 2, the communication mobile equipment adopts Beidou-GPS dual-mode positioning module to receive positioning satellite signals and solve the latitude and longitude information. The latitude and longitude information are uploaded to the cloud server through the GPRS technology through the GSM / GPRS module and stored in the corresponding database (this article uses MySQL as the database management system). The Android application used uses the network to send network requests to the server and retrieve data from the server database. Since the server database stores the latitude and longitude information of each period, the Android application can also draw historical motion trajectory accordingly.

Overall design block diagram of dual-mode positioning system.
Relevant principles of dual-mode positioning technology
Dual-mode navigation and positioning generally refers to navigation and positioning by using two different satellites. Generally, GPS-Beidou, GPS-GLONASS, or GPS-Galileo satellite data can be combined to perform positioning and calculation. As for the selection method of the positioning result, two methods of positioning result fusion or pseudo range fusion can be used, as shown in Fig. 3.

Schematic diagram of dual-mode navigation positioning solution.
The method of fusion of positioning results requires that the number of single-mode satellites should be kept at more than four. After successful positioning, the positioning results are fused using a weighted method [14]. The fusion results are used as the final dual-mode positioning results for navigation and positioning. Using result fusion can effectively select different types of navigation satellites and working frequency bands according to the needs. The working mode is simple and the calculation amount is small.
In this paper, pseudo-range fusion method is used for dual-mode positioning. Although the basic principles of pseudo range positioning of GPS and Beidou navigation system are the same, the coordinate system and time system used by the two are different. The Beidou navigation system’s time system (BDT) is the same as GPST’s atomic time system [15]. The difference is that the clock origin is different. The difference between BDT and GPST can be defined as:
In Beidou-GPS dual mode positioning, the system time difference needs to be solved as an unknown quantity. Using this method can reduce the positioning accuracy deviation caused by the time replacement error and calculate the system time difference more accurately. However, this method needs to solve an unknown number [16, 17]. The previous 4-star positioning is not enough to complete the positioning. At least 5 satellites are needed to solve the positioning coordinates. The pseudo range equation of Beidou-GPS dual mode positioning can be written as:
In the formula, (x r , y r , z r ) represents the position coordinates of the receiver, the left side of the equation is the pseudo range of the Beidou satellite and the GPS satellite, and Δt Br and Δt Gr represent the clock difference between the Beidou navigation system and the GPS to the receiver. (x Bxi , y Byi , z Bzi ) (i = 1, 2) represents the coordinate position of the i-th Beidou satellite, and (x Gxj , y Gyj , z Gzj ) (j = 1, 2, 3) represents the coordinate position of the j-th GPS satellite.
In the satellite navigation and positioning system, the value of geometric dilution of precision (GDOP) is an important parameter that characterizes the accuracy of the navigation and positioning system, and is closely related to the distribution of the selected constellation. A lower value indicates the positioning accuracy higher navigation system; this is an important parameter to measure the merits of the star selection algorithm. For the Beidou dual-mode navigation and positioning system, the number of satellites can be seen at the same time. Compared with the single system, the maximum number of satellites rises to nearly more than one. The increase in satellite signal observations makes the dual-mode positioning system’s positioning accuracy; integrity, availability and other performance have a big leap. Nevertheless, at the same time, the huge amount of observation redundancy has increased the number of system operations in the observation process by dozens of times [18]. Therefore, in order to ensure the real-time processing capability of the receiver, it is particularly important to select a satellite with a suitable spatial distribution compared to single-system positioning.
We can generally use the following method to determine which satellite geometric distribution has a smaller GDOP value [19]. Assuming that a unit distance, then each satellite and receiver separate each visible satellite and the user receiver can be used as a vertex to form a polyhedral cone with unit side length with the receiver as the top of the cone:
Where V is the volume of the polyhedron enclosed by the end of the unit vector from the user to the satellite. It can be seen from the formula that the geometric accuracy factor decreases with the increase of the volume of the polyhedron, although it also changes, but the overall trend is still mainly reduced. This shows that the value of the satellite constellation is closely related to the azimuth and azimuth [20, 21]. This paper mainly selects the satellite constellation through the distribution law of altitude angle and azimuth angle, and finally obtains a group of sub-optimal constellation combinations. However, the real-time performance of the system and the amount of calculation has been greatly improved, effectively reducing the amount of calculation required for positioning.
The basic principle of the improved star selection algorithm is shown in Fig. 4. The basic principle of the star selection algorithm used in this article is to exclude some duplication through analysis, and the method of obtaining the five stars with the best geometric distribution by the satellites with close position coordinates. The optimal geometric distribution reflects that a satellite with a larger elevation angle close to the zenith position of the receiver is selected as the zenith star, and other visible satellites evenly distributed around the geometric circle with a low elevation angle are selected. The values generated by these satellite solutions are relatively small and are close to the optimal constellation, which is called the local optimal constellation.

The Network design of Multi-core agricultural IoT.
At the same time, using the difference in Beidou and satellite ranging accuracy, when the satellite positions are very close, the satellite with the better position is selected to take advantage of the positioning of the combined system.
The first step in selecting a star is to calculate the altitude and azimuth of all visible stars [22]. Then obtain the base star which is composed of the selected constellation combination, set the obscuration angle to 5 °, divide all the received visible observation satellites into two groups, the height angle from 5 ° to 45 ° is a group R h , and the height angle is 45 ° to 90 °. R l is a group, which is a high-elevation group and a low-elevation group. Sort in the high-elevation group, and select the one with the highest elevation angle EL m to form the top star of the selected constellation.
In group R
l
with low elevation angle, the azimuth angle is sorted.
The two stars with the smallest azimuth difference are selected. Because their positions are very close, it can be approximated that they play a very similar role in the constellation composition. Therefore, the retained star can maintain the role of one of the removed stars in the constellation. Comparing its height angles, remove a satellite with a higher height angle and keep a satellite with a lower height angle to obtain the constellation combination with the best geometric distribution [23]. The comparison of azimuth angles is repeated until the number of effective satellites in the system is four, and the loop is ended. At this time, after the elimination, the uniform distribution of the base stars can be satisfied, and the local optimal constellation distribution satisfying the optimal geometric distribution is completed. Finally, all the selected sub-optimal satellite numbers are obtained, and indirect star selection is achieved. The specific flow chart of the star selection algorithm is shown in Fig. 5.

The specific flow chart of the star selection algorithm.
Android is an open source smart mobile terminal operating system. The first Android smartphone was released in October 2008. Since then, not only on smartphones, Android’s applications on tablets, smart TVs, and smart watches have gradually become popular. In the field of Internet of Things, client management applications are also written in Android [24, 25]. This article uses the Android system as a platform to write applications precisely because of its high popularity and high degree of freedom. As shown in Fig. 6, the architecture of the Android system platform is divided into four layers: application, application framework and components, development library, and Linux kernel.

The number of multi-core agricultural IoT nodes for test.
The dual-mode positioning Android development design proposed in this article is based on the above Android architecture, which mainly includes three aspects. 1) View layer): Android uses mark-up languages such as XML to write layout, provides resource ID to facilitate code invocation, and decouples from code that implements business logic. The view layer can be regarded as an interactive interface, and the user’s operation information is transmitted to the Controller through this layer. 2) Control layer: The control layer mainly has two functions, one is to update the background data (addition, deletion, modification, and other operations) based on user operation information, and the other is to refresh the corresponding interactive interface (view layer). For example, the Activity class in Android programming, its most commonly used Button object can respond to user click events and perform operations on the Model. 3) Model layer: Model mainly represents the network-programming, database, local data persistence and other parts in Android development, which can be regarded as the background part of the application, such as Share Preference and HTTP Client in Android.
Analysis of the number of visible satellites in dual-mode positioning system
According to the proposed improved star selection algorithm, it is known that the number of satellites will have a greater impact on the positioning accuracy. In this section, a statistical analysis of the number of satellites visible within 24 hours is performed. Figure 7 shows the Beidou received by the Beidou-GPS dual-mode receiver within 24 hours of operation. In addition, the schematic diagram of the number of GPS visible satellites. The Fig. 7 shows the change of the number of visible satellites in Beidou and GPS satellite navigation system during the data collection time. The sampling period is collected and counted in 4 hours.

Beidou-GPS dual constellation visible satellites.
It can be seen from the above data that Beidou and GPS can maintain the number of more than 7 visible satellites at any time, and the minimum number of visible stars in the dual-mode navigation and positioning system remains at least 15. At the same time, the dual-mode navigation and positioning system can see that the satellite is nearly doubled compared to the single system. Under this condition, the dual-mode navigation system can choose a more appropriate constellation distribution to complete the work of solving the system’s positioning results, to achieve higher positioning accuracy.
At the same time, sufficient visible satellites not only ensure the stability of the continuous operation of the system, especially under extremely harsh conditions, the single system visible satellite is insufficient. The Beidou-GPS dual-mode satellite navigation system can still obtain satellite information of more than five satellites in a combined way to meet the requirements of positioning, greatly increasing the continuity and reliability of positioning.
In order to verify the superiority of the improved star selection algorithm, this paper uses the improved star selection algorithm and the optimal value method under the same hardware conditions to compare the time spent in selecting the constellation satellites required for positioning among the specified number of visible satellites. In order to verify the superiority of the improved star selection algorithm, this paper uses the improved star selection algorithm and the optimal value method under the same hardware conditions to compare the time spent in selecting the constellation satellites required for positioning among the specified number of visible satellites. The comparison results are shown in Fig. 8. The proposed improved star selection algorithm for dual-mode positioning system is compared in terms of computational efficiency. It is especially important to note that the units used in the vertical coordinate of the left and right comparison charts are different.

The loss compensation of multi-core agricultural IoT.
As shown in Fig. 8, although the star selection time of the Beidou-GPS dual-mode positioning algorithm is generally longer than that of the GPS single system, the star selection time is not much different, and the improved star selection algorithm grows more slowly with the increase in the number of visible satellites than the traditional optimal GDOP value. Under the condition of a low number of visible stars, the improved star selection algorithm. The algorithm is very close to the traditional optimal GDOP value method, and the improved star selection algorithm is not very obvious in real-time performance. However, in the case of a large number of visible satellites, taking 20 as an example, the calculation time of traditional optimal GDOP value method has reached 2.6 s, which has a serious impact on real-time. The improved star selection algorithm is still maintained at the level of 0.0025 s, and the optimization effect in real-time is obvious.
The optimal GDOP value method mainly uses all constellation combinations that are suitable for history. During the star selection process, a large number of matrix multiplications and inverse calculations are required, so the time complexity increases faster with the increase in the number of visible stars. The improved star selection algorithm mainly selects satellites by calculating the relationship between satellite height angle and azimuth angle. The calculation complexity is low, so it will not change much as the number of visible stars increases. Therefore, under the premise that the number of visible stars is sufficient, the use of an improved star selection algorithm can greatly reduce the time spent in star selection, thereby ensuring the real-time performance of the positioning and navigation system in positioning solution.
In order to more effectively analyse and compare Beidou single system with Beidou-GPS dual-mode positioning system, and improved star selection algorithm with optimal GDOP value method. Figures 9 and 10 show the comparison of the approximate true values obtained through long-term observations given by the various positioning methods at the time of data collection, thus obtaining their deviation values in the three coordinate directions of x, y, and z for further Compare and evaluate its positioning accuracy and other indicators.

Comparison of deviation between dual-mode algorithm and Beidou positioning algorithm.

Comparison of positioning deviation between improved star selection algorithm and optimal GDOP value algorithm.
It can be seen from Fig. 9 that the positioning deviation values of the dual-mode navigation positioning system on the x, y, and z coordinate axes are better than those of the Beidou single system positioning. Among them, the x and y axis optimization effects are more obvious, which is significantly higher than the Beidou single system positioning, which further reflects the advantages of multi-constellation dual-mode navigation positioning in terms of positioning accuracy relative to single system positioning.
s can be seen from Fig. 10, since the improved star selection algorithm is very close to the optimal GDOP value method in positioning accuracy, the gap in the positioning deviation values on the x, y, and z axes is maintained below 0.3, which further reflects the improved type The star selection algorithm greatly improves the efficiency of star selection. The positioning result obtained by the combined constellation solution obtained by the improved star selection algorithm is very close to the positioning result obtained by the optimal GDOP value method in the x, y and z axes. The feasibility of the improved star selection algorithm in multi-system positioning solution is fully verified.
With the current research on multi-mode systems and changes in development trends, a simple GPS positioning system cannot meet the requirements for positioning accuracy and positioning speed. Moreover, the research on positioning devices is also worthy of attention. With the advent of the intelligent era, the Android development platform has sprung up and become the only platform for mobile communication device development. Therefore, in view of the different characteristics of Beidou satellite navigation system and GPS, this paper fuses the two systems and discusses the combination of Beidou and the system to achieve a more stable and reliable positioning by improving the star selection algorithm and ensuring a certain positioning accuracy. The method complements each other’s functions and adds information to each other. While ensuring the positioning accuracy, it is developed in a deeper and broader direction. At the same time, the development framework of dual-mode positioning system for mobile communication devices based on the Android platform is also proposed.
