Positioning track display method and system and electronic equipment
By calculating the frequency relationship between positioning equipment and display equipment to generate complementary points, the problems of trajectory data distortion and unsmooth animation are solved, and smooth and smooth trajectory display is achieved, improving the user experience.
Patent Information
- Application Number
- CN202510865100.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-26
- Publication Date
- 2025-07-29
AI Technical Summary
When the prior art spans areas with large latitude and longitude, the plane projection of the trajectory data causes distortion, affecting the display effect and analysis accuracy, and the track frame animation on the web map is not smooth, affecting the user experience.
By calculating the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device, determining the adjacent positioning points and the number of interpolated segments, generating complementary points, taking into account the influence of the earth's curvature, increasing the trajectory sampling density, and generating smooth trajectory animations.
Improve the visual effect and user experience of trajectory display, avoid trajectory distortion, and ensure the smoothness of animation.
Smart Images

Figure CN120385356A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of trajectory processing, and more particularly to a method, system and electronic device for displaying a positioning trajectory. Background Art
[0002] In the usage scenarios of positioning devices such as garbage collection and transfer vehicles, personnel, and mechanical operations, the trajectory data of vehicles or personnel is often used for purposes such as analysis and visualization. Traditional methods often directly project the trajectory data onto a planar map for intuitive display. However, in some cases, especially in areas with a large span of longitude and latitude, since the earth's surface is spherical rather than planar, this projection method will cause the trajectory to be distorted near the poles or the equator, thus affecting the display effect of the trajectory and the accuracy of analysis. In addition, when displaying the trajectory on a web map, due to factors such as network transmission speed and device performance, the trajectory frame animation often appears jerky, affecting the user experience. Summary of the Invention
[0003] In view of this, an object of the present invention is to provide a method, system and electronic device for displaying a positioning trajectory. This method calculates the number of supplementary points corresponding to the movement trajectory based on the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device, thereby increasing the sampling density of the movement trajectory, being able to generate a smoother trajectory animation, and being able to consider the influence of the earth's curvature during the generation of supplementary points, thus solving the above problems existing in the prior art.
[0004] In a first aspect, an embodiment of the present invention provides a method for displaying a positioning trajectory, the method comprising: Obtaining the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device; Determining adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and determining the movement trajectory of the positioning device according to the distance between adjacent positioning points; Calculating the number of interpolation segments between adjacent positioning points according to the positioning information acquisition frequency and the screen refresh frequency, and calculating the number of supplementary points between adjacent positioning points using the number of interpolation segments; Determining the position coordinates and generation order of supplementary points in the movement trajectory using the number of supplementary points, and controlling each supplementary point to be sequentially displayed from the movement trajectory according to the position coordinates and generation order of the supplementary points.
[0005] Optionally, determining adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and determining the movement trajectory of the positioning device according to the distance between adjacent positioning points, includes: Determining the positioning information acquisition time interval of the positioning device according to the positioning information acquisition frequency; Determine the starting positioning point and the ending positioning point corresponding to the positioning information based on the time interval of positioning information collection, and determine the starting positioning point and the ending positioning point as adjacent positioning points; Calculate the distance between the starting positioning point and the ending positioning point among the adjacent positioning points, and obtain the motion trajectory between the starting positioning point and the ending positioning point based on the distance.
[0006] Optionally, calculating the distance between the starting positioning point and the ending positioning point among the adjacent positioning points includes: Obtain the longitude and latitude corresponding to the starting positioning point and the ending positioning point from a preset map page; Calculate the spherical distance between the starting positioning point and the ending positioning point according to the longitude and latitude; the spherical distance is calculated through the following formula: ; Wherein, is the distance; is the radius of the earth; is the latitude corresponding to the starting positioning point, is the latitude corresponding to the ending positioning point, in radians; is the longitude corresponding to the starting positioning point, is the longitude corresponding to the ending positioning point, in radians.
[0007] Optionally, calculating the number of interpolation segments between adjacent positioning points according to the positioning information collection frequency and the screen refresh frequency includes: Obtain the first frequency value corresponding to the positioning information collection frequency and the second frequency value corresponding to the screen refresh frequency; Through the first frequency value and the second frequency value, calculate the number of interpolation segments using the interpolation segment number calculation formula; wherein, the interpolation segment number calculation formula is: ; Wherein, is the number of interpolation segments; is the first frequency value; is the second frequency value.
[0008] Optionally, calculating the number of supplementary points between adjacent positioning points using the number of interpolation segments includes: Judge whether the second frequency value can be divided evenly by the first frequency value; If so, the number of supplementary points is equal to the number of interpolation segments minus 1; if not, the number of supplementary points is equal to the number of interpolation segments.
[0009] Optionally, determining the coordinate of the supplementary point position and the generation order of the supplementary points in the motion trajectory using the number of supplementary points includes: Obtain the spherical distance between the starting positioning point and the ending positioning point and the number of supplementary points; The segment spacing between each filling point is determined according to the ratio of the spherical spacing to the number of filling points; Determine the patch point position of each patch point on the map page based on the segment spacing, and obtain the patch point position coordinates corresponding to the patch point position; The generation order of the supplementary points corresponding to each supplementary point is determined by using the movement directions corresponding to the starting positioning point and the ending positioning point.
[0010] Optionally, the location of each patch point on the map page is determined based on the segment spacing, and the coordinates of the patch point location corresponding to the patch point location are obtained, including: According to the movement directions corresponding to the starting positioning point and the ending positioning point, the first supplementary point adjacent to the starting positioning point is determined using the segment spacing, and the first supplementary point position coordinates and the first rotation angle corresponding to the first supplementary point are obtained; According to the first rotation angle, a second patch point adjacent to the first patch point is determined using the segment spacing, and the second patch point position coordinates and the second rotation angle corresponding to the second patch point are obtained, until the patch point position coordinates corresponding to all patch point positions are obtained.
[0011] Optionally, each patch point is displayed sequentially from the motion trajectory according to the patch point position coordinates and the patch point generation order, including: Obtaining display parameters corresponding to the display device, and determining a display strategy for the display device using the display parameters and a patch point generation order; wherein each patch point under the display strategy can be displayed in a display frame corresponding to the display device; The display strategy is used to control each patch point to be displayed in sequence in the display frame corresponding to the display device according to the corresponding patch point position coordinates.
[0012] In a second aspect, the present invention provides a positioning trajectory display system, the system comprising: Frequency data acquisition module, used to obtain the positioning information collection frequency of the positioning device and the screen refresh frequency of the display device; A motion trajectory determination module is used to determine adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and to determine the motion trajectory of the positioning device based on the spacing between adjacent positioning points; A module for calculating the number of supplementary points is used to calculate the number of interpolation segments between adjacent positioning points based on the positioning information acquisition frequency and the screen refresh frequency, and to calculate the number of supplementary points between adjacent positioning points using the number of interpolation segments; The motion trajectory display module is used to determine the position coordinates and generation order of the supplementary points in the motion trajectory using the number of supplementary points, and control each supplementary point to be displayed in sequence from the motion trajectory according to the position coordinates and generation order of the supplementary points.
[0013] In a third aspect, an embodiment of the present invention further provides an electronic device, including a processor and a memory, wherein the memory stores computer-executable instructions that can be executed by the processor, and the processor executes the computer-executable instructions to implement the steps of the positioning trajectory display method provided in the first aspect.
[0014] In a fourth aspect, an embodiment of the present invention further provides a storage medium storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the steps of the positioning trajectory display method provided in the first aspect.
[0015] The present invention provides a positioning trajectory display method, system, and electronic device. In displaying the motion trajectory of a related positioning device, the method first obtains the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device. Next, based on the positioning information acquisition frequency, the method determines the adjacent positioning points corresponding to the positioning device, and determines the motion trajectory of the positioning device based on the spacing between the adjacent positioning points. Subsequently, the number of interpolation segments between adjacent positioning points is calculated based on the positioning information acquisition frequency and the screen refresh frequency, and the number of supplementary points between adjacent positioning points is calculated using the number of interpolation segments. Finally, the number of supplementary points is used to determine the position coordinates and generation order of the supplementary points in the motion trajectory, and each supplementary point is displayed sequentially from the motion trajectory based on the position coordinates and generation order of the supplementary points. This method uses the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device to calculate the number of supplementary points corresponding to the motion trajectory, thereby increasing the sampling density of the motion trajectory, generating a smoother trajectory animation, and taking into account the influence of the earth's curvature during the supplementary point generation process, thereby resolving the aforementioned problems existing in the prior art.
[0016] Other features and advantages of the present invention will be described in the following description, and in part will become apparent from the description, or understood by practicing the present invention. The purposes and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0017] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 A flowchart of a positioning trajectory display method provided by an embodiment of the present invention; Figure 2 This is a flowchart of step S102 in a positioning trajectory display method provided by an embodiment of the present invention; Figure 3 A flowchart of calculating the distance between the starting and ending positioning points in adjacent positioning points in step S203 of a positioning trajectory display method provided by an embodiment of the present invention; Figure 4 This is a flowchart of calculating the number of interpolation segments between adjacent positioning points based on the positioning information acquisition frequency and the screen refresh frequency in step S103 of a positioning trajectory display method provided by an embodiment of the present invention; Figure 5 A flowchart of calculating the number of supplementary points between adjacent positioning points using the number of interpolation segments in step S103 of a positioning trajectory display method provided by an embodiment of the present invention; Figure 6 A flowchart of determining the position coordinates and the order of generating the supplementary points in the motion trajectory using the number of supplementary points in step S104 of a positioning trajectory display method provided by an embodiment of the present invention; Figure 7 Flowchart of step S603 of a positioning trajectory display method provided by an embodiment of the present invention; Figure 8 A flowchart of controlling the sequential display of each supplementary point from the motion trajectory according to the supplementary point position coordinates and the supplementary point generation order in step S104 of a positioning trajectory display method provided by an embodiment of the present invention; Figure 9 This is a rendering of a positioning trajectory display method provided by an embodiment of the present invention; Figure 10 A schematic structural diagram of a positioning trajectory display system provided by an embodiment of the present invention; Figure 11 A schematic structural diagram of an electronic device provided by an embodiment of the present invention.
[0020] icon: 1010 - frequency data acquisition module; 1020 - motion trajectory determination module; 1030 - supplementary point quantity calculation module; 1040 - motion trajectory display module; 101 - processor; 102 - memory; 103 - bus; 104 - communication interface. DETAILED DESCRIPTION
[0021] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0022] In the usage scenarios of positioning devices such as garbage collection and transfer vehicles, personnel, and mechanical operations, the trajectory data of vehicles or personnel is often used for purposes such as analysis and visualization. Traditional methods often directly project the trajectory data onto a planar map for intuitive display. However, in some cases, especially in areas with large latitudes and longitudes, since the Earth's surface is spherical rather than planar, this projection method will cause the trajectory to distort near the poles or the equator, thus affecting the display effect of the trajectory and the accuracy of analysis. In addition, when displaying the trajectory on a web map, due to factors such as network transmission speed and device performance limitations, the trajectory frame animation often appears unsmooth, affecting the user experience. Based on this, the embodiments of the present invention provide a positioning trajectory display method, system, and electronic device. This method calculates the number of supplementary points corresponding to the movement trajectory using the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device, thereby increasing the sampling density of the movement trajectory, being able to generate a smoother trajectory animation, and being able to consider the influence of the Earth's curvature during the generation of supplementary points, thus enhancing the user experience.
[0023] To facilitate the understanding of this embodiment, first, a positioning trajectory display method disclosed in the embodiments of the present invention will be introduced in detail, as Figure 1 shown, this method includes: Step S101, obtain the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device.
[0024] First, it is necessary to obtain the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device. The positioning information acquisition frequency refers to the time interval at which the positioning device collects position data. For example, the GPS module may collect position information 1 time or 10 times per second. The screen refresh frequency is the frequency at which the display device updates the screen, commonly 60Hz, 120Hz, etc. These two frequency parameters are important bases for subsequent calculations. Generally, the human eye considers that the frequency at which the positioning trajectory can be smoothly displayed is 24 frames per second. Therefore, the screen refresh frequency is generally not lower than 24Hz to ensure the smooth display of the positioning trajectory.
[0025] Step S102, determine the adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and determine the movement trajectory of the positioning device according to the distance between the adjacent positioning points.
[0026] Since the positioning device collects data at regular time intervals, the positioning points obtained from two adjacent collections are adjacent positioning points. Then, the movement trajectory of the positioning device is determined according to the distance between adjacent positioning points. If the distance between adjacent positioning points is small, it indicates that the positioning device moves slowly; if the distance is large, it indicates that the movement is fast. By connecting these adjacent positioning points in sequence, the movement trajectory of the positioning device can be initially outlined.
[0027] Step S103: Calculate the number of interpolation segments between adjacent positioning points according to the positioning information collection frequency and the screen refresh frequency, and calculate the number of supplementary points between adjacent positioning points by using the number of interpolation segments.
[0028] Calculate the number of interpolation segments between adjacent positioning points according to the positioning information collection frequency and the screen refresh frequency. If the positioning information collection frequency is 1 Hz (i.e., it is collected once per second, and the time interval between adjacent positioning points is 1 second), and the screen refresh frequency is 24 Hz (i.e., it is refreshed 24 times per second, and the time interval for each refresh is 1 / 24 second), then between two adjacent positioning points, the screen will be refreshed 24 times, and the number of interpolation segments is 24. The number of supplementary points can be calculated by using the number of interpolation segments. The number of supplementary points is usually equal to the number of interpolation segments minus 1, that is, 23.
[0029] Step S104: Determine the position coordinates and generation order of the supplementary points in the movement trajectory by using the number of supplementary points, and control each supplementary point to be sequentially displayed from the movement trajectory according to the position coordinates and generation order of the supplementary points.
[0030] Specifically, the position coordinates of the supplementary points can be calculated by methods such as linear interpolation. For example, supplementary points are evenly inserted between two adjacent positioning points. The generation order of the supplementary points is the order in which the supplementary points are sequentially displayed. Control each supplementary point to be sequentially displayed from the movement trajectory according to the position coordinates and generation order of the supplementary points. In this way, a smooth movement trajectory of the positioning device can be seen on the screen, avoiding the sense of trajectory jump caused by sparse positioning points. This method of displaying the positioning trajectory can smoothly and fluently display the movement trajectory of the positioning device on the screen through frequency matching and interpolation supplementary point technology, effectively improving the visual effect and user experience of the trajectory display.
[0031] Optionally, step S102 of determining the adjacent positioning points corresponding to the positioning device based on the positioning information collection frequency and determining the movement trajectory of the positioning device according to the distance between adjacent positioning points, as Figure 2 shown, includes: Step S201: Determine the positioning information collection time interval of the positioning device according to the positioning information collection frequency.
[0032] Determine the positioning information acquisition time interval of the positioning device according to the positioning information acquisition frequency. If the acquisition frequency of the positioning device is 10 times per second, the acquisition time interval between two adjacent positioning information is calculated as 1 / 10 second. Specifically, when the acquisition frequency of the positioning module is 10 Hz, this means that a positioning point is acquired every 0.1 second.
[0033] Step S202, determine the starting positioning point and the ending positioning point corresponding to the positioning information based on the positioning information acquisition time interval, and determine the starting positioning point and the ending positioning point as adjacent positioning points.
[0034] Determine the starting positioning point and the ending positioning point corresponding to the positioning information based on the positioning information acquisition time interval, and determine them as adjacent positioning points. In a continuous positioning data sequence, each positioning point forms a pair of adjacent positioning points with the next positioning point. Among them, P is the starting positioning point, Q is the ending positioning point, and the time interval between them is Δt.
[0035] Step S203, calculate the distance between the starting positioning point and the ending positioning point among adjacent positioning points, and obtain the motion trajectory between the starting positioning point and the ending positioning point based on the distance.
[0036] When the distance is small or the motion speed of the positioning device changes little, adjacent positioning points can be directly connected by a straight line, which is used as the motion trajectory between the two points. When crossing a region with a large change in longitude and latitude, the earth's surface is a spherical surface rather than a plane. Connecting directly by a straight line will cause the trajectory to be distorted near the poles or the equator, thus affecting the display effect and analysis accuracy of the trajectory. Optionally, calculate the distance between the starting positioning point and the ending positioning point among adjacent positioning points, as Figure 3 shown, including: Step S301, obtain the longitude and latitude corresponding to the starting positioning point and the ending positioning point from the preset map page; Step S302, calculate the spherical distance between the starting positioning point and the ending positioning point according to the longitude and latitude.
[0037] The spherical distance is calculated through the following formula: ; where, is the distance; is the radius of the earth; is the latitude corresponding to the starting positioning point, is the latitude corresponding to the ending positioning point, in radians; is the longitude corresponding to the starting positioning point, is the longitude corresponding to the ending positioning point, in radians. Specifically, in the calculation process of the spherical distance, the Haversine formula can be used to calculate, so as to consider the error influence of the global curvature.
[0038] Optionally, the number of interpolation segments between adjacent positioning points is calculated based on the positioning information acquisition frequency and the screen refresh frequency, such as Figure 4 Shown, including: Step S401, obtaining a first frequency value corresponding to the positioning information acquisition frequency and a second frequency value corresponding to the screen refresh frequency; Step S402: The interpolation segment number is calculated by using the first frequency value and the second frequency value using an interpolation segment number calculation formula.
[0039] The calculation formula for the number of interpolation segments is: ; in, is the number of interpolation segments; is the first frequency value; is the second frequency value.
[0040] Assuming the first frequency is 1 Hz and the second frequency is 24 Hz, the number of interpolation segments is 24 / 1 = 24. In real-world scenarios, the ratio of the second frequency to the first frequency may not be divisible evenly. In this case, the number of interpolation segments is rounded to the nearest integer. For example, if the first frequency is 5 Hz, meaning positioning data is collected 5 times per second, and the second frequency is 24 Hz, then 24 / 5 = 4.8, which rounds down to 4 interpolation segments.
[0041] Optionally, the number of interpolation segments is used to calculate the number of fill points between adjacent positioning points, such as Figure 5 Shown, including: Step S501, determining whether the second frequency value is divisible by the first frequency value; Step S502: If yes, the number of fill-in points is equal to the number of interpolation segments minus 1; if no, the number of fill-in points is equal to the number of interpolation segments.
[0042] Assuming the first frequency value is 1Hz and the second frequency value is 24Hz, then the number of interpolation segments is 24 / 1=24. The second frequency value can be divided by the first frequency value, so the number of supplementary points is equal to 24-1=23, that is, 23 points are supplemented between the starting and ending positioning points.
[0043] Assume that the first frequency value is 5Hz and the second frequency value is 24Hz, 24 / 5=4.8. The second frequency value cannot be divided by the first frequency value, so the number of interpolation segments is 4, and the number of supplementary points is also 4, that is, 4 points are supplemented between the starting and ending positioning points, thereby compensating for the problem of reduced interpolation segments due to the inability to divide the second frequency value.
[0044] Optionally, the number of supplementary points is used to determine the position coordinates of the supplementary points in the motion trajectory and the order in which the supplementary points are generated, such as Figure 6 Shown, including: Step S601, obtaining the spherical distance between the starting positioning point and the ending positioning point and the number of supplementary points; Step S602, determining the segment spacing between each supplementary point according to the ratio of the spherical surface spacing to the number of supplementary points; Step S603: determining the location of each supplementary point on the map page based on the segment spacing, and obtaining the corresponding supplementary point location coordinates; Step S604: determining the order of generating the supplementary points corresponding to each supplementary point by using the movement directions corresponding to the starting positioning point and the ending positioning point.
[0045] First, we need to obtain the spherical distance d between the starting and ending points P and Q, as well as the number of supplementary points n. Since the Earth is approximately spherical, when the distance between the anchor points is large, we need to use a spherical distance calculation formula (such as the Haversine formula) to calculate the actual distance between the two points. The formula used is as follows: ; in, is the spacing; The radius of the Earth is 6371 km; is the latitude corresponding to the starting positioning point P, The latitude corresponding to the ending positioning point Q, in radians; is the longitude corresponding to the starting positioning point P, is the longitude corresponding to the final positioning point Q, in radians. The number of supplementary points n is determined by the ratio of the screen refresh rate to the positioning frequency.
[0046] For example, if the first frequency value is 1Hz and the second frequency value is 24Hz, then the number of interpolation segments is 24 / 1=24, the number of patch points is 24-1=23, and the calculated spherical spacing is 46 meters. Then the segment spacing is 46 / 23=2 meters, that is, starting from the starting positioning point, a patch point is set every 2 meters, so as to determine the patch point position of each patch point on the map page and determine the patch point position coordinates corresponding to each patch point position.
[0047] Optionally, the step S603 of determining the location of each patch point on the map page based on the segment spacing and obtaining the patch point location coordinates corresponding to the patch point location is as follows: Figure 7 Shown, including: Step S701, according to the movement directions corresponding to the starting positioning point and the ending positioning point, determine a first supplementary point adjacent to the starting positioning point using the segment spacing, and obtain the first supplementary point position coordinates and the first rotation angle corresponding to the first supplementary point; Step S702 : Determine a second patch point adjacent to the first patch point using the segment spacing according to the first rotation angle, and obtain the second patch point position coordinates and the second rotation angle corresponding to the second patch point, until the patch point position coordinates corresponding to all patch point positions are obtained.
[0048] When obtaining the coordinates of the patch points, the rotation angle corresponding to each patch point must be determined. First, the motion directions corresponding to the starting and ending points are obtained. Then, starting from the starting point, the first adjacent patch point is obtained according to the motion direction. The first patch point is on the motion trajectory, and the distance between the first patch point and the starting point is the same as the segment spacing. The first rotation angle corresponding to the first patch point is determined based on the motion direction and motion trajectory.
[0049] After the first patch point is determined, the position of each of the remaining patch points is obtained in turn according to the direction of motion. These patch points are all on the motion trajectory, and the distance between adjacent patch points is the same as the segment spacing. In the process of determining the position of each patch point, it is necessary to calculate its corresponding rotation angle, and then use the rotation angle to calculate the next adjacent patch point.
[0050] Optionally, each patch point is displayed in sequence from the motion trajectory according to the patch point position coordinates and patch point generation order, such as Figure 8 As shown, including: Step S801: Obtain display parameters corresponding to the display device, and determine a display strategy for the display device using the display parameters and a patch point generation order; wherein each patch point under the display strategy can be displayed in a display frame corresponding to the display device; Step S802 : Using the display strategy, each supplementary point is controlled to be displayed in sequence in a display frame corresponding to the display device according to the corresponding supplementary point position coordinates.
[0051] During the display process, it is necessary to ensure that each patch point can be displayed in the display frame of the display device. The display time of the display frame is determined by obtaining the display parameters of the display, and then the display strategy of the display device is obtained using the patch point generation order and display parameters to ensure that each patch point can be displayed in the corresponding display frame, thereby avoiding the situation where the patch point is displayed in the black screen frame of the display, causing the patch point to be unable to be displayed.
[0052] The point-filling sequence generated through the above steps can produce smooth, natural motion trajectories on the map, effectively avoiding the trajectory jumps caused by sparse positioning points. Furthermore, the order in which the points are generated ensures that the trajectory animation is displayed according to the actual motion sequence, improving the user experience.
[0053] The effect of this method is shown in the figure Figure 9As shown in the figure, when crossing a region with a large latitude and longitude span, the motion trajectory calculated by this method considering the global curvature is not a simple straight line, but an arc-shaped motion trajectory based on the global curvature, thus avoiding distortion near the poles or the equator. In addition, for the smooth display of the trajectory, this method calculates multiple supplementary points based on the screen refresh rate and the information acquisition rate of the positioning device. The trajectory can be displayed through these multiple supplementary points during the interval of positioning information acquisition by the positioning device, making the trajectory animation smoother and improving the user experience.
[0054] As can be seen from the positioning trajectory display method mentioned in the above embodiments, this method calculates the number of supplementary points corresponding to the motion trajectory using the positioning information acquisition rate of the positioning device and the screen refresh rate of the display device, thereby increasing the sampling density of the motion trajectory, being able to generate a smoother trajectory animation, and being able to consider the influence of the earth's curvature during the generation of supplementary points, thus solving the above problems existing in the prior art.
[0055] Corresponding to the positioning trajectory display method provided in the foregoing embodiments, an embodiment of the present invention provides a positioning trajectory display system, as Figure 10 shown, the system includes: A frequency data acquisition module 1010, configured to acquire the positioning information acquisition rate of the positioning device and the screen refresh rate of the display device; A motion trajectory determination module 1020, configured to determine adjacent positioning points corresponding to the positioning device based on the positioning information acquisition rate, and determine the motion trajectory of the positioning device according to the distance between adjacent positioning points; A supplementary point number calculation module 1030, configured to calculate the number of interpolation segments between adjacent positioning points according to the positioning information acquisition rate and the screen refresh rate, and calculate the number of supplementary points between adjacent positioning points using the number of interpolation segments; A motion trajectory display module 1040, configured to determine the position coordinates and generation order of supplementary points in the motion trajectory using the number of supplementary points, and control each supplementary point to be sequentially displayed from the motion trajectory according to the position coordinates and generation order of the supplementary points.
[0056] As can be seen from the positioning trajectory display system mentioned in the above embodiments, this system calculates the number of supplementary points corresponding to the motion trajectory using the positioning information acquisition rate of the positioning device and the screen refresh rate of the display device, thereby increasing the sampling density of the motion trajectory, being able to generate a smoother trajectory animation, and being able to consider the influence of the earth's curvature during the generation of supplementary points, thus solving the above problems existing in the prior art.
[0057] The positioning trajectory display system provided by the embodiments of the present invention has the same implementation principle and technical effects as those of the foregoing embodiments of the positioning trajectory display method. For the sake of brief description, for the parts not mentioned in the system embodiments, reference may be made to the corresponding content in the foregoing embodiments of the positioning trajectory display method.
[0058] This embodiment also provides an electronic device. The structural schematic diagram of the electronic device is as Figure 11 shown. The device includes a processor 101 and a memory 102. Among them, the memory 102 is used to store one or more computer instructions, and the one or more computer instructions are executed by the processor to implement the steps of the above positioning trajectory display method.
[0059] Figure 11 The electronic device shown also includes a bus 103 and a communication interface 104. The processor 101, the communication interface 104, and the memory 102 are connected through the bus 103.
[0060] Among them, the memory 102 may include a high-speed random access memory (RAM, Random Access Memory), and may also include a non-volatile memory, such as at least one disk memory. The bus 103 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 11 only a bidirectional arrow is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0061] The communication interface 104 is used to connect to at least one user terminal and other network units through a network interface, and send the encapsulated IPv4 message or IPv4 message to the user terminal through the network interface.
[0062] The processor 101 may be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in the processor 101 or the instructions in the form of software. The above-mentioned processor 101 may be a general-purpose processor, including a central processing unit (CPU for short), a network processor (NP for short), etc.; it may also be a digital signal processor (DSP for short), an application specific integrated circuit (ASIC for short), a field-programmable gate array (FPGA for short), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present disclosure can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory 102, and the processor 101 reads the information in the memory 102 and combines its hardware to complete the steps of the method in the foregoing embodiments.
[0063] An embodiment of the present invention also provides a storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the steps of the positioning trajectory display method in the foregoing embodiments.
[0064] In several embodiments provided in the present application, it should be understood that the disclosed systems, devices, equipment, and methods can be implemented in other ways. The system embodiments described above are only illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection to each other may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in an electrical, mechanical, or other form.
[0065] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may or may not be a physical unit, that is, it may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0066] In addition, in each embodiment of the present invention, each functional unit may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit.
[0067] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.
[0068] Finally, it should be noted that the above-described embodiments are only specific implementation manners of the present invention, used to illustrate the technical solutions of the present invention, and are not intended to limit them. The protection scope of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that any person skilled in the art within the technical scope disclosed by the present invention can still modify the technical solutions described in the foregoing embodiments, or can easily think of changes, or perform equivalent replacements for some of the technical features; and these modifications, changes, or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A method for displaying a positioning trajectory, characterized in that, The method includes: Obtaining the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device; Determining adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and determining the movement trajectory of the positioning device according to the distance between the adjacent positioning points; Calculating the number of interpolation segments between the adjacent positioning points according to the positioning information acquisition frequency and the screen refresh frequency, and calculating the number of supplementary points between the adjacent positioning points by using the number of interpolation segments; Determining the supplementary point position coordinates and the supplementary point generation order in the movement trajectory by using the number of supplementary points, and controlling each supplementary point to be sequentially displayed from the movement trajectory according to the supplementary point position coordinates and the supplementary point generation order.
2. The positioning trajectory display method according to claim 1, wherein Determining adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and determining the movement trajectory of the positioning device according to the distance between the adjacent positioning points, includes: Determining the positioning information acquisition time interval of the positioning device according to the positioning information acquisition frequency; Determining the starting positioning point and the ending positioning point corresponding to the positioning information based on the positioning information acquisition time interval, and determining the starting positioning point and the ending positioning point as the adjacent positioning points; Calculating the distance between the starting positioning point and the ending positioning point among the adjacent positioning points, and obtaining the movement trajectory between the starting positioning point and the ending positioning point based on the distance.
3. The positioning trajectory display method according to claim 2, wherein Calculating the distance between the starting positioning point and the ending positioning point among the adjacent positioning points, includes: Obtaining the longitude and latitude corresponding to the starting positioning point and the ending positioning point from a preset map page; Calculating the spherical distance between the starting positioning point and the ending positioning point according to the longitude and latitude; the spherical distance is calculated by the following formula: ; Wherein, is the said spacing; is the radius of the Earth; is the latitude corresponding to the said starting positioning point, is the latitude corresponding to the said ending positioning point, in radians; is the longitude corresponding to the said starting positioning point, is the longitude corresponding to the said ending positioning point, in radians.
4. The positioning trajectory display method according to claim 1, wherein Calculating the number of interpolation segments between the adjacent positioning points according to the positioning information acquisition frequency and the screen refresh frequency, includes: Obtaining a first frequency value corresponding to the positioning information acquisition frequency and a second frequency value corresponding to the screen refresh frequency; Calculating the number of interpolation segments by using the first frequency value and the second frequency value and an interpolation segment number calculation formula; wherein, the interpolation segment number calculation formula is: ; wherein, is the number of interpolation segments; is the first frequency value; is the second frequency value.
5. The positioning trajectory display method according to claim 4, wherein Calculating the number of supplementary points between the adjacent positioning points by using the number of interpolation segments, includes: Judging whether the second frequency value can be divided evenly by the first frequency value; If so, the number of supplementary points is equal to the number of interpolation segments minus 1; if not, the number of supplementary points is equal to the number of interpolation segments.
6. The positioning trajectory display method according to claim 3, wherein Determining the supplementary point position coordinates and the supplementary point generation order in the movement trajectory by using the number of supplementary points, includes: Obtaining the spherical distance between the starting positioning point and the ending positioning point and the number of supplementary points; Determining the segment distance between each supplementary point according to the ratio of the spherical distance to the number of supplementary points; Determining the supplementary point position of each supplementary point in the map page based on the segment distance, and obtaining the supplementary point position coordinates corresponding to the supplementary point position; Determining the supplementary point generation order corresponding to each supplementary point by using the movement direction corresponding to the starting positioning point and the ending positioning point.
7. The positioning trajectory display method according to claim 6, wherein Determine the supplementary point positions of each of the supplementary points in the map page based on the line spacing, and obtain the supplementary point position coordinates corresponding to the supplementary point positions, including: According to the movement direction corresponding to the starting positioning point and the ending positioning point, use the line spacing to determine a first supplementary point adjacent to the starting positioning point, and obtain the first supplementary point position coordinates and the first rotation angle corresponding to the first supplementary point; According to the first rotation angle, use the line spacing to determine a second supplementary point adjacent to the first supplementary point, and obtain the second supplementary point position coordinates and the second rotation angle corresponding to the second supplementary point, until obtaining the supplementary point position coordinates corresponding to all the supplementary point positions.
8. The positioning trajectory display method according to claim 1, wherein Control each supplementary point to be sequentially displayed from the movement trajectory according to the supplementary point position coordinates and the supplementary point generation order, including: Obtain the display parameters corresponding to the display device, and use the display parameters and the supplementary point generation order to determine the display strategy of the display device; wherein, each of the supplementary points under the display strategy can be displayed in the display frame corresponding to the display device; Use the display strategy to control each of the supplementary points to be sequentially displayed in the display frame corresponding to the display device according to the corresponding supplementary point position coordinates.
9. A positioning trajectory display system, characterized in that, The system includes: A frequency data acquisition module, configured to acquire the positioning information acquisition frequency of the positioning device and the screen refresh frequency of the display device; A movement trajectory determination module, configured to determine adjacent positioning points corresponding to the positioning device based on the positioning information acquisition frequency, and determine the movement trajectory of the positioning device according to the spacing between the adjacent positioning points; A supplementary point quantity calculation module, configured to calculate the number of interpolation segments between the adjacent positioning points according to the positioning information acquisition frequency and the screen refresh frequency, and calculate the number of supplementary points between the adjacent positioning points by using the number of interpolation segments; A movement trajectory display module, configured to use the number of supplementary points to determine the supplementary point position coordinates and the supplementary point generation order in the movement trajectory, and control each supplementary point to be sequentially displayed from the movement trajectory according to the supplementary point position coordinates and the supplementary point generation order.
10. An electronic device, characterized in that, It includes a processor and a memory, the memory stores computer executable instructions that can be executed by the processor, and the processor executes the computer executable instructions to implement the steps of the positioning trajectory display method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Trajectory playback method and device of electronic map
CN108415936A
Method and device for generating three-dimensional motion track
CN110595429A
Method and system for reconstructing motion trajectory based on mobile platform
CN111766617A
Display rendering method and system of Beidou satellite positioning data in GIS
CN112445848A
Track data completion method and device, computer equipment and storage medium
CN113891234A