Indoor-outdoor seamless positioning switching method and apparatus

By combining multi-source positioning data with the HMM model and adaptive Kalman filtering method, the problem of uneven indoor-outdoor positioning handover was solved, achieving a smooth transfer of power between GNSS and UWB data and improving the user experience of indoor-outdoor handover.

CN122449567APending Publication Date: 2026-07-24WUHAN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610574404.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-28
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing indoor/outdoor positioning switching methods frequently switch in critical areas, resulting in uneven positioning results and an inability to achieve truly seamless switching, leading to a poor user experience.

Method used

By combining multi-source positioning data with the HMM model and adaptive Kalman filtering method, and by acquiring NLOS probability and indoor probability, a smooth transfer of power between GNSS and UWB data is achieved, the reliability of UWB is dynamically adjusted, and seamless indoor and outdoor positioning switching is performed.

Benefits of technology

It achieves a smooth handover of power when switching between GNSS and UWB data in indoor and outdoor environments, avoiding jumps in positioning results and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122449567A_ABST
    Figure CN122449567A_ABST
Patent Text Reader

Abstract

The application discloses an indoor and outdoor seamless positioning switching method and equipment, and belongs to the technical field of positioning. The method comprises the following steps: adopting an adaptive Kalman filtering method to realize indoor and outdoor seamless positioning switching; the adaptive Kalman filtering method comprises the following steps: first, acquiring a first state vector and a first error covariance matrix at a k moment according to IMU data at the k moment; second, performing first updating on the first state vector and the first error covariance matrix based on GNSS data at the k moment; and third, performing second updating on the first state vector and the first error covariance matrix based on UWB data at the k moment, so as to obtain a positioning result at a k+1 moment. In the first updating, the observation noise covariance of GNSS is calculated based on an indoor probability, and in the second updating, the observation noise covariance of UWB is calculated based on an NLOS probability and the indoor probability. The method can realize smooth indoor and outdoor seamless switching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of positioning technology, and in particular to a method and equipment for seamless indoor and outdoor positioning switching. Background Technology

[0002] Currently, commonly used positioning sources include GNSS (Global Navigation Satellite System), UWB (Ultra-Wideband), and inertial navigation systems. GNSS data is suitable for high-precision positioning in open outdoor environments, while UWB data is suitable for high-precision positioning in indoor environments. Inertial navigation systems measure the three-axis acceleration and three-axis angular velocity of a vehicle and perform integration calculations to autonomously and at high frequencies (usually above 100Hz) calculate the vehicle's position, velocity, and attitude. However, a fatal flaw of inertial navigation systems is that navigation errors accumulate rapidly over time. Errors inherent in the IMU sensor itself, such as bias instability, angular / velocity random walk, and scale factor error, are amplified after integration, causing the position error to increase quadratically or cubically over time. Without external information for correction, errors of hundreds of meters can accumulate within minutes, making it unsuitable for long-term positioning alone.

[0003] Based on the characteristics of different positioning sources, related technologies typically keep inertial navigation enabled during navigation and positioning. Outdoors, GNSS positioning is used to correct the inertial navigation results, while indoors, UWB positioning is used to correct the inertial navigation results. This involves switching between indoor and outdoor positioning sources.

[0004] Traditional indoor-outdoor handover methods mostly rely on simple threshold judgments of GNSS signal strength or the number of available satellites. This "hard-switching" logic performs extremely poorly in critical indoor-outdoor areas (such as building entrances, windowsills, and semi-open corridors). The system frequently and abruptly switches between GNSS and UWB positioning modes, causing the positioning results to "jump" back and forth between the two coordinate systems, resulting in a very poor user experience. Furthermore, the lag in environmental judgment can lead to the system switching to indoor mode only after being indoors for a considerable period, or vice versa. Therefore, the indoor-outdoor handover methods in related technologies are not actually smooth enough and cannot achieve truly seamless indoor-outdoor positioning handover. Summary of the Invention

[0005] This invention provides a method and equipment for seamless indoor / outdoor positioning switching, enabling smooth and seamless switching between indoor and outdoor environments. The technical solution includes at least the following components: In a first aspect, a method for seamless indoor-outdoor positioning switching is provided, comprising: acquiring multi-source positioning data from a positioning terminal, wherein the multi-source positioning data includes GNSS data, IMU data, UWB data, and raw sampled data of the channel impulse response corresponding to each UWB ranging; acquiring the NLOS probability based on the raw sampled data; acquiring the indoor probability using an HMM model based on the multi-source positioning data; and achieving seamless indoor-outdoor positioning switching using an adaptive Kalman filter method based on the multi-source positioning data; wherein, in the k-th filtering cycle, when GNSS data and UWB data are acquired, the adaptive Kalman filter method... The Mann filtering method includes: firstly, obtaining the first state vector and the first error covariance matrix at time k based on the IMU data at time k; then, updating the first state vector and the first error covariance matrix for the first time based on the GNSS data at time k; and finally, updating the first state vector and the first error covariance matrix for the second time based on the UWB data at time k to obtain the positioning result at time k+1. In the first update, the observation noise covariance of GNSS is calculated based on the indoor probability; in the second update, the observation noise covariance of UWB is calculated based on the NLOS probability and the indoor probability.

[0006] Optionally, the first update includes: determining the adaptive measurement noise of the i-th satellite at time k based on the carrier-to-noise ratio of the i-th satellite in the GNSS data at time k; calculating the observation noise covariance matrix of the GNSS at time k based on the adaptive measurement noise of each satellite at time k and the indoor probability; calculating the first Kalman gain in the first update based on the observation noise covariance matrix of the GNSS at time k; and updating the first state vector and the first error covariance matrix based on the first Kalman gain to obtain the second state vector and the second error covariance matrix.

[0007] Optionally, the adaptive measurement noise of the i-th satellite at time k is expressed by the following formula:

[0008] in, For the adaptive measurement noise of the i-th satellite, The pseudorange variance under the reference condition. Let be the elevation angle of the i-th satellite. Let i be the carrier-to-noise ratio of the i-th measurement. For reference carrier-to-noise ratio; In the GNSS observation noise covariance matrix at time k, the observation noise covariance corresponding to the i-th satellite is expressed by the following formula:

[0009] in, Let be the observation noise covariance matrix of GNSS at time k, representing the observation noise covariance of the i-th satellite. The indoor probability is... This is the scaling function.

[0010] Optionally, the NLOS probability includes the NLOS probability of each UWB base station, and the second update includes: determining the adaptive measurement noise of the j-th UWB base station based on the NLOS probability of the j-th UWB base station in the UWB data at time k; calculating the observation noise covariance matrix of the UWB at time k based on the adaptive measurement noise of each UWB base station at time k and the indoor probability; calculating the second Kalman gain in the second update based on the observation noise covariance matrix of the UWB at time k, and updating the second state vector and the second error covariance matrix based on the second Kalman gain to obtain a third state vector and a third error covariance matrix, wherein the third state vector and the third error covariance matrix are the prediction output of the adaptive Kalman filtering method at time k.

[0011] Optionally, the adaptive measurement noise of the j-th UWB base station is expressed by the following formula:

[0012] in, The adaptive measurement noise for the j-th UWB base station, The measurement variance of UWB under LOS conditions. The penalty coefficient is... Let be the NLOS probability of the j-th UWB base station in the UWB data at time k; In the observation noise covariance matrix of UWB at time k, the observation noise covariance corresponding to the j-th UWB base station is expressed by the following formula:

[0013] in, Let be the observation noise covariance matrix of the UWB at time k, corresponding to the observation noise covariance of the j-th UWB base station. The indoor probability is... This is the scaling function.

[0014] Optionally, obtaining the NLOS probability based on the original sampled data includes: extracting channel impulse response features from the original sampled data, the channel impulse response features including the energy ratio of the first path to the maximum path, the energy ratio of the first path to the total energy, the root mean square delay spread, and kurtosis; inputting the channel impulse response features and the original sampled data into an NLOS prediction model to obtain the NLOS probability; wherein, the NLOS prediction model is a dual-channel neural network, the dual-channel neural network including a first channel, a second channel, and a fully connected layer, the first channel and the second channel being connected to the fully connected layer respectively, the original sampled data being input into the first channel for encoding to obtain a first encoded feature, the channel impulse response features being input into the second channel for encoding to obtain a second encoded feature, the first encoded feature and the second encoded feature being concatenated and input into the fully connected layer to obtain the NLOS probability output by the NLOS prediction model.

[0015] Secondly, a seamless indoor / outdoor positioning switching device is also provided, comprising: a positioning data acquisition module for acquiring multi-source positioning data from a positioning terminal, the multi-source positioning data including GNSS data, IMU data, UWB data, and raw sampled data of the channel impulse response corresponding to each UWB ranging; an NLOS probability acquisition module for acquiring the NLOS probability based on the raw sampled data; an indoor probability acquisition module for acquiring the indoor probability using an HMM model based on the multi-source positioning data; and a positioning switching module for achieving seamless indoor / outdoor positioning switching using an adaptive Kalman filter method based on the multi-source positioning data; wherein, within the k-th filtering cycle, after acquiring... In the case of GNSS and UWB data, the adaptive Kalman filtering method includes: firstly, obtaining the first state vector and the first error covariance matrix at time k based on the IMU data at time k; then, updating the first state vector and the first error covariance matrix for the first time based on the GNSS data at time k; and finally, updating the first state vector and the first error covariance matrix for the second time based on the UWB data at time k to obtain the positioning result at time k+1. In the first update, the observation noise covariance of GNSS is calculated based on the indoor probability; in the second update, the observation noise covariance of UWB is calculated based on the NLOS probability and the indoor probability.

[0016] Optionally, the positioning switching module is further configured to determine the adaptive measurement noise of the i-th satellite at time k based on the carrier-to-noise ratio of the i-th satellite in the GNSS data at time k; calculate the observation noise covariance matrix of the GNSS at time k based on the adaptive measurement noise of each satellite at time k and the indoor probability; calculate the first Kalman gain in the first update based on the observation noise covariance matrix of the GNSS at time k; and update the first state vector and the first error covariance matrix based on the first Kalman gain to obtain the second state vector and the second error covariance matrix.

[0017] Optionally, in the positioning switching module, the adaptive measurement noise of the i-th satellite at time k is expressed by the following formula:

[0018] in, For the adaptive measurement noise of the i-th satellite, The pseudorange variance under the reference condition. Let be the elevation angle of the i-th satellite. Let i be the carrier-to-noise ratio of the i-th measurement. For reference carrier-to-noise ratio; In the GNSS observation noise covariance matrix at time k, the observation noise covariance corresponding to the i-th satellite is expressed by the following formula:

[0019] in, Let be the observation noise covariance matrix of GNSS at time k, representing the observation noise covariance of the i-th satellite. The indoor probability is... This is the scaling function.

[0020] Optionally, the positioning switching module is further configured to determine the adaptive measurement noise of the j-th UWB base station based on the NLOS probability of the j-th UWB base station in the UWB data at time k; calculate the observation noise covariance matrix of the UWB at time k based on the adaptive measurement noise of each UWB base station at time k and the indoor probability; calculate the second Kalman gain in the second update based on the observation noise covariance matrix of the UWB at time k, and update the second state vector and the second error covariance matrix based on the second Kalman gain to obtain the third state vector and the third error covariance matrix, wherein the third state vector and the third error covariance matrix are the prediction output of the adaptive Kalman filtering method at time k.

[0021] Optionally, in the positioning handover module, the adaptive measurement noise of the j-th UWB base station is expressed by the following formula:

[0022] in, The adaptive measurement noise for the j-th UWB base station, The measurement variance of UWB under LOS conditions. The penalty coefficient is... Let be the NLOS probability of the j-th UWB base station in the UWB data at time k; In the observation noise covariance matrix of UWB at time k, the observation noise covariance corresponding to the j-th UWB base station is expressed by the following formula:

[0023] in, Let be the observation noise covariance matrix of the UWB at time k, corresponding to the observation noise covariance of the j-th UWB base station. The indoor probability is... This is the scaling function.

[0024] Optionally, the NLOS probability acquisition module is further configured to extract channel impulse response features from the original sampled data. The channel impulse response features include the energy ratio of the first path to the maximum path, the energy ratio of the first path to the total energy, the root mean square delay spread, and kurtosis. The channel impulse response features and the original sampled data are input into an NLOS prediction model to obtain the NLOS probability. The NLOS prediction model is a dual-channel neural network, which includes a first channel, a second channel, and a fully connected layer. The first channel and the second channel are respectively connected to the fully connected layer. The original sampled data is input to the first channel for encoding to obtain a first encoded feature. The channel impulse response features are input to the second channel for encoding to obtain a second encoded feature. The first encoded feature and the second encoded feature are concatenated and input into the fully connected layer to obtain the NLOS probability output by the NLOS prediction model.

[0025] Thirdly, a computer device is also provided, comprising: a memory and a processor, wherein the memory stores at least one computer program, the at least one computer program being loaded and executed by the processor to perform the indoor-outdoor seamless positioning switching method described in the above embodiments.

[0026] Fourthly, a computer-readable storage medium is also provided, wherein at least one computer program is stored in the computer-readable storage medium, the at least one computer program being loaded and executed by a processor to perform the indoor-outdoor seamless positioning switching method described in the above embodiments.

[0027] Fifthly, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the method described in the first aspect.

[0028] The beneficial effects of the technical solution provided by this invention include at least the following: (1) GNSS data (approximately) The m) and UWB data (on the order of approximately 1 to 50 m) are processed in their respective independent observation equations and matrices, so there is no problem of mixing of different source dimensions.

[0029] (2) When a location data source is completely unavailable (such as indoor GNSS satellite loss), the update steps of that source can be skipped directly without any special missing value handling logic.

[0030] (3) Two sequential updates are mathematically equivalent to one joint update within the linearization error range, without losing any information.

[0031] (4) The observation noise covariance matrix of GNSS and UWB data is scaled using system-level indoor probabilities (provided by HMM) to achieve a smooth power transfer between GNSS and UWB; and measurement-level NLOS probabilities are used to perform fine reputation rating for each ranging measurement within UWB. In this way, a smooth power transfer between GNSS and UWB can be achieved based on indoor probabilities when switching between indoor and outdoor environments, and the credibility of UWB can be dynamically adjusted according to whether it is currently in NLOS state, thereby achieving seamless indoor and outdoor positioning. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in this embodiment, the accompanying drawings used in the description of the embodiment will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 A flowchart of an exemplary embodiment of the present invention for a seamless indoor / outdoor positioning switching method is shown. Figure 2 This is a hierarchical architecture diagram of the seamless indoor / outdoor positioning switching method; Figure 3 This is a schematic diagram of the NLOS prediction model; Figure 4 This is a flowchart illustrating the adaptive Kalman filtering method. Figure 5 This is a schematic diagram illustrating seamless indoor / outdoor positioning switching; Figure 6This diagram illustrates the structure of an indoor / outdoor seamless positioning switching device provided in an exemplary embodiment of the present invention. Figure 7 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of the present invention. Detailed Implementation

[0034] Unless otherwise defined, the technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention pertains. The terms “first,” “second,” “third,” and similar terms used in this patent application specification and claims do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Similarly, the terms “an” or “a” and similar terms do not indicate a quantity limitation, but rather indicate the presence of at least one. The terms “comprising” or “including” and similar terms mean that the elements or objects preceding “comprising” or “including” encompass the elements or objects listed following “comprising” or “including” and their equivalents, and do not exclude other elements or objects. The terms “connected” or “linked” and similar terms are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.

[0035] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.

[0036] Example 1.

[0037] Figure 1 A flowchart of an exemplary embodiment of the present invention is shown, illustrating a method for seamless indoor / outdoor positioning switching, which can be executed by a computer device. Figure 2 This is a hierarchical architecture diagram of the seamless indoor / outdoor positioning switching method. See also... Figures 1 to 2 The method includes: In step 101, multi-source positioning data of the positioning terminal is acquired.

[0038] Multi-source positioning data includes GNSS data, IMU (Inertial Measurement Unit) data, UWB data, and raw sampled data of the channel impulse response corresponding to each UWB ranging.

[0039] In this embodiment, the positioning terminal is a mobile terminal to be positioned (e.g., a mobile phone, a sports watch, a vehicle terminal, etc.). The positioning terminal can acquire multi-source positioning data at the current time and historical time, mainly including GNSS raw observations (i.e., GNSS data), IMU data, and UWB ranging values ​​(i.e., UWB data).

[0040] UWB data in related technologies typically only includes UWB moment values. In this embodiment, the raw sampled data of the Channel Impulse Response (CIR) corresponding to each UWB ranging measurement is additionally acquired. The original sampling data Used to obtain subsequent NLOS probabilities.

[0041] The aforementioned multi-source positioning data is collected in parallel and synchronously. The positioning terminal stores real-time multi-source positioning data as well as historical multi-source positioning data.

[0042] In step 102, the NLOS probability is obtained based on the original sampling data.

[0043] Optionally, step 102 includes steps 1021 to 1022 as follows.

[0044] Step 1021: Extract channel impulse response features from the original sampled data.

[0045] Channel impulse response characteristics include the energy ratio of the first path to the maximum path, the energy ratio of the first path to the total energy, the root mean square delay spread, and kurtosis.

[0046] The methods for obtaining the impulse response characteristics of each channel are explained below.

[0047] (1) The energy ratio of the first path to the maximum path is expressed as: ,in The energy of the first path. This represents the maximum energy.

[0048] In an ideal LOS (Line of Sight) scenario, the signal arrives directly, therefore the first path of arrival is the path with the strongest energy (Maximum Path). Theoretically, it is 1.

[0049] In NLOS (Non-Line of Sight) scenarios, the direct path is blocked, and the first signal to arrive is a weak diffracted or reflected signal, while the strongest energy path is often a later-arriving primary reflection path. Therefore, at this time... It will be significantly less than 1.

[0050] The energy ratio of the first path to the maximum path directly reflects whether "the first one to arrive is the strongest" and is one of the most direct indicators for judging NLOS.

[0051] (2) The ratio of the first path to the total energy is expressed as: ,in This represents the total energy. It measures the concentration of channel energy.

[0052] In a Loss of Speed ​​scenario, most of the energy is concentrated in the direct path, so The signal energy is relatively high. In NLOS scenarios, due to multipath effects, the signal energy is dispersed along many different paths, resulting in a higher total energy. Larger, and the energy of the first arrival path. The proportion is very small, resulting in Very low.

[0053] The first path to total energy ratio assesses channel quality from the perspective of energy dispersion, complementing the first path to maximum path energy ratio.

[0054] (3) The root mean square (RMS) delay spread is calculated using the following formula.

[0055]

[0056] in, For root mean square delay spread, It is the power of the k-th multipath component, defined as follows: , It is the k-th multipath component in the original sampled data. It is the time delay of the k-th multipath component. It is the average time delay of each multipath component.

[0057] The root mean square (RMS) delay spread quantifies the temporal dispersion of a multipath signal. In the LOS scenario, multipath components are few and concentrated near the main path, resulting in a small delay spread. In the NLOS scenario, the signal arrives through numerous reflections and scatterings, leading to significant differences in path delays and a substantial increase in delay spread.

[0058] (4) Kurtosis is a statistical measure describing the distribution pattern of the channel power delay profile. The PDP (Power Delay Profile) of a LOS channel is very "sharp" because the energy is highly concentrated on a single path, exhibiting a high kurtosis. In contrast, the PDP of an NLOS channel is relatively "flat" because the energy is distributed across multiple paths, exhibiting a low kurtosis. The PDP here includes... In this embodiment, kurtosis refers to the statistical kurtosis of the PDP, used to describe the sharpness / flatness of the overall multipath structure. There are many related technologies regarding kurtosis calculation methods, which will not be detailed here.

[0059] The four dimensions of features mentioned above can describe the physical essence of the channel in terms of energy distribution, time dispersion, and statistical morphology. By concatenating these four dimensions of features, the channel impulse response features can be obtained. These features complement each other, making them extremely robust. For example, even if the primary reflection path energy is very high in a certain NLOS scenario (deceiving the peak amplitude method), its delay spread and energy ratio will still reveal its NLOS nature.

[0060] Step 1022: Input the channel impulse response characteristics and the original sampled data into the NLOS prediction model to obtain the NLOS probability.

[0061] This NLOS probability is the NLOS probability for each UWB base station.

[0062] The NLOS prediction model is a two-channel neural network. Figure 3 This is a schematic diagram of the NLOS prediction model. (Example) Figure 3 As shown, the dual-channel neural network includes a first channel, a second channel, and a fully connected layer. The first and second channels are each connected to the fully connected layer. The original sampled data is input into the first channel for encoding to obtain the first encoded feature, and the channel impulse response feature is input into the second channel for encoding to obtain the second encoded feature. The first and second encoded features are concatenated and then input into the fully connected layer to obtain the NLOS probability output by the NLOS prediction model. This NLOS probability is a continuous value between 0 and 1.

[0063] The NLOS prediction model can be pre-trained using a first sample set, which contains multiple CIR samples. Each CIR sample includes channel impulse response features and a label (the NLOS probability of that sample). After training the NLOS prediction model using the first sample set, the trained NLOS prediction model can accurately predict the NLOS probability of each UWB base station. The NLOS prediction model in step 1022 is the trained NLOS model.

[0064] Unlike traditional fixed-threshold methods, this NLOS prediction model learns the complex, non-linear intrinsic relationship between the original waveform and statistical features. Through a data-driven approach, it learns a precise mapping function from feature combinations to NLOS probabilities. This allows the recognition model to adapt to various complex real-world scenarios, achieving accuracy and generalization capabilities far exceeding traditional methods.

[0065] In step 103, the indoor probability is obtained using an HMM model based on the multi-source positioning data.

[0066] In this embodiment, the HMM (Hidden Markov Model) aims to provide smooth and robust environmental judgments.

[0067] The Hidden Markov Model (HMM) includes observation vectors and hidden states. The observation vectors include the number of GNSS satellites, average C / N0, number of UWB visible base stations, light intensity, and air pressure. The number of GNSS satellites and average C / N0 can be obtained from GNSS data in multi-source positioning data, while the number of UWB visible base stations can be obtained from UWB data. Additional environmental data, such as light intensity and air pressure, can be obtained from auxiliary sensors on the positioning terminal (e.g., light intensity sensors and air pressure sensors).

[0068] The hidden states include three types: Indoor, Outdoor, and Transition.

[0069] Given the observation vector and the hidden states, the posterior probability of the current observation vector being in each hidden state can be calculated in real time using the forward algorithm. Then, the state transition probability from the current state to each hidden state can be calculated. Finally, the indoor probability can be calculated based on the posterior probability and the state transition probability of each hidden state.

[0070] In this embodiment, the indoor probability is calculated using the following formula.

[0071]

[0072] in, For indoor probability, Let the hidden state be at time t. Let represent the posterior probability of the hidden state being indoors at time t. Let represent the posterior probability when the hidden state at time t is in the transition region. For adaptive weights, This represents the state transition probability from the transitional region state to the indoor state. This represents the state transition probability from the transition zone state to the outdoor state.

[0073] in This represents the normalized ratio of the state transition probabilities in an Hidden Markov Model (HMM) from a Transition state to the Indoor and Outdoor states, respectively. When the environmental layout makes the transition zone more likely to lead indoors, Too large; conversely, when the environmental layout makes the transition area more inclined to lead outdoors. The weights are relatively small. This avoids the need for hard-coded constant weights, making the environmental judgments statistically consistent.

[0074] In step 104, an adaptive Kalman filter method is used to achieve seamless indoor and outdoor positioning switching based on multi-source positioning data.

[0075] Within the k-th filtering cycle, given the acquisition of GNSS and UWB data, the adaptive Kalman filtering method includes: firstly, obtaining the first state vector and first error covariance matrix at time k based on the IMU data at time k; secondly, updating the first state vector and first error covariance matrix based on the GNSS data at time k; and finally, updating the first state vector and first error covariance matrix based on the UWB data at time k to obtain the positioning result at time k+1. In the first update, the observation noise covariance of GNSS is calculated based on indoor probability, and in the second update, the observation noise covariance of UWB is calculated based on NLOS probability and indoor probability.

[0076] Figure 4 This is a flowchart illustrating the adaptive Kalman filtering method. The following example illustrates the case where GNSS and UWB data are acquired during the k-th filtering cycle. Figure 4 The adaptive Kalman filtering process is explained in detail.

[0077] like Figure 4 As shown, the adaptive Kalman filtering process in this embodiment includes two core stages: prediction and update. The update stage includes a first update and a second update. It should be noted that the first update and the second update are source-sequential updates and are uncoupled, meaning that GNSS and UWB measurements update the same state independently.

[0078] The input to the prediction phase is the posterior estimate at time k-1, i.e., the posterior state at time k-1 and the posterior error covariance matrix at time k-1. The output of the prediction phase is the prior estimate at time k, i.e., the prior state at time k and the prior error covariance matrix at time k. The prior state at time k is the first state vector, and the prior error covariance matrix at time k is the first error covariance matrix.

[0079] First, define the state vector. for ,in For three-dimensional position, For three-dimensional velocity, For three-dimensional attitude error, Zero bias for IMU three-axis acceleration, For the three-axis gyroscope, zero bias, For receiver clock bias, This is due to receiver clock drift. All five parameters are three-dimensional parameters. and Since it is a single-dimensional parameter, the state vector is a vector with a total of 17 dimensions.

[0080] In the prediction phase, the prior state at time k Represented as ,in Let k be the posterior state at time k-1. The data is the IMU data at time k (including acceleration and angular velocity). It is a nonlinear inertial navigation kinematic equation.

[0081] The prior error covariance matrix at time k Represented as ,in This is the state transition Jacobian matrix, used to linearize propagation errors; Let be the posterior error covariance matrix at time k-1. This is process noise.

[0082] Process noise in this embodiment The adaptive process noise is obtained using the following formula.

[0083]

[0084] in, This is the process noise matrix pre-calibrated under static conditions. This is a pre-calibrated process noise matrix under conditions of intense motion. As a motion factor, , The preset motion detection threshold, This is the upper limit cutoff value for the motion factor, used to prevent excessive process noise under extreme motion conditions. The variance of the IMU acceleration amplitude. W is the length of the sliding window (typically 50~200 IMU samples). Let j be the IMU acceleration amplitude at time j. This is the acceleration due to gravity.

[0085] When the user is still , The filter trusts the motion model more; when the user moves quickly... Increase tend The filter trusts external measurements more.

[0086] With both GNSS and UWB data acquired, the input for the first update at time k is the output of the prediction phase, i.e., the prior estimate at time k, including the prior state at time k and the prior error covariance matrix at time k. The output of the first update at time k is the second state vector and the second error covariance matrix. The input for the second update at time k is the output of the first update, i.e., the second state vector and the second error covariance matrix. The output of the second update at time k is the third state vector and the third error covariance matrix.

[0087] When only GNSS data is acquired and UWB data is not acquired, only the first update is performed. In this case, the output of the first update is the Kalman filter prediction result. That is, the input of the first update at time k is the output of the prediction stage, namely the prior estimate at time k, including the prior state at time k and the prior error covariance matrix at time k; the output of the first update at time k is the second state vector and the second error covariance matrix.

[0088] When only UWB data is acquired and GNSS data is not acquired, only the second update is performed. The output of the second update is the Kalman filter prediction result. At this time, the input of the second update at time k is the output of the prediction stage, that is, the prior estimate at time k, including the prior state at time k and the prior error covariance matrix at time k; the output of the second update at time k is the third state vector and the third error covariance matrix.

[0089] Optionally, the first update of the first state vector and the first error covariance matrix based on the GNSS data at time k includes the following steps 1041 to 1043.

[0090] Step 1041: Determine the adaptive measurement noise of the i-th satellite at time k based on the carrier-to-noise ratio of the i-th satellite in the GNSS data at time k.

[0091] Optionally, the adaptive measurement noise of the i-th satellite at time k is expressed by the following formula:

[0092] in, For the adaptive measurement noise of the i-th satellite, The pseudorange variance under the reference condition. Let be the elevation angle of the i-th satellite. Let i be the carrier-to-noise ratio of the i-th measurement. For reference carrier-to-noise ratio.

[0093] In this adaptive measurement noise, the lower the elevation angle, the greater the tropospheric delay and multipath effect, and the greater the noise; the lower the carrier-to-noise ratio, the weaker the signal, and the greater the noise.

[0094] Here, by calculating the adaptive measurement noise for each satellite using the above method, the adaptive measurement noise for each satellite can be obtained.

[0095] Step 1042: Calculate the observation noise covariance matrix of GNSS at time k based on the adaptive measurement noise of each satellite at time k and the indoor probability.

[0096] GNSS observation noise covariance matrix at time k It is a diagonal matrix, and each value in the diagonal matrix corresponds to the observation noise covariance of a satellite.

[0097] Optionally, in the GNSS observation noise covariance matrix at time k, the observation noise covariance corresponding to the i-th satellite is expressed by the following formula:

[0098] in, Let be the observation noise covariance matrix of GNSS at time k, representing the observation noise covariance of the i-th satellite. For indoor probability, For scaling functions, , A sharpening factor greater than 1 To prevent division by zero of extremely small constants.

[0099] After calculating the observation noise covariance for each satellite using the above formula, the observation noise covariance matrix of the GNSS at time k can be obtained. Represented as , where m is the total number of GNSS satellites.

[0100] when This indicates that you are currently indoors. , ,because It is a very small constant, therefore This tends towards a maximum value, causing GNSS data to be naturally suppressed, meaning that GNSS data is not trusted in indoor scenarios. When This indicates that you are currently outdoors. Therefore This means that the noise in GNSS measurements is approximately equal to the original noise, and the GNSS data is fully trusted, which means that the GNSS data is fully trusted in outdoor scenarios.

[0101] Step 1043: Calculate the first Kalman gain in the first update based on the GNSS observation noise covariance matrix at time k, and update the first state vector and the first error covariance matrix based on the first Kalman gain to obtain the second state vector and the second error covariance matrix.

[0102] Given the GNSS observation noise covariance matrix at time k, the first Kalman gain... Represented as: ,in The observation matrix is ​​obtained by calculating the Jacobian matrix of the GNSS measurement function at the current state prediction point. Wherein, for the i-th satellite, the GNSS measurement function... It can be represented as .in To determine the three-dimensional position of the terminal, Let be the position of the i-th satellite, and c be the speed of light.

[0103] Optionally, the first state vector and the first error covariance matrix are updated according to the first Kalman gain to obtain the second state vector and the second error covariance matrix, which are expressed by the following formula.

[0104]

[0105] in, This is the second state vector. The second error covariance matrix, This is the GNSS observation vector, composed of the raw pseudoranges of each visible satellite. It is the identity matrix. It is a matrix composed of the GNSS measurement function values ​​of each satellite under the first state vector.

[0106] If no UWB data is acquired in the k-th cycle, and only GNSS data is acquired, the adaptive Kalman filter method only performs the first update and skips the second update. In this case, the output of the first update is the positioning result at time k+1. That is, the second state vector and the second error covariance matrix are the positioning result at time k+1.

[0107] Optionally, the first update of the first state vector and the first error covariance matrix based on the GNSS data at time k includes the following steps 1044 to 1046.

[0108] Step 1044: Determine the adaptive measurement noise of the j-th UWB base station based on the NLOS probability of the j-th UWB base station in the UWB data at time k.

[0109] Optionally, the adaptive measurement noise of the j-th UWB base station is expressed by the following formula.

[0110]

[0111] in, For the adaptive measurement noise of the j-th UWB base station, The measurement variance of UWB under LOS conditions (obtained through equipment calibration). This is the penalty coefficient (typically 3 to 8). Let be the NLOS probability of the j-th UWB base station in the UWB data at time k.

[0112] when This indicates that the current situation is likely within visual range. This indicates that the filter fully trusts UWB data under line-of-sight conditions. When When it rises, The exponential growth reduces the subsequently calculated second Kalman gain, resulting in a smooth reduction in the weights of the UWB data. This indicates that the situation is most likely non-line-of-sight. This is equivalent to amplifying the adaptive measurement noise of UWB data, which greatly suppresses the influence of UWB data (while still retaining a weak contribution).

[0113] By applying the above formula to calculate the adaptive measurement noise for each UWB base station, the adaptive measurement noise for each UWB base station can be obtained.

[0114] When the direct propagation path of a UWB base station signal is blocked by obstacles such as walls, furniture, or moving people (i.e., in NLOS state), the signal can only reach the receiver through reflection or diffraction, or by penetrating the obstacle. In either case, the signal propagation time increases, resulting in a significantly larger distance value calculated based on Time of Flight (ToF) or Time Difference of Arrival (TDoA), creating a non-Gaussian, biased positive error. This error can reach several meters, and without processing, a single NLOS ranging value is enough to ruin the entire positioning solution.

[0115] In this embodiment, by introducing NLOS probability into the adaptive measurement noise of UWB, it is essentially a soft penalty mechanism based on NLOS probability. This mechanism allows UWB data to be distrusted when the NLOS probability is high, and fully trusted when the NLOS probability is low. A signal with slight NLOS contamination (such as...) Instead of being discarded, UWB data is given a low but non-zero weight and still contributes to the final positioning, thus making UWB data still have good robustness in NLOS scenarios.

[0116] Step 1045: Calculate the observation noise covariance matrix of UWB at time k based on the adaptive measurement noise of each UWB base station at time k and the indoor probability.

[0117] In the observation noise covariance matrix of UWB at time k, the observation noise covariance corresponding to the j-th UWB base station is expressed by the following formula:

[0118] in, Let the observation noise covariance matrix of UWB at time k be the observation noise covariance corresponding to the j-th UWB base station. The indoor probability is... This is the scaling function.

[0119] By calculating the corresponding observation noise covariance for each UWB base station, the observation noise covariance matrix of the UWB at time k is obtained. Represented as , where n is the total number of UWB base stations.

[0120] In the observation noise covariance matrix of UWB at time k, when This indicates that you are currently outdoors. ,because It is a very small constant, therefore This tends towards a maximum value, causing UWB data to be naturally suppressed, meaning that UWB data is not trusted in outdoor scenarios. When This indicates that you are currently indoors. Therefore In other words, in indoor scenarios, UWB data is fully trusted, and at this time, the NLOS soft penalty mechanism gradually takes over the quality control of the measurement.

[0121] Step 1046: Based on the observation noise covariance matrix of UWB at time k, calculate the second Kalman gain in the second update, and update the second state vector and the second error covariance matrix according to the second Kalman gain to obtain the third state vector and the third error covariance matrix. The third state vector and the third error covariance matrix are the prediction output of the adaptive Kalman filtering method at time k.

[0122] Given that the observation noise covariance matrix of the UWB at time k is known, the second Kalman gain Represented as: ,in The observation matrix is ​​obtained by calculating the Jacobian matrix of the UWB measurement function at the current state prediction point. Wherein, for the j-th UWB base station, the UWB measurement function... It can be represented as .in To determine the three-dimensional position of the terminal, Let j be the location of the j-th UWB base station.

[0123] Optionally, the second state vector and the second error covariance matrix are updated according to the second Kalman gain to obtain the third state vector and the third error covariance matrix, which are expressed by the following formula.

[0124]

[0125] in, This is the third state vector. The third error covariance matrix, This is the UWB observation vector, composed of the original moment measurements from each UWB base station. It is the identity matrix. It is a matrix composed of the UWB measurement function values ​​of each UWB base station under the second state vector.

[0126] If only UWB data is acquired at time k and no GNSS data is acquired, then only the second update is performed. In this case, the input to the second update at time k is the output of the prediction stage, i.e., the prior estimate at time k, including the prior state at time k and the prior error covariance matrix at time k; the output of the second update at time k is the third state vector and the third error covariance matrix. The second update is expressed by the following formula.

[0127]

[0128]

[0129] Many existing fusion solutions employ a loosely coupled architecture. In this architecture, the UWB subsystem independently calculates its own position coordinates using multiple ranging values, and then feeds these coordinates as observations into the main filter. The advantage of this method is its simplicity and modularity, but its fatal flaw is that it discards the most original and information-rich UWB ranging data. If the UWB subsystem calculates an incorrect coordinate point due to NLOS interference or poor base station geometry (i.e., a large GDOP), the main filter receives only a contaminated "result" that has lost its original statistical characteristics. This makes it difficult to judge its reliability and easily leads to bias or even filter divergence.

[0130] This embodiment adopts a "tightly-coupled" architecture, directly sending the original UWB data or GNSS data as observations into the main filter to perform the update stage (such as the GNSS observation vector in the first update or the UWB observation vector in the second update). Although the implementation is more complex, it retains the most complete information, enabling the filter to evaluate the quality of each ranging measurement within a unified framework and perform more refined fusion.

[0131] Standard Kalman filters typically set their model parameters, such as process noise (representing the degree of confidence in the motion model) and observation noise (representing the degree of confidence in the observations), to fixed constants. However, the real world is dynamic: a user's motion state may be stationary, walking, running, or riding in a vehicle; the measurement quality of sensors also changes constantly, such as the PDOP value of GNSS and the NLOS contamination level of UWB ranging. Static filter parameters cannot adapt to these dynamic changes, resulting in suboptimal filtering performance in various complex scenarios. In this embodiment, both the process noise matrix and the observation noise covariance are adjusted according to the actual situation, thus enabling effective Kalman filtering in complex scenarios.

[0132] Compared with the original hybrid R matrix scheme (i.e., UWB and GNSS data are updated simultaneously, with only one update performed), the source-sequential update architecture adopted in this embodiment, which performs the first update first and then the second update, has the following advantages.

[0133] (1) GNSS data (approximately) The m) and UWB data (on the order of approximately 1 to 50 m) are processed in their respective independent observation equations and matrices, so there is no problem of mixing of different source dimensions.

[0134] (2) When a location data source is completely unavailable (such as indoor GNSS satellite loss), the update steps of that source can be skipped directly without any special missing value handling logic.

[0135] (3) Two sequential updates are mathematically equivalent to one joint update within the linearization error range, without losing any information.

[0136] (4) The observation noise covariance matrix of GNSS and UWB data is scaled using system-level indoor probabilities (provided by HMM) to achieve smooth power transfer between GNSS and UWB; measurement-level NLOS probabilities are used to perform fine-grained reputation rating for each ranging measurement within UWB, i.e., a soft penalty mechanism based on NLOS probabilities is adopted, so that if the NLOS probability of a certain base station is high, the UWB data of that base station is not trusted, and if the NLOS probability of that base station is low, the UWB data of that base station is fully trusted. In this way, a smooth power transfer between GNSS and UWB can be achieved according to indoor probabilities when switching between indoor and outdoor environments, and the credibility of UWB can be dynamically adjusted according to whether it is currently in NLOS state, thereby achieving seamless indoor and outdoor positioning.

[0137] Figure 5 This is a schematic diagram illustrating seamless indoor / outdoor positioning switching. (For example...) Figure 5 As shown, initially (at the starting point), the positioning terminal is in an outdoor area. This outdoor area includes multiple GNSS positioning sources (such as GPS, BDS, GAL, etc.). In this situation, the indoor probability is approximately 0, resulting in a high weight for GNSS data and a weight close to 0 for UWB data. As the positioning terminal moves from outdoors to indoors, it passes through a transition zone (such as a building entrance in an indoor area). In this transition zone, the GNSS positioning data signal gradually attenuates, the indoor probability gradually increases, causing the weight of GNSS data to gradually decrease and the weight of UWB data to gradually increase. In the indoor area, the indoor probability is approximately 1, resulting in a high weight for UWB data and a weight close to 0 for GNSS data. In other words, UWB data takes over the positioning accuracy in the indoor area. Furthermore, different UWB base stations are constrained by NLOS probability. If there is an obstacle (such as base station A4) between the positioning terminal and a certain UWB base station, the algorithm will identify that base station A4 has a higher NLOS probability, thus amplifying the adaptive measurement noise value of base station A4 and suppressing the influence of UWB data collected by base station A4 during UWB positioning. During the aforementioned switching process, since the weights of each positioning source in indoor positioning are mainly guided by the indoor probability, as the indoor probability gradually increases, the weights of different positioning sources will also switch smoothly, thereby achieving seamless indoor and outdoor positioning.

[0138] The following are equipment embodiments of this application. For details not described in detail in the equipment embodiments, please refer to the above method embodiments.

[0139] Example 2.

[0140] Figure 6 A schematic diagram of the structure of an indoor / outdoor seamless positioning switching device provided in an exemplary embodiment of the present invention is shown. See also... Figure 6The indoor-outdoor seamless positioning switching device 600 includes: a positioning data acquisition module 601, an NLOS probability acquisition module 602, an indoor probability acquisition module 603, and a positioning switching module 604.

[0141] The positioning data acquisition module 601 is used to acquire multi-source positioning data from the positioning terminal. The multi-source positioning data includes GNSS data, IMU data, UWB data, and the original sampled data of the channel impulse response corresponding to each UWB ranging. The NLOS probability acquisition module 602 is used to acquire the NLOS probability based on the original sampling data; The indoor probability acquisition module 603 is used to acquire indoor probability based on multi-source positioning data and an HMM model. The positioning switching module 604 is used to achieve seamless indoor and outdoor positioning switching based on multi-source positioning data using an adaptive Kalman filter method; In the k-th filtering cycle, given the acquisition of GNSS and UWB data, the adaptive Kalman filtering method includes: firstly, obtaining the first state vector and first error covariance matrix at time k based on the IMU data at time k; secondly, updating the first state vector and first error covariance matrix based on the GNSS data at time k; and finally, updating the first state vector and first error covariance matrix based on the UWB data at time k to obtain the positioning result at time k+1. In the first update, the GNSS observation noise covariance is calculated based on the indoor probability, and in the second update, the UWB observation noise covariance is calculated based on the NLOS probability and the indoor probability.

[0142] Optionally, the positioning switching module 604 is further configured to determine the adaptive measurement noise of the i-th satellite at time k based on the carrier-to-noise ratio of the i-th satellite in the GNSS data at time k; calculate the observation noise covariance matrix of the GNSS at time k based on the adaptive measurement noise of each satellite at time k and the indoor probability; calculate the first Kalman gain in the first update based on the observation noise covariance matrix of the GNSS at time k, and update the first state vector and the first error covariance matrix based on the first Kalman gain to obtain the second state vector and the second error covariance matrix.

[0143] Optionally, in the positioning switching module 604, the adaptive measurement noise of the i-th satellite at time k is expressed by the following formula:

[0144] in, For the adaptive measurement noise of the i-th satellite, The pseudorange variance under the reference condition. Let be the elevation angle of the i-th satellite. Let i be the carrier-to-noise ratio of the i-th measurement. For reference carrier-to-noise ratio; In the GNSS observation noise covariance matrix at time k, the observation noise covariance corresponding to the i-th satellite is expressed by the following formula:

[0145] in, Let be the observation noise covariance matrix of GNSS at time k, representing the observation noise covariance of the i-th satellite. For indoor probability, This is the scaling function.

[0146] Optionally, the positioning switching module 604 is further configured to determine the adaptive measurement noise of the j-th UWB base station based on the NLOS probability of the j-th UWB base station in the UWB data at time k; calculate the observation noise covariance matrix of UWB at time k based on the adaptive measurement noise of each UWB base station and the indoor probability; calculate the second Kalman gain in the second update based on the observation noise covariance matrix of UWB at time k, and update the second state vector and the second error covariance matrix based on the second Kalman gain to obtain the third state vector and the third error covariance matrix, which are the prediction outputs of the adaptive Kalman filtering method at time k.

[0147] Optionally, in the positioning handover module 604, the adaptive measurement noise of the j-th UWB base station is expressed by the following formula:

[0148] in, For the adaptive measurement noise of the j-th UWB base station, The measurement variance of UWB under LOS conditions. The penalty coefficient is... Let be the NLOS probability of the j-th UWB base station in the UWB data at time k; In the observation noise covariance matrix of UWB at time k, the observation noise covariance corresponding to the j-th UWB base station is expressed by the following formula:

[0149] in, Let the observation noise covariance matrix of UWB at time k be the observation noise covariance corresponding to the j-th UWB base station. For indoor probability, This is the scaling function.

[0150] Optionally, the NLOS probability acquisition module 602 is further used to extract channel impulse response features from the original sampled data. The channel impulse response features include the energy ratio of the first path to the maximum path, the energy ratio of the first path to the total energy, the root mean square delay spread, and kurtosis. The channel impulse response features and the original sampled data are input into the NLOS prediction model to obtain the NLOS probability. The NLOS prediction model is a dual-channel neural network, which includes a first channel, a second channel, and a fully connected layer. The first channel and the second channel are respectively connected to the fully connected layer. The original sampled data is input into the first channel for encoding to obtain the first encoded feature, and the channel impulse response features are input into the second channel for encoding to obtain the second encoded feature. The first encoded feature and the second encoded feature are concatenated and input into the fully connected layer to obtain the NLOS probability output by the NLOS prediction model.

[0151] It should be noted that the indoor-outdoor seamless positioning switching equipment provided in the above embodiments is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the equipment can be divided into different functional modules to complete all or part of the functions described above. In addition, the indoor-outdoor seamless positioning switching equipment and the indoor-outdoor seamless positioning switching method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0152] The module division in this embodiment of the invention is illustrative and represents only one logical functional division. In actual implementation, other division methods are possible. Furthermore, the functional modules in each embodiment of the invention can be integrated into a single processor, exist as separate physical entities, or consist of two or more modules integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0153] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a terminal device (which may be a personal computer, mobile phone, or communication device, etc.) or processor to execute all or part of the steps of the method of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0154] Figure 7 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of the present invention. For example... Figure 7 As shown, the computer device 700 includes a processor 701 and a memory 702.

[0155] Processor 701 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 701 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 701 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 701 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 701 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0156] The memory 702 may include one or more computer-readable storage media, which may be non-transitory. The memory 702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 702 is used to store at least one instruction, which is executed by the processor 701 to implement the indoor / outdoor seamless positioning switching method provided in this embodiment of the invention.

[0157] Those skilled in the art will understand that Figure 7 The structure shown does not constitute a limitation on the computer device 700, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0158] This invention also provides a non-transitory computer-readable storage medium, which, when the instructions in the storage medium are executed by the processor of a computer device, enables the computer device to execute the indoor / outdoor seamless positioning switching method provided in this invention.

[0159] This invention also provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements the indoor / outdoor seamless positioning switching method provided in this invention.

[0160] The above description is merely an optional embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for seamless indoor / outdoor positioning switching, characterized in that, The method includes: Acquire multi-source positioning data from the positioning terminal, including GNSS data, IMU data, UWB data, and raw sampled data of the channel impulse response corresponding to each UWB ranging measurement; Based on the original sampled data, obtain the NLOS probability; Based on the multi-source positioning data, an HMM model is used to obtain the indoor probability; Based on the multi-source positioning data, an adaptive Kalman filter method is used to achieve seamless switching between indoor and outdoor positioning. In the k-th filtering cycle, given the acquisition of GNSS and UWB data, the adaptive Kalman filtering method includes: firstly, obtaining the first state vector and the first error covariance matrix at time k based on the IMU data at time k; secondly, updating the first state vector and the first error covariance matrix based on the GNSS data at time k; and finally, updating the first state vector and the first error covariance matrix based on the UWB data at time k to obtain the positioning result at time k+1. In the first update, the observation noise covariance of GNSS is calculated based on the indoor probability; in the second update, the observation noise covariance of UWB is calculated based on the NLOS probability and the indoor probability.

2. The method according to claim 1, characterized in that, The first update includes: The adaptive measurement noise of the i-th satellite at time k is determined based on the carrier-to-noise ratio of the i-th satellite in the GNSS data at time k. The observation noise covariance matrix of GNSS at time k is calculated based on the adaptive measurement noise of each satellite at time k and the indoor probability. Based on the observation noise covariance matrix of the GNSS at time k, the first Kalman gain in the first update is calculated, and the first state vector and the first error covariance matrix are updated according to the first Kalman gain to obtain the second state vector and the second error covariance matrix.

3. The method according to claim 2, characterized in that, The adaptive measurement noise of the i-th satellite at time k is expressed by the following formula: in, For the adaptive measurement noise of the i-th satellite, The pseudorange variance under the reference condition. Let be the elevation angle of the i-th satellite. Let i be the carrier-to-noise ratio of the i-th measurement. For reference carrier-to-noise ratio; In the GNSS observation noise covariance matrix at time k, the observation noise covariance corresponding to the i-th satellite is expressed by the following formula: in, Let be the observation noise covariance matrix of GNSS at time k, representing the observation noise covariance of the i-th satellite. The indoor probability is... This is the scaling function.

4. The method according to claim 2 or 3, characterized in that, The NLOS probability includes the NLOS probability of each UWB base station, and the second update includes: The adaptive measurement noise of the j-th UWB base station is determined based on the NLOS probability of the j-th UWB base station in the UWB data at time k. The observation noise covariance matrix of UWB at time k is calculated based on the adaptive measurement noise of each UWB base station at time k and the indoor probability. Based on the observation noise covariance matrix of the UWB at time k, the second Kalman gain in the second update is calculated, and the second state vector and the second error covariance matrix are updated according to the second Kalman gain to obtain the third state vector and the third error covariance matrix. The third state vector and the third error covariance matrix are the prediction output of the adaptive Kalman filtering method at time k.

5. The method according to claim 4, characterized in that, The adaptive measurement noise of the j-th UWB base station is expressed by the following formula: in, The adaptive measurement noise for the j-th UWB base station, The measurement variance of UWB under LOS conditions. The penalty coefficient is... Let be the NLOS probability of the j-th UWB base station in the UWB data at time k; In the observation noise covariance matrix of UWB at time k, the observation noise covariance corresponding to the j-th UWB base station is expressed by the following formula: in, Let the observation noise covariance matrix of UWB at time k be the observation noise covariance corresponding to the j-th UWB base station. The indoor probability is... This is the scaling function.

6. The method according to any one of claims 1 to 3, characterized in that, The step of obtaining the NLOS probability based on the original sampled data includes: Channel impulse response features are extracted from the original sampled data. The channel impulse response features include the energy ratio of the first path to the maximum path, the energy ratio of the first path to the total energy, the root mean square delay spread, and kurtosis. The channel impulse response characteristics and the original sampled data are input into the NLOS prediction model to obtain the NLOS probability; The NLOS prediction model is a dual-channel neural network, which includes a first channel, a second channel, and a fully connected layer. The first channel and the second channel are respectively connected to the fully connected layer. The original sampled data is input to the first channel for encoding to obtain a first encoded feature, and the channel impulse response feature is input to the second channel for encoding to obtain a second encoded feature. The first encoded feature and the second encoded feature are concatenated and then input to the fully connected layer to obtain the NLOS probability output by the NLOS prediction model.

7. An indoor / outdoor seamless positioning switching device, characterized in that, The equipment includes: The positioning data acquisition module is used to acquire multi-source positioning data from the positioning terminal. The multi-source positioning data includes GNSS data, IMU data, UWB data, and raw sampled data of the channel impulse response corresponding to each UWB ranging. The NLOS probability acquisition module is used to acquire the NLOS probability based on the original sampling data. The indoor probability acquisition module is used to acquire indoor probability using an HMM model based on the multi-source positioning data. The positioning switching module is used to achieve seamless indoor and outdoor positioning switching based on the multi-source positioning data using an adaptive Kalman filter method. In the k-th filtering cycle, given the acquisition of GNSS and UWB data, the adaptive Kalman filtering method includes: firstly, obtaining the first state vector and the first error covariance matrix at time k based on the IMU data at time k; secondly, updating the first state vector and the first error covariance matrix based on the GNSS data at time k; and finally, updating the first state vector and the first error covariance matrix based on the UWB data at time k to obtain the positioning result at time k+1. In the first update, the observation noise covariance of GNSS is calculated based on the indoor probability; in the second update, the observation noise covariance of UWB is calculated based on the NLOS probability and the indoor probability.

8. A computer device, characterized in that, The computer device includes a memory and a processor, wherein the memory stores at least one computer program, which is loaded and executed by the processor to implement the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement the method according to any one of claims 1 to 6.

10. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the method described in any one of claims 1 to 6.