A Fusion Localization Algorithm with Adaptive Kalman Gain for Port Container Seamless Positioning

BeiDou Navigation Satellite System (BDS) has provided high-precision, reliable positioning, navigation, and timing services anywhere in the world since the end of 2020. However, the positioning performance of BDS does not behave well like the other global navigation satellite systems (GNSS) in the transition areas indoor and outdoor, particularly in container ports, because the navigation signals are blocked and re ﬂ ected by containers. In order to solve the above problem, as the pulse radio ultra-wideband (UWB) has the characteristics of high positioning accuracy, high multipath resolution, large bandwidth, and high communication rate, it is used as the Beidou auxiliary system, and the two are combined. In addition, the positioning algorithm greatly a ﬀ ects BDS/UWB integrated positioning performance. The single Newton iterative least square (LS) positioning algorithm does not take into account the continuity of position in time, leading to disordered positioning results and large positioning errors. For obtaining high positioning accuracy, the Kalman ﬁ lter (KF) is introduced to process the output results of the LS algorithm, and a fusion localization algorithm of the Newton iterative least square and Kalman ﬁ lter (LS-KF) with adaptive Kalman gain is proposed in this paper. The fusion algorithm can solve e ﬀ ectively the problem that the Kalman gain approaches a stable state after multiple observation epochs, resulting in a constant ratio between the predicted and the measured states. Besides, the algorithm can be used to assess the con ﬁ dence of each measurement state, determine the Kalman gain adaptive adjustment factor according to the obtained con ﬁ dence, and further adjust the Kalman gain through the adaptive factor. Theoretical analysis and simulation results show that the proposed algorithm can improve the overall positioning accuracy and anti-interference ability.


Introduction
The BeiDou Satellite Navigation System (BDS) has become the third fully operational international navigation satellite system providing positioning services since 30 BDS-3 satellites were launched in 2020 [1]. Just like other Global Navigation Satellite Systems (GNSS), the BDS is widely used in many fields, such as road engineering, automobile navigation, and many other outdoor applications [2] for positioning and navigation. Besides the outdoor location-based service, there is exuberant demand for indoor positioning. However, the BDS is difficult to position indoors due to signal blockage and reflection, which leads to multipath interference and the difficulty of non-line-of-sight (NLOS) signal reception [3,4]. From a technological point of view, researchers have proposed a wide variety of solutions (WiFi, UWB, Bluetooth, Zigbee, etc.) for indoor positioning in search of improved performance in various application scenarios [5]. In the literature, technologies for indoor positioning have been widely analyzed, classified, applied, and evaluated [6][7][8][9]. It is necessary to investigate how to realize high precision and continuity for seamless positioning in transitional scenarios between outdoors and indoors, such as hospitals, amusement parks, museums, and container terminals (as shown in Figure 1). Through the above analysis, the tightly coupled combination navigation is an effective method for seamless positioning in different scenarios.
Many technologies can provide auxiliary positioning for BDS, and we should select the appropriate auxiliary solution according to specific performance indicators such as the positioning accuracy, range of action, anti-interference ability, and multipath resistance for port containers. The WiFi can be used as an auxiliary system for the BDS positioning system to form a BDS/Wireless Local Area Network (WLAN) co-location system. However, the antiinterference ability of WLAN signals is not suitable for a port container with such interference, and it is generally used as a method of indoor positioning [10][11][12]. A cellular network has the advantage of wide coverage and can be used as an auxiliary system for BDS [13]. However, the positioning accuracy of the cellular network is usually above the m level [14]. For the high-precision positioning requirements of port containers, the positioning accuracy must be below the m level. The Zigbee auxiliary positioning system has the advantages of low cost and low power consumption [15], but the poor stability of the Zigbee signal cannot mean that it cannot be used to assist the BDS system in positioning the port container [16]. Pseudo-satellite is a kind of equipment that is similar to a satellite but built on the ground [17]. It can be used as an enhanced system of GNSS and has good development prospects [18]. Among the many auxiliary methods, IR-UWB performs particularly well [19]. It has strong anti-multipath performance and an ability to penetrate obstacles to realize wireless positioning requirements for users in complex environments [20]. At the same time, due to its wide bandwidth and narrow pulse time with nanosecond time resolution, it is theoretically possible to achieve centimeter-level high-precision positioning [21].
The fusion of GNSS and UWB has been studied by many scholars, but little research has been carried out for positioning algorithms that are specific to high-precision singlepoint positioning requirements such as port containers. The GNSS positioning result can be directly integrated with the UWB positioning result, but this fusion belongs to coarse fusion without the real tight coupling processing of GNSS/ UWB [22][23][24]. Robust Kalman filters can be used to fuse GNSS, UWB, and INS data, using adaptive robust Kalman filtering algorithms to process updated observation equations in tightly coupled GPS/UWB/Inertial Navigation System (INS) integrated positioning equations [25,26]. However, because an INS needs to measure data such as the velocity and acceleration of an object, the addition of INS is not suitable for handling the positioning of stationary objects such as containers [27]. The weighted fusion localization algorithm can be used to solve the comprehensive observation equations for GPS and UWB. However, this method cannot be used to achieve high-precision positioning using weighting [28]. The positioning error of this method is basically above 1 m. The federal Kalman filter algorithm can be used to perform GPS and UWB subsystem data fusion, but the federal Kalman filter algorithm requires a more accurate initial estimation position to achieve convergence [29,30]. A Newton iteration-LS localization algorithm can be used to solve the BDS/UWB comprehensive observation equations. However, because this algorithm does not consider the correlation of the before and after positions, the positioning error of the algorithm is large.
UWB has many advantages in positioning. Therefore, in this paper, UWB pseudolite is used as an auxiliary positioning system for BDS, and the BDS/UWB co-location system is used to realize the positioning of a port container. The Newton iteration-LS positioning algorithm does not require accurate initial position estimation. After several iterations, the user's position can be solved. However, the algorithm has a large error. Therefore, in this paper, the Kalman filter is used to filter the Newton iteration-LS positioning result to obtain a higher precision position. Because our positioning target is a static port container, the covariance for the system noise when building the Kalman model will be much smaller than the covariance of the solution error for the Newton iterative least squares method. This results in a very small value for the Kalman gain after multiple observations of the epoch, which means that each observation vector plays a very low role in the later observation epoch. This will lead to the subsequent observation epoch data being meaningless, and will not reflect the role of the measurement data under the current observation epoch in real-time. This is not the result we want. Therefore, this paper uses the improved Kalman gain adaptive Kalman filter to solve this problem and uses the new Kalman gain adaptive LS-KF positioning algorithm to solve the BDS/UWB comprehensive observation equation.
The rest of this paper is organized as follows. Section 2 mainly introduces the BDS/UWB co-location system, including the UWB base station deployment location and BDS/UWB comprehensive observation equations. A new Kalman gain adaptive LS-KF fusion localization algorithm is proposed in Section 3. Simulation results are discussed in Section 4. Finally, we conclude the paper in Section 5.

Bds/Uwb co-Location System
The frame of the BDS/UWB co-location system used to meet the demand for precise positioning of port containers in this paper is shown in Figure 2. A comprehensive processor is placed on each container which needs to be positioned, the comprehensive processor can receive the BDS signal and parse the received satellite coordinates and pseudoranges carried by the BDS signal and then transmit the information to the data processing center. At the same time, the comprehensive processor on the container can also transmit the UWB signal, and each UWB base station will receive the UWB signal from the port container and parse the distance information. The distance information is then forwarded to the data processing center so that the data processing center receives the positioning information from both the BDS and UWB systems. The data processing center is the core of the  Wireless Communications and Mobile Computing BDS/UWB co-location system which contains the corresponding fusion processing algorithm. To obtain the highprecision position information that we need for the port container, the data processing center will perform a series of processes on the received information, including screening, culling, and fusion and position solving [31].
2.1. Position of the UWB Base Station. In satellite navigation and positioning, there are many methods for assessing the distribution of constellations and estimating the accuracy of positioning. Geometric dilution of precision (GDOP) is one of the more commonly used indicators, which is intuitive and easy to measure. As shown in Figure 3(a), when the satellites are concentrated in one line or on a straight line, the geometrical distribution is poor, and the corre-sponding GDOP is large, which may lead to a large positioning error. In Figure 3(b), the satellites are distributed around the user. In this case, the geometric distribution is better, and the corresponding GDOP value is smaller, which will improve the positioning accuracy accordingly [32]. The accuracy of satellite navigation and positioning can be described by the error of the original observation and the GDOP of the satellite. Improving the geometrical distribution for navigation satellites is the key to improving positioning accuracy under the same accuracy for navigation satellite observations. UWB is an auxiliary satellite position system that minimizes the GDOP of a co-location system by improving the geometric distribution of the satellites, thereby achieving the purpose of improving positioning accuracy. The placement, number, and geometric distribution of UWB base  3 Wireless Communications and Mobile Computing stations have a huge impact on the performance of a BDS/ UWB co-location system. The reasonable placement of the UWB base station can enhance the geometric strength of the satellite navigation system and has a great effect on the reliability, ambiguity accuracy, and positioning accuracy of the BDS/ UWB co-location system. We deploy the UWB base stations according to the principle of minimum GDOP, as shown in Figure 4.
The positioning error for the co-location system will vary with the geometric distribution. If the GDOP for the system can be reduced, the positioning accuracy can be improved. The GDOP can be expressed as follows:  (1) and (2) that GDOP is completely determined by the matrix H. The matrix H contains the unit vectors for the various navigation satellites, so the angle between these unit vectors is related to the GDOP. The GDOP is a composite quantity that represents the influence of the geometric distribution of the navigation satellites on the position and clock. Suppose ðx 0 , y 0 , z 0 Þ is a known point and ðx i , y i , z i Þ is the position of the i-th satellite. The distance between this point and position can be represented as follows: The matrix H in Equation (2)  : ð4Þ The expression for h xi , h yi , and h zi is given in Equation (5): According to the mathematical model shown in the above formula, the GDOP at a certain destination node can be obtained to determine the geometric configuration for a satellite at that time. In this paper, simulation is used to determine to the UWB base station location that gives the smallest GDOP for the BDS/UWB co-location system, which is the best location for the UWB base station [33][34][35].

Comprehensive Observation Equations for BDS/UWB.
The pseudorange observation equation for BDS can be denoted as follows: where n is used to express the n-th BDS satellite; ρ ðnÞ indicates the BDS pseudorange measurement; δt ðnÞ is the satellite clock difference, which can be compensated by correction technology; I ðnÞ is the ionosphere error, which can be compensated by establishing an ionosphere model; T ðnÞ is the troposphere error, which can be compensated by establishing a troposphere model; and ε ðnÞ represents the measurement noise of the receiver and other compensation processing noise types [36,37].
Some of the data in Equation (6) can be calculated by modeling or some other method, so we can define the corrected pseudorange measurement ρ ðnÞ c to be The corrected pseudorange observation equation is Assess the distribution of the constellation GDOP Position of the UWB base station Minimum Figure 4: Layout principle of UWB base station.

Wireless Communications and Mobile Computing
As shown in Figure 5, ρ ðnÞ in Equation (6) is the geometric distance from the receiver to the satellite n: where x = ½x, y, z T is the unknown receiver coordinate vector and x ðnÞ = ½x ðnÞ , y ðnÞ , z ðnÞ T is the position coordinate vector of the n-th BDS satellite. Pseudorange measurement error ε ðnÞ is an error that cannot be compensated. This error will always be carried in the observation equation. We can omit ε ðnÞ from the observation Equation (8): Then, the BDS positioning solution is actually in the process of solving the following nonlinear equations: Each of the equations in Formula (10) corresponds to a pseudorange observation for a visible satellite. In the above nonlinear equations, the position coordinates ðx ðnÞ , y ðnÞ , z ðnÞ Þ for each satellite can be calculated according to their respective forwarded ephemeris. The corrected pseudorange ρ ðnÞ c is measured by the receiver. Therefore, the unknowns in the equations are only the position coordinate ðx, y, zÞ of the receiver and the clock difference δt of the receiver. There are four unknowns in this equation group that need to be solved, so at least four equations are required before the positioning solution can be completed. It is difficult to observe four BDS satellites from a complex environment such as a port container, and it is impossible to solve the problem separately with the BDS system. It is necessary to add the auxiliary observation equation for UWB.
For the UWB positioning subsystem, its positioning principle is similar to that for the UWB pseudo-satellite. Firstly, the layout location for UWB is determined according to the principle of minimum GDOP, and a correction technique of clock difference is needed to correct the clock difference of the UWB pseudo-satellite, and then the observation equation for the UWB subsystem can be established according to the time of arrival (TOA) positioning mode. The propagation of the UWB signal does not involve interference of the troposphere and ionosphere, so the observation equation for the UWB pseudo-satellite can be described as follows [38,39]: where ρ ðjÞ is the pseudorange for the UWB pseudolite and δt ðjÞ is the clock difference for the corrected UWB pseudolite. When UWB and BDS satellites perform integrated positioning together, the UWB measurement is much larger compared to other satellites due to the relatively large clock deviation of UWB. Therefore, before BDS/UWB integrated positioning, the clock offset for UWB must be calculated and then corrected and compensated. Suppose UWB is deployed at a known point ðx ðJÞ , y ðJÞ , z ðJÞ Þ and can receive signals from BDS satellites. Then from UWB to BDS, satellite pseudorange observation ρ ðnÞ UWB−BDS and the BDS satellite clock error δt ðnÞ can obtain the UWB clock error δt ðjÞ . The formula is calculated as follows: In this formula, d ðnÞ UWB−BDS is the distance between the UWB base station and the n-th BDS satellite. After the UWB clock error δt ðjÞ is obtained in this way, it can be corrected and compensated. The UWB and the BDS systems share the same clock after the UWB clock is compensated. The corrected UWB observation equation is given by Satellite n Receiver Z Y X Figure 5: Observation vector pointing from the receiver to the satellite.

Wireless Communications and Mobile Computing
Similarly, we can obtain the observation equations for the UWB pseudolite-assisted positioning system as follows: Therefore, for the observation equation for the UWB pseudolite-assisted positioning system, the unknowns to be solved are the three-dimensional coordinates ðx, y, zÞ of the positioning target and the clock difference δ t of the receiver.
In order to establish the comprehensive observation equations for the BDS/UWB co-location system, we can combine the pseudorange observation equations for the BDS and UWB subsystems, as shown in Formula (15).
The corrected BDS/UWB comprehensive observation equation is derived as follows: The BDS/UWB integrated observation equation is a set of overdetermined nonlinear equations. Its solution mainly involves the use of the improved LS-KF positioning algorithm described below, which will be discussed in detail in the next section.

Kalman Gain Adaptive LS-KF Fusion Localization Algorithm
The data processing center is the core of the BDS/UWB colocation system. Its working principle is shown in Figure 6. The data processing center will receive data from both the BDS subsystem and the UWB subsystem. For the BDS subsystem, the data processing center receives pseudorange information and the respective satellite coordinates. For the UWB subsystem, the data processing center receives the location coordinates from the UWB base station and the ranging information. Firstly, the data processing center performs performance evaluation using the received data and performs processing such as culling, correction, and compensation for the received data and then establishes BDS/UWB comprehensive observation equations by using the method described in the previous section. Next, the comprehensive observation equations are solved by the positioning algorithm embedded in the data processing center. In this way, the data processing center continuously outputs its positioning results for the target positioning point along with the input of the observation information data. The Newton iterative LS algorithm can be used to obtain the solution to the comprehensive observation equations. The advantage of this algorithm is that it does not need to know the initial position. Even if the initial position is set to zero, the solution can be solved after several iterations. The disadvantage is that the solution result is rough, and the correlation between the before and after moments is not correlated. The Kalman filter localization algorithm can also be used to solve the comprehensive observation equations. The advantage of this is that the results from the solution for the front and back time are correlated, and the correlation of the position information can be used to improve the positioning accuracy. Because both the Newton iterative LS positioning algorithm and Kalman filter  The data processing center is the core part of the BDS/ UWB co-location system, and the fusion localization algorithm solving the BDS/UWB integrated observation equations shown in Formula (16) is the core part of the data processing center. The positioning algorithm used in this paper is the Kalman gain adaptive LS-KF fusion localization algorithm. The proposed Kalman gain adaptive LS-KF positioning algorithm used in this paper is shown in Figure 7: (1) Input initialization data to establish the BDS/UWB comprehensive observation equations The improved Kalman gain adaptive LS-KF localization fusion algorithm used in this paper is deduced in detail in the following sections.

Newton Iteration-LS Localization Algorithm
Step 1. Data preparation and setting initial solution.
The preparation of the data in the BDS/UWB co-location system mainly consists of two parts, i.e., the data for the BDS subsystem and the other is the data of the UWB subsystem. For the BDS subsystem, it is necessary to collect the pseudorange ρ ðnÞ for all observable satellites at the same observation time and then calculate the error components in the pseudorange ρ ðnÞ by using the corresponding mathematical model, including I ðnÞ , T ðnÞ , and δt ðnÞ , with these errors compensated, as shown in Equation (7)   The initial solution settings include the initial position estimate x 0 = ½x 0 , y 0 , z 0 T for the target and the initial estimate for the clock difference δt ðnÞ 0 for the receiver. In this paper, the initial estimate for the first position is set to 0. The results can be obtained after several Newton iteration cycles. In non-first-time positioning, the solution for the Kalman gain adaptive LS-KF at the previous moment is used as the initial estimation for the Newton iteration for the subsequent moment (in this way, the number of Newton iterations can be reduced).
Step 2. Linearization of the nonlinear BDS/UWB comprehensive observation equations.  (16)) can be linearized at ½x i−1 , δt i−1 T . Taking the n-th equation in this equation group as an example, one can find the partial derivative of function r ðnÞ to x: As shown in Figure 4, r ðnÞ is the length of the observation vector for satellite n at the user receiver, and ðx ðnÞ − xÞ is the X component of the observation vector. So x ðnÞ − x/r ðnÞ is equal to the unit observation vector 1 In the same way, we can determine the partial derivatives of r ðnÞ to y and z, which are, respectively, equal to the inverse of the Y and Z components of the unit observation vector 1 ðnÞ .
We can obtain the matrix equation after the linearization of Equation (16) In this formula, It can be seen from Equation (19) that the Jacobian matrix G is only related to the geometric position of each satellite and receiver. : ð21Þ −1 x ð1Þðx i−1 Þ represents the value of r ðnÞ to x's partial derivative at x i−1 : Step 3. Solving linear equations.
The task in this step is to solve the linear (Equation (19)). We can obtain the least squares solution for Equation (19) by using the LS algorithm: Step 4. Update the root of the nonlinear equations.

Wireless Communications and Mobile Computing
We can obtain the updated receiver position coordinate x k and clock difference δt k : Step 5. Update the root of the nonlinear equations.
If the Newton iteration has converged to the present precision, the Newton iteration can terminate the loop and output the current iteration calculation result as the coordinate and time solutions for the receiver at the current moment. Otherwise, i is incremented by 1 and returns to Step 2 to repeat the Newton iteration calculation until our convergence threshold is reached out of the Newton iteration loop.

Kalman Gain Adaptive Kalman Filter Algorithm. The
Kalman filter localization algorithm mainly includes two parts: prediction and correction. Its core idea is to reconstruct the state vector of the system by using the latest measured values from the BDS/UWB co-location system, by using the estimated value from the previous moment and the measured value from the current moment for mutual correction to obtain an optimal estimate of the current moment [40]. The optimal estimation of the real-time state is performed by means of "prediction-measurement-correction" to minimize the variance of the state error. Based on the conventional Kalman filter localization algorithm, an adaptive Kalman gain factor α k is introduced in this paper. The adaptive Kalman gain factor is constructed by the residual between the prediction and the measurement, and the Kalman gain K k under each observation epoch is adjusted by the adaptive factor. In this way, the influence of current data can be enhanced, real-time effectiveness can be enhanced, and the correction accuracy for the prediction and measurement data can be enhanced. The Kalman gain adaptive Kalman filter algorithm is established and cascaded with a Newton iteration-LS algorithm, which is the Kalman gain adaptive LS-KF localization algorithm proposed in this paper.
For the Kalman gain adaptive LS-KF positioning algorithm, the LS estimation result for the three-dimensional coordinate x k = ½x k , y k , z k T of the target and the receiver clock error δt k is first obtained; in order to avoid correlation between measurement errors, Kalman filtering is performed in the X, Y, Z directions, respectively.
Step 1. The state valueX − k under the k observation epoch is predicted from the corrected state valueX k−1 and the velocity matrix V k−1 under the k − 1 observation epoch. Because the main object of this study is the positioning problem for a port container, which is mostly in static state, the speed matrix V k−1 can be regarded as 0 in the process [40,41]: where A and B are the state transition Step 2. The error covariance P k−1 under the epoch of k-1 is used to predict the error covariance P − k under the k observation epoch: where Qis the covariance matrix for the system noise.
Step 3. According to the error covariance P − k predicted from the observation epoch k and the covariance matrix R for the measurement noise, the Kalman gain K k under the current observation epoch can be calculated as follows: where a k ð−1 ≤ a k ≤ 1Þ is the adaptive Kalman adjustment factor and C is the state transition matrix, R is the error covariance matrix for the Newton iteration-LS solution.
Step 4. The solution to the Newton iteration-LS localization algorithm is used as the state observation value X k for the Kalman filter system under observation epoch k; using the stateX − k predicted in Step 1, the optimal state valueX k under the current observation epoch is obtained.
Step 5. Update the posterior error covariance and obtain P k to prepare for the next observed epoch to predict the new error covariance P − k+1 : where I is unit matrix.
For port container positioning, most containers are at stationary, therefore, when the Kalman filter is used to filter the Newton iteration-LS solution, the covariance Q for the system noise is much smaller than the Newton iteration-LS solution error covariance R. This results in a very small value for the Kalman gain K k after multiple observations of the epoch, which means that each observation vector plays a very minor role in the later observation epoch. This will lead to the subsequent observation epoch data being meaningless and will not reflect the effect of the measurement data under the current observation epoch in real time. This is not the result we want; moreover, each Kalman gain is present according to the present system noise covariance Q and the solution error covariance R for the Newton iteration-LS, which is not related to the quality of each observation state, which is not conducive to high-precision positioning. We should adjust the Kalman gain appropriately according to the confidence of each observation state; so, we introduce 9 Wireless Communications and Mobile Computing an adaptive Kalman gain adjustment factor α k to solve the above problem. The introduction of such an adaptive factor is shown in Equation (28).
We adopted a method based on residual e k to determine the adaptive Kalman gain adjustment factor α k . The residual between the predicted state and the measured state is shown in the following equation:  : ð31Þ Since we are building a static container positioning model, as the number of observation epochs increases, the confidence of the predicted state gradually increases, which becomes higher than the confidence of the measured state. That is to say, if the residual e k is large, indicating that the confidence of the observation state under the epoch is low, the Kalman gain K k should be reduced to reduce the influence of the measurement state on the optimal estimation. On the other hand, if the residual e k is small and the confidence of the observation state under the epoch is high, the Kalman gain K k should be increased to increase the influence of the measurement state on the optimal estimation. The adaptive factor α k can be used as a variable adjust the Kalman gain K k .
Establishing the corresponding mapping function f ðe k Þ = α k , the value of the residual e k is mapped to the value of the corresponding adaptive factor α k ð−1 ≤ α k ≤ 1Þ. The steps used to establish the mapping function are as follows: Step 1. When performing filtering under the k-th observation epoch, it is necessary to sort the residual e k under the observation epoch and the residual e k , e k−1 , e k−2 , ⋯, e 2 , e 1 under all previous epochs from small to large, and obtain the sort result for e k as order e k .
Step 2. Mapping the sort result order e k of e k to the corresponding percent format: Step 3. Mapping the percentage order e k % to the adaptive.
Kalman gain factor α k ð−1 ≤ α k ≤ 1Þ: Through the above Steps 1-3, the mapping of the residual e k to the adaptive factor α k ð−1 ≤ α k ≤ 1Þ under each observation epoch is completed.
We selected the relevant adjustment data for the adaptive Kalman gain for the 290th to 300th observation epochs in Table 1. As shown in Table 1, when the observation epoch k is larger, the value of the Kalman gain K k is almost maintained at approximately 0.0034 in the locked state. The value for the new Kalman gainK k is gradually adjusted according to the priori pseudorange error e k . When the prior pseudorange error is large, for example, the error reaches 2.3920 m in the 292th observation epoch. At this time, the Kalman gain adaptive adjustment factor α k becomes smaller, and the Kalman gain is adjusted to a smaller value, which will weaken the effect of the large pseudorange error on the positioning error. On the contrary, in the 294th observation epoch, the a priori pseudorange error is 0.2274 m, indicating that the pseudorange error is relatively high. In this case, the Kalman gain adaptive adjustment factor will become larger, and the Kalman gain will be adjusted to a larger value to allow for this relatively accurate pseudorange to fully participate in positioning. The new Kalman gain adaptive adjustment method for positioning will improve the final positioning accuracy. The specific results are detailed in the subsequent simulation analysis.

Position of the UWB Base Station.
In a real-world scenario, BDS satellites are constantly moving with their number changing overtime. This will have a direct impact on the GDOP. The GDOP measurement for multiple observation epochs needs to be performed in the optional UWB deployment area of a port for a period of time (the longer the time, the more accurate the measurement), and the location with the smallest average GDOP is selected as the deployment location for the UWB base station. The research focus of this paper is on the positioning algorithm, so in this part of the simulation experiment that is a little simplified treatment, GDOP data only under an observation epoch are selected to determine the location of the UWB base station.
Whether it is an actual engineering application or a simulation in a thesis, the principle that is used when laying UWB base stations is the principle of minimum GDOP. The port model established in the simulation experiment and analysis is described as follows: a port with a length and width of 100 m and a UWB base station that is set up in a height plane of 35 m above the port. The principle of minimum GDOP is used to select the most suitable UWB base station layout scheme. The UWB base station is deployed in advance around the port, and the deployed UWB base station can also assist in positioning most of the containers in the port. The layout position of the UWB affects the positioning performance of the BDS/UWB co-location system. The minimum GDOP principle is adopted to determine the layout position for UWB. In the simulation, we selected 4 BDS satellites, with the following spatial positions: Here, we assume that satellite D is obscured by the complex environment of the port and cannot function in the BDS positioning system. Therefore, we join the UWB   auxiliary positioning system to the BDS/UWB co-location. The target selected in the simulation is actually the geometric center of the port. It is very unrealistic to deploy a UWB anchor that gives the best positioning performance for a container. However, what we can do is to make the geometric center of the port have the best positioning performance; in this way, the positioning performance for containers the overall port is relatively better. Based on the principle of minimum GDOP, the second and third UWB base stations can also be deployed. In the simulation, we select the position coordinate of the positioning target to be For the selection of the layout position of the UWB base station, we used the minimum GDOP method search within a range of 10000 m2 located 35 m above the target.
The GDOP for a BDS/UWB co-location system with UWB base stations erected at various positions within the range of 10000 m2 above the user is shown in Figure 8.
The horizontal and vertical coordinates in the figure represent the relative positions of the UWB base station in the X and Y direction with the user as the center. Through simulation search, we found that the minimum GDOP was obtained at the relative coordinates (50, − 50); we can hypothesize that the UWB base station is placed at a uniform height of 35 m, so for a Z coordinate of Z = 35, the minimum GDOP is 4.2.
The GDOP affects the performance of the positioning system. Table 2 shows the influence of the GDOP on the positioning performance of the BDS/UWB co-location system. The positioning algorithm we selected here is the Newton iteration-LS positioning algorithm. From the results shown in Table 2, we can find that different UWB layout positions affect the GDOP for the BDS/UWB co-location system and that the GDOP affects the final positioning performance. With increasing of GDOP, the positioning accuracy of the co-location system tends to decrease. When the UWB base station is placed at the position of minimum GDOP, the positioning system can achieve the best positioning performance.

Wireless Communications and Mobile Computing
After determining the layout position for the first UWB base station based on the principle of minimum GDOP, then one can continue to determine the locations for the second and third UWB base stations based on this principle. Figure 9 shows the distribution map for GDOP obtained for different UWB base station placement positions when the second UWB base station is added to perform the observation complement enhancement when the satellite D is invisible due to shadowing. The simulation results show that the minimum GDOP for the BDS3 + UWB2 integrated positioning system is 2.3 and the best position coordinates for the second UWB base station are (− 14, − 6). Table 3 shows the effect of the second UWB base station on the positioning performance of the BDS/UWB integrated positioning system. From the data given in Table 3, we can find that the addition of the second UWB base station will continue to reduce the GDOP for the integrated positioning system and improve the positioning performance. When the second UWB base station is placed at the center coordinates of the station (− 14, − 6), the GDOP for the integrated positioning system reaches a minimum value of 2.3198, and the average positioning error is 1.4829 m. With the increasing in the number of UWB base station deployments, positioning performance will be improved, but in actual engineering applications, it is necessary to find the best balance between positioning performance and UWB deployment costs.

Position Performance Analysis for the Location
Algorithm. In the BDS positioning and BDS/UWB co-location systems, the LS, EKF, LS-KF, improved LS-KF four positioning algorithms are used to simulate the positioning performance. For the BDS satellite, we added a Gaussian white noise sequence with a mean of 0 and a variance of 1 to the compensated pseudorange; for the UWB pseudolite, we added a Gaussian white noise sequence with a mean of 0 and a variance of 0.2 to the pseudorange after compensation. For the separate BDS positioning system, we selected the four A, B, C, and D satellites in the previous section; for the BDS/UWB co-location system, we selected the three A, B, and C satellites in the previous section, and the UWB base station was placed in position where the minimum GDOP for the upper section is searched. Figure 10 shows the results obtained for the performance of the simulation for the BDS and BDS/UWB colocation systems under the LS positioning algorithm. The number of observation epochs is 300. The figure shows the positioning error under each observation epoch and the average positioning error for 300 observation epochs. The average positioning error in the BDS positioning and BDS/UWB co-location systems is found to be 5.87 m and 3.31 m, respectively. That is to say, under the LS positioning algorithm, the BDS/UWB co-location system shows a performance improvement of 43.6% compared to the BDS positioning system. Figure 11 shows the results obtained for the performance of the simulation for the BDS and BDS/UWB co-location systems under the extended Kalman filter (EKF) positioning algorithm. The average positioning error in the BDS  13 Wireless Communications and Mobile Computing positioning and BDS/UWB co-location systems is found to be 1.65 m and 1.18 m, respectively. In other words, under the EKF positioning algorithm, the BDS/UWB co-location system shows a performance improvement of 28.5% compared to the BDS positioning system. Figure 12 shows the results obtained for the performance of the simulation for the BDS and BDS/UWB colocation systems under the LS-KF positioning algorithm. The average positioning error in the BDS positioning and BDS/UWB co-location systems is found to be 0.47 m and 0.29 m, respectively. It means that under the LS-KF positioning algorithm, the BDS/UWB co-location system shows performance improvement of 38.3% compared to the BDS positioning system. Figure 13 shows the results obtained for the performance of the simulation for the BDS and BDS/UWB co-location systems under the improved LS-KF positioning algorithm. The average positioning error in the BDS positioning and BDS/UWB co-location systems is found to be 0.36 m and 0.19 m, respectively. The BDS/UWB co-location system shows a performance improvement of 45.7% compared to the BDS positioning system. In addition, the algorithm can converge the positioning error to below the m level when the epoch is 10 times, which quickly realizes the high precision needed for the positioning of the port container. Figure 14 shows a three-dimensional schematic diagram of the positioning performance. The positioning performance for each system and the corresponding algorithm can be clearly and intuitively observed in Figure 14.  algorithm is better than that of the traditional LS-KF positioning algorithm. Figure 15 shows a qualitative analysis of the positioning performance, while the histogram shown in Figure 14 shows a quantitative comparison of the various systems and positioning algorithms. The positioning performance is more intuitively seen through digital processing. It can be seen from the simulation results that the positioning performance for the BDS/UWB co-location system is much better than that for BDS. This is because the addition of the UWB base station can improve the geometry of the positioning system, and the UWB system has a smaller ranging error, which is more conducive to high-precision positioning. As shown in Figure 15, the Kalman gain adaptive LS-KF positioning algorithm proposed in this paper shows better positioning performance than the previous positioning algorithm. Compared with the LS, EKF, and LS-KF positioning algorithm, the Kalman gain adaptive LS-KF positioning algorithm shows a 94.3%, 83.4%, and 34.4% improvement, respectively. While showing better positioning performance, the complexity of the Kalman gain adaptive LS-KF positioning algorithm is also higher than that for the other positioning algorithms.
For the simulation of anti-burst interference, 20 m burst interference was added to the pseudorange of the first satellite in the 80th, 120th, 160th, 200th, and 240th epoch. This kind of sudden interference can remain in subsequent continuous observation, because the type of interference is sudden interference. In actual engineering applications, the existence of this interference is also random and occurs from time to time. The simulation result is shown in Figure 16. At this time, the average positioning error for the traditional LS-KF was determined to be 0.42 m, while the average positioning error for the Kalman gain adaptive LS-KF algorithm was still 0.19 m. When a sudden big interference occurs, the positioning error for the LS-KF algorithm will obviously increase, but the proposed Kalman gain adaptive LS-KF algorithm will not be affected by such interference. This is because the algorithm will judge the confidence of each measurement state. When the interference occurs, its confidence will be very low. At this time, the algorithm will give up the measurement state value of the epoch so that it will not be affected by the interference.

Conclusion
For achieving high-precision seamless positioning of objects such as containers in the transition areas of indoor and outdoor, we introduce the combination of BDS and UWB in this paper. Aiming at the problem that the Kalman gain in typical cascaded LS-KF localization algorithm gradually tends to be constant after multiple observation epochs, an improved LS-KF localization algorithm with an adaptive Kalman gain is proposed. The adaptive factor can be introduced to adaptively adjust the Kalman gain according to the prediction state and measurement state under each observation epoch. This ensures high-precision positioning in complex environments. The simulation results indicate that the location precision of the proposed algorithm can be up to a meter level after about 10 observation epochs and significantly enhance positioning performance compared to the traditional LS-KF localization algorithm. Moreover, the proposed algorithm can effectively recognize and suppress sudden interference according to the confidence degree of the measurement state, which greatly improves the robustness of the algorithm for port con-tainers and other objects in the transition areas of indoor and outdoor.

Data Availability
The data used to support the findings of this study are included within the article.

Conflicts of Interest
The authors declare that there is no conflict of interests regarding the publication of this paper.