Method and device for GPS deviation correction
By determining the adjacent turning points and projection points of the navigation route on the terminal, the GPS correction process is simplified, the problem of unsmooth display of GPS positioning points under high-speed movement is solved, and a low-cost and fast correction effect is achieved.
Patent Information
- Application Number
- CN202210830883.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-15
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-07-15
AI Technical Summary
The existing GPS correction method is complicated to operate in high-speed vehicle scenarios, resulting in the GPS positioning point display on the front-end page being unsmooth or even stuck.
The terminal stores the turning point information of the preset navigation route, requests the GPS positioning point information from the server according to the preset period, determines the nearest turning point from the marked turning point of the preset navigation route, calculates the projection point on the navigation line segment connected before and after the adjacent turning point, and updates the marked turning point to determine the correction result.
It simplifies the GPS correction process under high-speed movement, reduces the amount of calculation, improves the display smoothness of the positioning point, avoids lag, reduces costs, and does not rely on external equipment.
Smart Images

Figure CN115248450B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a technology for GPS deviation correction. Background Art
[0002] When a navigation terminal is traveling along a predetermined route, the GPS positioning information it obtains may deviate from its actual location. For example, it may deviate to buildings or other features near the navigation route. Therefore, it is necessary to correct the GPS positioning information to keep it on the navigation route.
[0003] In actual application scenarios, since the navigation terminal is in a state of constant motion, when the navigation terminal is in a high-speed vehicle-mounted scenario, the speed requirement for GPS correction is relatively high. The current GPS correction method is relatively complicated to operate, resulting in the front-end page GPS positioning point display being unsmooth or even stuck in actual application. Summary of the Invention
[0004] The purpose of this application is to provide a method and device for GPS correction, which is simple to implement and has a small amount of calculation. It can achieve smooth display of navigation positioning points on the front-end page while achieving GPS correction.
[0005] According to one aspect of the present application, a method for GPS deviation correction in a terminal is provided, wherein the terminal stores a preset navigation route having multiple inflection points and has recorded inflection point information, the method comprising:
[0006] Request GPS positioning point information from the server according to the preset period;
[0007] Determine, based on the GPS positioning point information sent by the server, a nearby turning point closest to the GPS positioning point starting from a marked turning point of the preset navigation route, wherein the marked turning point is initially the starting point of the preset navigation route;
[0008] Calculate the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the inflection point respectively;
[0009] The marked inflection point is updated according to the distances from the first projection point and the second projection point to the GPS positioning point, and a correction result of the GPS positioning point is determined.
[0010] Furthermore, the updating of the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point and determining the correction result of the GPS positioning point includes:
[0011] If the distance from the first projection point to the GPS positioning point is greater than or equal to the distance from the second projection point to the GPS positioning point, the adjacent inflection point is used as the updated marked inflection point, and the second projection point is used as the correction result of the GPS positioning point; otherwise,
[0012] The marked inflection point is kept unchanged, and the nearest projection point is used as the correction result of the GPS positioning point.
[0013] Furthermore, starting from the marked turning point of the preset navigation route, determining the nearest turning point to the GPS positioning point includes:
[0014] Starting from the marked turning point, traverse each turning point in sequence according to the preset navigation route;
[0015] Starting from the traversed inflection point, calculate the distance between the traversed inflection point and the two inflection points before and after it and the GPS positioning point; if the distance corresponding to the traversed inflection point is less than the distance corresponding to the inflection points before and after it, then determine the traversed inflection point as the adjacent inflection point; otherwise, continue traversing.
[0016] Furthermore, if the marked turning point is the starting point of the preset navigation route, the step of determining the nearest adjacent turning point to the GPS positioning point starting from the marked turning point of the preset navigation route includes:
[0017] Calculating the distance between the starting point of the preset navigation route and the second turning point in the preset navigation route and the GPS positioning point;
[0018] If the distance corresponding to the starting point is greater than or equal to the distance corresponding to the second inflection point, the second inflection point is determined as the adjacent inflection point; otherwise,
[0019] If the distance corresponding to the starting point is less than the distance corresponding to the second inflection point, the starting point is determined as the adjacent inflection point;
[0020] Wherein, the respectively calculating the first projection point and / or the second projection point on the first navigation line segment and / or the second navigation line segment connected sequentially before and after the adjacent inflection point, which is closest to the GPS positioning point, comprises: calculating the second projection point on the second navigation line segment connected after the adjacent inflection point, which is closest to the GPS positioning point;
[0021] Among them, updating the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point and determining the correction result of the GPS positioning point includes: keeping the marked inflection point unchanged and using the second projection point as the correction result of the GPS positioning point.
[0022] Furthermore, if the marked turning point is a turning point before the end point of the preset navigation route, the step of determining the nearest turning point to the GPS positioning point starting from the marked turning point of the preset navigation route includes:
[0023] Determining the end point of the preset navigation route as the adjacent turning point;
[0024] Wherein, respectively calculating the first projection point and / or the second projection point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent inflection point, which is closest to the GPS positioning point, comprises: calculating the first projection point on the first navigation line segment connected before the adjacent inflection point, which is closest to the GPS positioning point;
[0025] Wherein, updating the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point and determining the correction result of the GPS positioning point includes:
[0026] Keeping the marked inflection point unchanged, and using the first projection point as the correction result of the GPS positioning point;
[0027] Repeat the above steps until the deviation correction result is the end point of the preset navigation route.
[0028] Furthermore, the step of respectively calculating the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the inflection point further includes:
[0029] Determining whether the GPS positioning point is on a first navigation line segment and / or a second navigation line segment sequentially connected before and after the adjacent turning point;
[0030] If yes, the GPS positioning point is directly used as the correction result.
[0031] Furthermore, before requesting the GPS positioning point information from the server according to the preset period, the method further includes:
[0032] Pre-set buffer radius;
[0033] Sending the recorded inflection point information and the buffer radius information to the server;
[0034] Receive the buffer data returned by the server;
[0035] The method further includes determining the nearest inflection point from the marked inflection point of the preset navigation route based on the GPS positioning point information sent by the server:
[0036] Determine whether the GPS positioning point is in the buffer zone according to the buffer zone data and the GPS positioning point information;
[0037] If not, the GPS positioning point is discarded, and the GPS positioning point information is requested from the server in the next preset period.
[0038] Furthermore, the step of determining whether the GPS positioning point is in the buffer zone includes:
[0039] According to the buffer zone data and GPS positioning point information, the ray method is used to determine whether the GPS positioning point is in the buffer zone.
[0040] According to another aspect of the present application, a terminal device for GPS deviation correction is provided, wherein the device includes:
[0041] one or more processors; and
[0042] A memory storing computer-readable instructions that, when executed, cause the processor to perform the operations of the above-described method.
[0043] According to another aspect of the present application, a method for GPS deviation correction on a server side is provided, wherein the method includes:
[0044] receiving a request sent by the terminal;
[0045] Sending GPS positioning information to the terminal according to the terminal's request.
[0046] Furthermore, the method further comprises:
[0047] receiving inflection point information and buffer radius information sent by the terminal;
[0048] A buffer zone is determined according to the inflection point information and the buffer radius information, and buffer zone data is sent to the terminal.
[0049] Furthermore, the buffer data is saved in the form of surface elements, and the data format is the same as the data format of GPS positioning point information.
[0050] Furthermore, the algorithm for determining the buffer zone based on the inflection point information and the buffer radius information includes a convex arc method.
[0051] According to another aspect of the present application, a server-side device for GPS deviation correction is provided, wherein the device includes:
[0052] one or more processors; and
[0053] A memory storing computer-readable instructions that, when executed, cause the processor to perform the operations of the above-described method.
[0054] According to another aspect of the present application, a computer-readable medium is provided, on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the operations of the aforementioned method.
[0055] Compared with the existing technology, the present application requests GPS positioning point information from a server at a preset period; based on the GPS positioning point information sent by the server, the nearest inflection point to the GPS positioning point is determined starting from the marked inflection point of the preset navigation route, where the marked inflection point is initially the starting point of the preset navigation route; the first projection point and / or second projection point closest to the GPS positioning point on the first navigation line segment and / or second navigation line segment sequentially connected before and after the adjacent inflection point are respectively calculated; the marked inflection point is updated based on the distance from the first projection point and the second projection point to the GPS positioning point, and the correction result of the GPS positioning point is determined. This realizes a GPS correction method with simple operation, small computational complexity, and low cost. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Other features, objects and advantages of the present invention will become more apparent upon reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0057] Figure 1 A flowchart of a method for GPS deviation correction according to one aspect of the present application is shown;
[0058] Figure 2 A flowchart of a method for GPS deviation correction according to a preferred embodiment of the present application is shown;
[0059] Figure 3 A schematic diagram illustrating an analysis method for determining a correction result of the present application is shown;
[0060] Figure 4 A schematic diagram illustrating an analysis method for determining a correction result of the present application is shown;
[0061] Figure 5 A schematic diagram of an analysis for determining a correction result of the present application is shown.
[0062] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0063] The present invention is further described in detail below with reference to the accompanying drawings.
[0064] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPUs), input / output interfaces, network interfaces and memories.
[0065] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
[0066] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0067] The present application can be implemented by the cooperation of the terminal and the server. The terminal has stored a preset navigation route with multiple inflection points, i.e., the information of each inflection point. Here, the preset navigation route is a broken line formed by connecting multiple line segments determined by the starting point and the end point. The sum of the common endpoint formed by the connection of two line segments and the starting point and the end point of the preset navigation route is the inflection point. Therefore, the preset navigation route includes multiple inflection points, and the preset navigation route can be drawn through all the inflection points. Here, the inflection point information includes but is not limited to the latitude and longitude information of the inflection point. It should be clear that after the preset navigation route of the present application is determined, the terminal moves in the direction from the starting point to the end point. If the terminal moves in the opposite direction midway, the navigation route needs to be re-determined. Specifically, in one embodiment, the terminal uses Mapbox GL JS technology to load an electronic map to a web page, determines the preset navigation route according to the starting point and end point information input by the user, draws it on the electronic map of the terminal, and saves the inflection point information in GeoJson format. It can be understood that the terminals include but are not limited to web terminals and mobile terminals, that is, the devices to which the technical solution of this application can be applied include but are not limited to notebooks, tablets, mobile phones and smart watches, and the applicable port types include but are not limited to web terminals and APP terminals.
[0068] In order to further illustrate the technical means adopted by this application and the effects achieved, the technical solution of this application is clearly and completely described below in combination with the accompanying drawings and preferred embodiments.
[0069] Figure 1 A method for GPS deviation correction provided in one aspect of the present application is shown, wherein the method includes:
[0070] S11: The terminal requests GPS positioning point information from the server according to a preset period;
[0071] S12: The server receives the request sent by the terminal and sends the GPS positioning information to the terminal according to the request of the terminal;
[0072] S13: The terminal determines, starting from the marked turning point of the preset navigation route according to the GPS positioning point information sent by the server, an adjacent turning point closest to the GPS positioning point, wherein the marked turning point is initially the starting point of the preset navigation route;
[0073] S14: The terminal calculates the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the near turning point;
[0074] S15: The terminal updates the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point, and uses the projection point with the closest distance as the correction result of the GPS positioning point.
[0075] In this embodiment, in step S11, the terminal requests GPS positioning point information from the server according to a preset period.
[0076] Here, in order to achieve smooth display of GPS positioning points on the terminal, the terminal should send GPS positioning point information requests to the server at a high frequency. For example, the request can be sent to the server at a periodic frequency of once per second.
[0077] In this embodiment, in step S12, the server receives the request sent by the terminal and sends the GPS positioning information to the terminal according to the request of the terminal.
[0078] Here, to ensure that the terminal can directly perform deviation correction according to the technical solution of this application based on the received GPS positioning information, the data format of the GPS positioning information sent by the server should be consistent with the data format of the inflection point information stored by the terminal to avoid unnecessary format conversion. For example, the GPS positioning information sent by the server and the inflection point information stored by the terminal are both in GeoJson format.
[0079] In this embodiment, in step S13, the terminal determines the nearest turning point from the marked turning point of the preset navigation route based on the GPS positioning point information sent by the server, wherein the marked turning point is initially the starting point of the preset navigation route.
[0080] Here, a marked inflection point is set. This marked inflection point represents the starting position of the correction process for the current GPS positioning point. For example, if the correction result of the GPS positioning point in the previous cycle is located on the navigation segment formed by the fifth and sixth inflection points of the preset navigation route, the marked inflection point is now the fifth inflection point. That is, the navigation segment before the fifth inflection point has been completely traversed and no longer needs to participate in the subsequent GPS positioning point correction process. Therefore, the GPS positioning point in the current cycle starts traversal calculation and correction from the fifth inflection point. In this way, while greatly reducing the amount of correction calculation, it also avoids the impact of the navigation segment that has been completely traversed on the correction task.
[0081] Continuing with this step, one feasible approach is to determine the proximate inflection point by traversing each inflection point after the marked inflection point, calculating the distance between the traversed inflection point and the GPS positioning point, and selecting the inflection point with the smallest distance as the proximate inflection point. By determining the proximate inflection point closest to the GPS positioning point, the area to which the GPS positioning point belongs on the preset navigation route is preliminarily determined, allowing the deviation correction process to be carried out in stages, reducing the complexity of the correction problem.
[0082] Preferably, according to different categories of marked inflection points, targeted determination of adjacent inflection points is performed in an optimized manner:
[0083] When the marked turning point is the starting point of the preset navigation route, wherein, starting from the marked turning point of the preset navigation route, determining the adjacent turning point closest to the GPS positioning point includes: calculating the distance between the starting point of the preset navigation route and the second turning point in the preset navigation route and the GPS positioning point; if the distance corresponding to the starting point is greater than or equal to the distance corresponding to the second turning point, then determining the second turning point as the adjacent turning point; otherwise, if the distance corresponding to the starting point is less than the distance corresponding to the second turning point, then determining the starting point as the adjacent turning point.
[0084] Here, when the marked turning point is the starting point of the preset navigation route, it means that the GPS positioning point is still on the first line segment connected to the starting point. Then, it is only necessary to determine the adjacent turning point based on the first two turning points of the preset navigation route, that is: calculate the distance from the GPS positioning point to the starting point and the second turning point in the preset navigation route. If the distance from the GPS positioning point to the starting point is closer, then the starting point can be determined as the adjacent turning point; conversely, if the distance from the GPS positioning point to the second turning point is closer, then the second turning point is used as the adjacent turning point.
[0085] When the marked turning point is a turning point before the end point of the preset navigation route, wherein, starting from the marked turning point of the preset navigation route, determining the adjacent turning point closest to the GPS positioning point includes: determining the end point of the preset navigation route as the adjacent turning point.
[0086] Here, when the marked turning point is the turning point before the end of the preset navigation route, it means that the area to which the GPS positioning point belongs is only the last navigation segment, and the remaining navigation segments have been completely traversed. The correction result of all GPS positioning points in this cycle and subsequent cycles is the point closest to the last navigation segment from the GPS positioning point. Navigation ends until the correction result is the end of the preset navigation route. Therefore, there is no need to pay attention to whether the GPS positioning point is closer to the end point or the turning point before the end point. To further reduce unnecessary calculations, the end point of the preset navigation route can be directly determined as the adjacent turning point.
[0087] When the marked turning point does not fall into the above situation, determining the adjacent turning point closest to the GPS positioning point starting from the marked turning point of the preset navigation route includes: traversing each turning point in order according to the preset navigation route starting from the marked turning point; starting from the traversed turning point, calculating the distance between the traversed turning point and the two turning points before and after it and the GPS positioning point; if the distance corresponding to the traversed turning point is less than the distance corresponding to the turning points before and after it, determining the traversed turning point as the adjacent turning point; otherwise, continuing the traversal.
[0088] Here, the present application provides a simplified method for determining adjacent turning points. Among the three consecutive turning points of the preset navigation route, if the distance between the turning point in the middle and the GPS positioning point is the smallest, it can be said that on the entire preset navigation route, this turning point is the adjacent turning point closest to the GPS positioning point. Here, marking the turning point determines the starting position for calculating the adjacent turning point, and the above judgment rule determines the termination condition for calculating the adjacent turning point. Therefore, compared with the method of traversing and calculating the distance of all turning points from the GPS positioning point and then comparing them, this method greatly reduces the amount of calculation, improves the speed of correction, and helps to achieve smooth and uninterrupted accurate positioning display.
[0089] In summary, this application designs a targeted method for determining adjacent inflection points based on the different types of marked inflection points, which greatly reduces the amount of calculation and improves the correction speed.
[0090] Preferably, it is determined whether the GPS positioning point is on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent turning point; if so, the GPS positioning point is directly used as the correction result.
[0091] Here, in order to reduce unnecessary operations, it is pre-determined whether the GPS positioning point is on the preset navigation route, specifically, whether it is on the first navigation line segment and / or the second navigation line segment connected sequentially before and after the turning point. If it is on the first navigation line segment and / or the second navigation line segment, it means that the GPS positioning point has not deviated. Therefore, there is no need for subsequent correction work. In this way, the quality of the GPS positioning points is screened, and only the GPS positioning points that have deviated are corrected, thereby avoiding unnecessary correction processes and improving the positioning point display speed of the terminal.
[0092] In this embodiment, in step S14, the terminal calculates the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent turning point.
[0093] When the GPS positioning point is offset, the possible correction results are determined according to this method. Here, the determination of the adjacent inflection point means determining the actual area of the GPS positioning point on the preset navigation route, that is, it should be on the first navigation segment and / or the second navigation segment connected in sequence before and after the adjacent inflection point in the preset navigation route. The first navigation segment is the navigation segment before the adjacent inflection point, and the second navigation segment is the navigation segment after the adjacent inflection point. It can be understood that if the adjacent inflection point of the GPS positioning point is the starting point of the preset navigation route, the first navigation segment is empty, then the GPS positioning point should actually be on the second navigation segment; if the adjacent inflection point of the GPS positioning point is the end point of the preset navigation route, the second navigation segment is empty, then the GPS positioning point should actually be on the first navigation segment.
[0094] Continuing with this step, after determining the navigation segment where the GPS positioning point should actually be located, the GPS positioning point needs to be corrected to the navigation segment. The correction result of the GPS positioning point should be the point on the navigation segment that is closest to the GPS positioning point (i.e., the projection point). When the adjacent inflection point of the GPS positioning point is the starting point of the preset navigation route, the first navigation segment is empty, that is, the correction result should be the second projection point on the second navigation segment that is closest to the GPS positioning point; if the adjacent inflection point of the GPS positioning point is the end point of the preset navigation route, the second navigation segment is empty, that is, the correction result should be the first projection point on the first navigation segment that is closest to the GPS positioning point; when there are the first and second navigation segments connected sequentially near the inflection point, the GPS positioning point may actually be on the first or second navigation segment, that is, the correction result should be the one of the first and second projection points that is closer to the GPS positioning point.
[0095] In an implementable manner, the process of determining the projection point is as follows: Determine the coordinates of the GPS positioning point as (x, y) according to the GPS positioning point information, and determine the coordinates of the two endpoints of the navigation line segment where the GPS positioning point should actually be located according to the preset navigation route and the saved inflection point information. For example, if the rectification result of the GPS positioning point should be the first projection point on the first navigation line segment that is closest to the GPS positioning point, then determine the coordinates (x n , y n ) of the inflection point near it and the coordinates (x n-1 , y n-1 ) of the previous inflection point, and determine the first projection point according to the following formula:
[0096] cross = (x n - x n-1 )(x - x n-1 ) + (y n - y n-1 [[ID=2l]])(y - y n-1 ) (1)
[0097] dt = (x n - x n-1 )) 2 + (y n - y n-1 ) 2 (2)
[0098]
[0099]
[0100] If cross ≤ 0, it indicates that the foot of the perpendicular from the GPS positioning point to the first navigation line segment is not on the first navigation line segment and is closer to the inflection point coordinates (x n-1 , y n-1 ), then determine the first projection point as (x n-1 , y n-1 );
[0101] If cross ≥ dt, it indicates that the foot of the perpendicular from the GPS positioning point to the first navigation line segment is not on the first navigation line segment and is closer to the inflection point coordinates (x n , y n ), then determine the first projection point as (x : n , y n );
[0102] If 0 < cross < dt, it indicates that the foot of the perpendicular from the GPS positioning point to the first navigation line segment is on the first navigation line segment, then the first projection point is (lng, lat).
[0103] <000,0258>It should be understood that this is only an example of the correction result being the first projection point. The correction results can be calculated in the same manner as described above for other scenarios. Furthermore, this application does not restrict the method for determining the closest point from a point to a line segment. This method is used as an example only. Other methods that can calculate the closest point from a point to a line segment are all within the scope of protection of this application.
[0104] In this embodiment, in step S15, the terminal updates the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point, and uses the projection point with the closest distance as the correction result of the GPS positioning point.
[0105] Here, since the projection point represents the point on the navigation segment that is closest to the GPS positioning point, it can be understood that the distance between the projection point and the GPS positioning point represents the shortest distance from the GPS positioning point to the navigation segment. When the correction result of the GPS positioning point is on the first navigation segment or the second navigation segment connected sequentially, the GPS positioning point should be corrected to the navigation segment with the shortest distance, and the marked inflection point should be the starting point of this navigation segment. For example, when the distance from the first projection point to the GPS positioning point is greater than the distance from the second projection point to the GPS positioning point, it means that the first navigation segment and the navigation segment before it have been walked. Therefore, after the terminal obtains the GPS positioning point information of the next cycle, it continues to traverse and correct the deviation from the marked inflection point based on the previous correction result.
[0106] like Figure 3 As shown, the current marked turning point is A, the adjacent turning point is B, and the GPS positioning point position of the current cycle is P1. Then the first navigation line segment is AB, and the perpendicular from P1 to AB is P 11 , P 11 On line segment AB, therefore, the first projection point is P 11 ; The second navigation line segment is BC, and the foot of the perpendicular from P1 to AB is P 12 , P 12 It is not on line segment BC and is closer to B, so the second projection point is B. 11 The distance between P1 and B is less than the distance between P1 and B. Therefore, the GPS positioning point should be corrected to the first navigation line segment AB, keeping the marked turning point A, and P 11 As a result of the correction. Figure 4 As shown, the GPS positioning point position of the next cycle is P2, and the perpendicular foot of P2 to the first navigation line segment AB is P 21 , P 21 It is not on line segment AB and is closer to B. Therefore, the first projection point is B. The foot of the perpendicular from P2 to the second navigation line segment BC is P. 22 , P 22 On line segment BC, therefore, the second projection point is P 22, since the distance from P2 to B is greater than the distance from P2 to P 22 Therefore, the GPS positioning point should be corrected to the second navigation line segment BC, and the marked turning point should be updated to B, and P 22 As a result of correction.
[0107] By setting the update method of the marked inflection points, the correction work of the GPS positioning points in each cycle will continue with the correction results of the previous cycle, minimizing unnecessary calculation work and greatly improving the correction speed. This allows for rapid positioning point correction and display on the terminal, ensuring smooth and uninterrupted display even in high-speed vehicle navigation scenarios.
[0108] Preferably, updating the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point includes: if the distance from the first projection point to the GPS positioning point is greater than or equal to the distance from the second projection point to the GPS positioning point, then using the adjacent inflection point as the updated marked inflection point, and using the second projection point as the correction result of the GPS positioning point; otherwise, keeping the marked inflection point unchanged, and using the projection point with the closest distance as the correction result of the GPS positioning point.
[0109] Here, the present application provides a specific method for updating the marked inflection point. When the distance from the first projection point to the GPS positioning point is less than the distance from the second projection point to the GPS positioning point, it means that the vehicle is still traveling on the first navigation line segment. Therefore, the marked inflection point is kept unchanged, so that the correction work of the next cycle still starts from the first navigation line segment; when the distance from the first projection point to the GPS positioning point is greater than the distance from the second projection point to the GPS positioning point, it means that the vehicle has completely passed through the first navigation line segment. Therefore, the marked inflection point is moved back to a position close to the inflection point, so that the correction process of the next cycle starts from the second navigation line segment; when the distance from the first projection point to the GPS positioning point is equal to the distance from the second projection point to the GPS positioning point, as shown in FIG. Figure 5 As shown, it means that the first navigation line segment AB has just passed. Then the next cycle of correction work should start from the second navigation line segment BC. Therefore, in this case, the marked inflection point is updated from A to B, and the second projection point P is 23 As a result of correction.
[0110] The method for updating the marked turning points provided by the present application only needs to determine the distances from the first projection point and the second projection point to the GPS positioning point to update the marked turning points and screen similar projection points. However, when faced with two or more possible correction results for a GPS positioning point, the existing technology often requires additional equipment or components such as auxiliary motion sensors to determine the correction results based on the movement direction of the navigation terminal, which greatly increases the cost of the correction work. At the same time, the time required for collecting and analyzing data is much longer than the time required for data comparison. Therefore, the method for updating the marked turning points of the present application not only eliminates redundant calculations for navigation routes that have been traveled, but also provides a basis for screening similar correction results. While reducing the amount of calculation, accurate GPS correction is achieved, and the additional cost required for auxiliary external equipment or integrated additional components is avoided. A fast and low-cost GPS correction method is achieved, which can achieve smooth and uninterrupted accurate positioning point display in the navigation terminal.
[0111] Moreover, according to the above analysis, the server side only needs to receive requests and send GPS positioning information. The small amount and simple multi-terminal interaction means that there is no need to spend too much time on multi-terminal transmission, saving time costs. At the same time, most of the calculation operations are performed on the terminal, and due to the setting of marking inflection points and traversal rules (that is, the method of determining adjacent inflection points), the terminal performs all calculations of the correction process based on the navigation segment where the GPS positioning point is located and the two navigation segments before and after it. The amount of calculation is very small, so that the positioning point can be displayed quickly and directly on the terminal. At the same time, the terminal does not need to assist with any external equipment or integrate additional components, reducing the application cost.
[0112] In a preferred embodiment, see Figure 2 ,in, Figure 2 Steps S24, S25, S27, and S28 in Figure 1 Steps S11, S12, S14, and S15 in the embodiment are the same or substantially the same, and are therefore not described in detail herein, but are incorporated herein by reference. Step S21 includes: the terminal sending the recorded inflection point information and the buffer radius information to the server.
[0113] The buffer radius is a preset distance for the terminal, indicating acceptable deviations within a certain range from the preset navigation route. If the GPS position exceeds this range, the deviation is too large and no correction or display is required. In actual application scenarios, the specific value of the buffer radius is set based on the preset navigation route and the specific navigation scenario.
[0114] The step S22 includes: the server side determines a buffer zone according to the inflection point information and the buffer radius information.
[0115] Here, the inflection point information represents the complete preset navigation route. The server determines a buffer zone based on the inflection point information and the buffer radius information. GPS positioning points within this buffer zone are all valid positioning points with acceptable offsets. Furthermore, algorithms for determining the buffer zone include, but are not limited to, the convex arc method, which is not intended to be limiting in this application. Any algorithm capable of determining a line buffer zone is within the scope of this application.
[0116] The step S23 includes: the server sends the buffer data to the terminal.
[0117] Furthermore, the step S26 includes: the terminal determines whether the GPS positioning point is in the buffer according to the buffer data and the GPS positioning point information; and determines the nearest turning point from the marked turning point of the preset navigation route according to the positioning point information in the buffer sent by the server.
[0118] Here, the terminal determines whether the GPS location point is within the buffer based on the buffer data and GPS location point information. To facilitate calculations, the buffer data format should be the same as the GPS location point data format. For example, both can use the GeoJSON format to avoid unnecessary data format conversion. After obtaining the buffer data, the terminal can use the ray method to determine whether the GPS location point is within the buffer. Furthermore, because the ray method determines whether a point is within a surface area based on the area boundary, the server saves the buffer as a surface element and sends it to the terminal, allowing the terminal to use the ray method to determine whether the GPS point is a valid location point within the buffer. If the GPS location point is within the buffer, the aforementioned method can be used to determine the proximity of the inflection point and perform subsequent deviation correction. If the GPS location point is not within the buffer, it indicates that the GPS point's offset is unacceptable and is an invalid location point due to excessive deviation during navigation. Therefore, the location point is discarded and the next cycle of GPS location point information is awaited for correction and display. It should be made clear that the periodic interval for obtaining GPS positioning point information is relatively small, generally at the second level. For example, GPS positioning point information is requested once per second. Therefore, the abandonment of individual GPS positioning points will not have a significant impact on the positioning point display on the terminal. Under normal circumstances, users cannot perceive the blankness of individual cycles. Here, if GPS positioning points with excessive offsets are also corrected and displayed, it will cause flash points inconsistent with the navigation process during the terminal display process. Therefore, by setting a buffer, the adverse effects of invalid GPS positioning points with excessive offsets on the correction work are eliminated, while ensuring smooth display and optimizing the terminal display effect.
[0119] In addition, an embodiment of the present application further provides a computer-readable medium on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the aforementioned method.
[0120] The embodiment of the present application further provides a terminal device for GPS deviation correction, wherein the device includes:
[0121] one or more processors; and
[0122] A memory storing computer-readable instructions that, when executed, cause the processor to perform the operations of the aforementioned method.
[0123] For example, when the computer-readable instructions are executed, the one or more processors may: request GPS location information from a server according to a preset period;
[0124] Determine, based on the GPS positioning point information sent by the server, a nearby turning point closest to the GPS positioning point starting from a marked turning point of the preset navigation route, wherein the marked turning point is initially the starting point of the preset navigation route;
[0125] Calculate the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the inflection point respectively;
[0126] The marked inflection point is updated according to the distances from the first projection point and the second projection point to the GPS positioning point, and a correction result of the GPS positioning point is determined.
[0127] The embodiment of the present application further provides a server-side device for GPS deviation correction, wherein the device includes:
[0128] one or more processors; and
[0129] A memory storing computer-readable instructions that, when executed, cause the processor to perform the operations of the aforementioned method.
[0130] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the invention is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalents of the claims be encompassed within the present invention. Any figure marks in the claims should not be regarded as limiting the claims involved. In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim may also be implemented by one unit or device through software or hardware. Words such as first and second are used to indicate names and do not indicate any particular order.
Claims
1. A method for GPS deviation correction in a terminal, wherein: The terminal stores a preset navigation route having multiple turning points and records the turning point information. The method includes: Request GPS positioning point information from the server according to the preset period; Based on the GPS positioning point information sent by the server, starting from the marked turning point of the preset navigation route, determining the nearest adjacent turning point to the GPS positioning point, wherein the preset navigation route is sequentially traversed through each turning point, starting from the traversed turning point, calculating the distance between the traversed turning point and the two turning points before and after it and the GPS positioning point; if the distance corresponding to the traversed turning point is less than the distance corresponding to the turning points before and after it, then determining the traversed turning point as the adjacent turning point; otherwise, continuing the traversal, wherein the marked turning point is initially the starting point of the preset navigation route; Calculate the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the inflection point respectively; The marked inflection point is updated according to the distances from the first projection point and the second projection point to the GPS positioning point, and a correction result of the GPS positioning point is determined.
2. The method according to claim 1, wherein: The updating of the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point and determining the correction result of the GPS positioning point includes: If the distance from the first projection point to the GPS positioning point is greater than or equal to the distance from the second projection point to the GPS positioning point, the adjacent inflection point is used as the updated marked inflection point, and the second projection point is used as the correction result of the GPS positioning point; otherwise, The marked inflection point is kept unchanged, and the nearest projection point is used as the correction result of the GPS positioning point.
3. The method according to claim 1 or 2, wherein if the marked turning point is the starting point of the preset navigation route, The step of determining the nearest inflection point from the marked inflection point of the preset navigation route comprises: Calculating the distance between the starting point of the preset navigation route and the second turning point in the preset navigation route and the GPS positioning point; If the distance corresponding to the starting point is greater than or equal to the distance corresponding to the second inflection point, the second inflection point is determined as the adjacent inflection point; otherwise, If the distance corresponding to the starting point is less than the distance corresponding to the second inflection point, the starting point is determined as the adjacent inflection point; The step of respectively calculating the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent inflection point comprises: Calculate a second projection point closest to the GPS positioning point on a second navigation line segment connected after the adjacent inflection point; Wherein, updating the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point and determining the correction result of the GPS positioning point includes: The marked inflection point is kept unchanged, and the second projection point is used as the correction result of the GPS positioning point.
4. The method according to claim 1 or 2, wherein if the marked turning point is the turning point before the end point of the preset navigation route, The step of determining the nearest inflection point from the marked inflection point of the preset navigation route comprises: Determining the end point of the preset navigation route as the adjacent turning point; The step of respectively calculating the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent inflection point comprises: Calculate the first projection point closest to the GPS positioning point on the first navigation line segment connected before the near inflection point; Wherein, updating the marked inflection point according to the distances from the first projection point and the second projection point to the GPS positioning point and determining the correction result of the GPS positioning point includes: Keeping the marked inflection point unchanged, and using the first projection point as the correction result of the GPS positioning point; Repeat the above steps until the deviation correction result is the end point of the preset navigation route.
5. The method according to claim 1, wherein The step of respectively calculating the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent inflection point also includes: Determining whether the GPS positioning point is on a first navigation line segment and / or a second navigation line segment sequentially connected before and after the adjacent turning point; If yes, the GPS positioning point is directly used as the correction result.
6. The method according to claim 1, wherein Before requesting GPS positioning point information from the server according to the preset period, the method further includes: Pre-set buffer radius; Sending the recorded inflection point information and the buffer radius information to the server; Receive the buffer data returned by the server; The method further includes determining the nearest inflection point from the marked inflection point of the preset navigation route based on the GPS positioning point information sent by the server: Determine whether the GPS positioning point is in the buffer zone according to the buffer zone data and the GPS positioning point information; If not, the GPS positioning point is discarded, and the GPS positioning point information is requested from the server in the next preset period.
7. The method according to claim 6, wherein: Determining whether the GPS positioning point is in the buffer zone includes: According to the buffer zone data and GPS positioning point information, the ray method is used to determine whether the GPS positioning point is in the buffer zone.
8. A method for GPS deviation correction on a server side, wherein: The method comprises: Receive the request sent by the terminal; GPS positioning information is sent to the terminal according to the request of the terminal, so that the terminal determines the nearest adjacent turning point to the GPS positioning point based on the GPS positioning point information, starting from the marked turning point of the preset navigation route, wherein each turning point is traversed in sequence according to the preset navigation route, and starting from the traversed turning point, the distance between the traversed turning point and the two turning points before and after it and the GPS positioning point is calculated; if the distance corresponding to the traversed turning point is less than the distance corresponding to the turning points before and after it, the traversed turning point is determined as the adjacent turning point, otherwise, the traversal is continued, wherein the marked turning point is initially the starting point of the preset navigation route; the first projection point and / or the second projection point closest to the GPS positioning point on the first navigation line segment and / or the second navigation line segment sequentially connected before and after the adjacent turning point are calculated respectively; the marked turning point is updated according to the distance from the first projection point and the second projection point to the GPS positioning point, and the correction result of the GPS positioning point is determined.
9. The method according to claim 8, wherein The method further comprises: receiving inflection point information and buffer radius information sent by the terminal; A buffer zone is determined according to the inflection point information and the buffer radius information, and buffer zone data is sent to the terminal.
10. The method according to claim 9, wherein: The buffer data is stored in the form of area elements, and the data format is the same as the data format of GPS positioning point information.
11. The method according to claim 10, wherein: The algorithm for determining the buffer zone according to the inflection point information and the buffer radius information includes a convex arc method.
12. A computer-readable medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 11.
13. A terminal device for GPS deviation correction, wherein: The device includes: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method of any one of claims 1 to 7.
14. A server-side device for GPS deviation correction, wherein: The device includes: one or more processors; and A memory storing computer readable instructions which, when executed, cause the processor to perform the operations of the method of any one of claims 8 to 11.
Citation Information
Patent Citations
Bus positioning method and equipment
CN113613176A