Vehicle navigation method and system based on Cesium engine and Amap route planning

By integrating Cesium's 3D map engine with Amap's route planning, the method addresses the lack of terrain representation and route planning in navigation systems, achieving enhanced 3D map display and dynamic route guidance, thereby improving user experience and platform compatibility.

CN120313623APending Publication Date: 2025-07-15DAQING ANRUIDA TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510364302.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

Most existing navigation systems are based on two-dimensional maps, lacking the full display of terrain and landforms, and the Cesium three-dimensional map engine lacks mature route planning and navigation functions.

Method used

By combining Cesium's three-dimensional map engine and Gaode route planning API, the display of three-dimensional map data is realized. The Gaode route data is obtained using the Gaode route planning API, and the latitude and longitude strings are parsed into three-dimensional Cartesian coordinates. Combined with Cesium's interpolation algorithm, real-time positioning and dynamic route drawing are performed, and road books are broadcast in real time.

Benefits of technology

It has achieved the deep integration of three-dimensional maps and efficient route planning, improved the intuitiveness and user experience of navigation, and has functions such as three-dimensional map display, dynamic route update, real-time navigation and path smoothing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120313623A_ABST
    Figure CN120313623A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle navigation method and system based on a Cesium engine and Amap route planning, and relates to the field of geographic information systems and navigation. The problems that an existing navigation system is based on a two-dimensional map and lacks full display of terrains and landforms, a traditional navigation system gradually transforms to a 3D map, but lacks mature route planning and navigation functions and the like are solved. The method comprises the following steps: rendering and building a Gis map three-dimensional scene through a Cesium.js engine, and obtaining three-dimensional map data; obtaining vehicle incoming starting point and terminal point coordinates through Amap path planning, and obtaining returned route data; analyzing the longitude and latitude character strings in the coordinate field of the Amap path into a three-dimensional Cartesian coordinate (x, y, z) array of the engine; drawing a real-time positioning and dynamic route; marking the converted vehicle position on a three-dimensional map by using the engine, and updating the vehicle position by using an interpolation algorithm provided by the engine; and broadcasting the road book in real time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of geographic information systems and navigation technologies, and particularly relates to a vehicle navigation method and system based on the Cesium engine and Amap route planning. Background Art

[0002] Most existing navigation systems are based on 2D maps and lack a full display of terrain and landforms. Amap provides efficient route planning services but lacks deep integration with 3D map engines. With the development of 3D map technology, traditional navigation systems are gradually transforming to 3D maps. As an open-source 3D map engine, Cesium can display rich geographic information but lacks mature route planning and navigation functions. Therefore, it is necessary to propose a vehicle navigation system that combines Cesium and Amap route planning technology to improve the navigation experience. Summary of the Invention

[0003] The present invention aims to solve problems in the prior art, such as most navigation systems being based on 2D maps and lacking a full display of terrain and landforms, and traditional navigation systems gradually transforming to 3D maps. As an open-source 3D map engine, Cesium can display rich geographic information but lacks mature route planning and navigation functions.

[0004] To solve the above technical problems, the present invention is realized through the following technical solutions:

[0005] Solution 1: The present invention proposes a vehicle navigation method based on the Cesium engine and Amap route planning, and the method includes the following steps:

[0006] Step 1: Render and build a 3D scene of the Gis map through the Cesium.js engine on the web front end to obtain 3D map data;

[0007] Step 2: Based on the 3D map data obtained in Step 1, use the Amap path planning API to obtain the route data returned by getting the start and end coordinates passed in by the vehicle;

[0008] Step 3: Based on the route data in Step 2, parse the longitude and latitude strings in the Amap path coordinate field into an array of 3D Cartesian coordinates (x, y, z) of Cesium;

[0009] Step 4: Based on the array of 3D Cartesian coordinates (x, y, z) in Step 3, draw real-time positioning and dynamic routes in the Gesium engine; use the Cesium engine to mark the converted real-time position of the vehicle on the 3D map, and use the interpolation algorithm provided by Cesium to update the vehicle position;

[0010] Step 5: According to Steps 2 to 3, play the route guide in real time.

[0011] Further, a preferred implementation is provided. The array formula of the three-dimensional Cartesian coordinates (x, y, z) in step 3 is as follows:

[0012]

[0013] where a is the major semi-axis of the ellipsoid, b is the minor semi-axis of the ellipsoid, h is the altitude, defaulting to 0, and N is the radius of curvature.

[0014] Further, a preferred implementation is provided. The method for updating the vehicle position using the interpolation algorithm provided by Cesium in step 4 is as follows:

[0015] Step 4.1: Create a SampledPositionProperty object in Cesium to store the vehicle position data;

[0016] Step 4.2: Add the real-time position of the vehicle to the SampledPositionProperty;

[0017] Step 4.3: Use the Entity object to bind the vehicle position to the SampledPositionProperty.

[0018] Further, a preferred implementation is provided. Step 4 further includes the step of calculating whether the vehicle deviates from the route.

[0019] Further, a preferred implementation is provided. The method for calculating whether the vehicle deviates from the route is as follows:

[0020]

[0021] where P is the vehicle position, AB is a section of the planned route, and A and B are the two endpoints of the line segment; is the vector from point A to point P, is the vector from point A to point B, and t represents the projection position of point P on the line segment AB. Traverse all line segments of the planned route and take the minimum value of all distances.

[0022] Further, a preferred implementation is provided. The method for real-time reporting of the roadbook in step 5 is as follows:

[0023] Use the Haversine formula to calculate the spherical distance from the vehicle's current position to the next waypoint. The calculation formula is as follows:

[0024]

[0025] r is the radius of the earth, Let Δφ be the latitude difference and Δλ = λ2 - λ1 be the longitude difference. If the distance from the vehicle to the next waypoint is less than a preset threshold, select the roadbook corresponding to this point as the content for voice broadcast; the voice broadcast is completed using the native plugin.

[0026] Solution 2: A vehicle navigation system based on the Cesium engine and Amap route planning, the system includes:

[0027] A three-dimensional map data construction module, used to render and build a three-dimensional scene of the Gis map through the Cesium.js engine on the web front-end to obtain three-dimensional map data;

[0028] An Amap API positioning and route planning module, used to obtain the route data returned by getting the starting and ending coordinates of the vehicle passed in through the Amap route planning API based on the three-dimensional map data obtained by the three-dimensional map data acquisition module;

[0029] A parsing and conversion data module, used to parse the longitude and latitude string in the Amap path coordinate field into an array of three-dimensional Cartesian coordinates (x, y, z) of Cesium based on the route data in the route data acquisition module;

[0030] A real-time positioning and dynamic route drawing module, used to draw real-time positioning and dynamic routes in the Gesium engine based on the array of three-dimensional Cartesian coordinates (x, y, z) in the parsing and conversion data module; use the Cesium engine to mark the converted real-time position of the vehicle on the three-dimensional map, and use the interpolation algorithm provided by Cesium to update the vehicle position;

[0031] A roadbook broadcast module, used to broadcast the roadbook in real time according to the route data acquisition module to the real-time positioning and parsing and conversion data module.

[0032] Solution 3: A computer device, including a memory and a processor, where a computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method described in any one of Solution 1.

[0033] Solution 4: A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of Solution 1 are implemented.

[0034] Solution 5: A computer program product, as a computer program, when the computer program is executed, the method described in any one of Solution 1 is implemented.

[0035] The beneficial effects of the present invention are:

[0036] A vehicle navigation method and system based on the Cesium engine and Amap route planning. The present invention provides a vehicle navigation system and method based on the Cesium engine and Amap route planning, realizing the deep integration of 3D map display and efficient route planning, and enhancing the intuitiveness of navigation and user experience.

[0037] By deeply integrating the Cesium 3D map engine with the Amap route planning API, the present invention provides a new vehicle navigation system and method. Its core effects include 3D map display, dynamic route update, real-time navigation, path smoothing, cross-platform compatibility, etc., having significant technical advantages and application values.

[0038] The present invention is also applicable to fields such as 3D map display and dynamic route update. Brief Description of the Drawings

[0039] Figure 1 It is a schematic flowchart of a vehicle navigation method based on the Cesium engine and Amap route planning described in Embodiment 1. Detailed Embodiments

[0040] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments.

[0041] Embodiment 1. This embodiment proposes a vehicle navigation method based on the Cesium engine and Amap route planning. The method includes the following steps:

[0042] Step 1: Render and build a 3D scene of the Gis map through the Cesium.js engine on the web front end to obtain 3D map data;

[0043] Step 2: Based on the 3D map data obtained in Step 1, obtain the returned route data by using the Amap path planning API to get the starting and ending coordinates passed in by the vehicle;

[0044] Step 3: Based on the route data in Step 2, parse the longitude and latitude strings in the Amap path coordinate field into an array of 3D Cartesian coordinates (x, y, z) of Cesium;

[0045] Step 4: Draw real-time positioning and dynamic routes in the Gesium engine based on the array of 3D Cartesian coordinates (x, y, z) in Step 3; use the Cesium engine to mark the converted real-time position of the vehicle on the 3D map, and use the interpolation algorithm provided by Cesium to update the vehicle position;

[0046] Step 5: According to Steps 2 to 3, broadcast the roadbook in real time.

[0047] Embodiment 2: This embodiment further limits a vehicle navigation method based on the Cesium engine and Amap route planning described in Embodiment 1. The array formula of the three-dimensional Cartesian coordinates (x, y, z) in Step 3 is as follows:

[0048]

[0049] where a is the semi-major axis of the ellipsoid, b is the semi-minor axis of the ellipsoid, h is the altitude, defaulting to 0, and N is the radius of curvature.

[0050] Embodiment 3: This embodiment further limits a vehicle navigation method based on the Cesium engine and Amap route planning described in Embodiment 1. The method for updating the vehicle position using the interpolation algorithm provided by Cesium in Step 4 is as follows:

[0051] Step 4.1: Create a SampledPositionProperty object in Cesium to store vehicle position data;

[0052] Step 4.2: Add the real-time position of the vehicle to SampledPositionProperty;

[0053] Step 4.3: Use the Entity object to bind the vehicle position to SampledPositionProperty.

[0054] Embodiment 4: This embodiment further limits a vehicle navigation method based on the Cesium engine and Amap route planning described in Embodiment 1. Step 4 further includes the step of calculating whether the vehicle deviates from the route.

[0055] Embodiment 5: This embodiment further limits a vehicle navigation method based on the Cesium engine and Amap route planning described in Embodiment 1. The method for calculating whether the vehicle deviates from the route is as follows:

[0056]

[0057] where P is the vehicle position, AB is a segment of the planned route, and A and B are the two endpoints of the line segment; is the vector from point A to point P, is the vector from point A to point B, t represents the projection position of point P on the line segment AB, and all line segments of the planned route are traversed to take the minimum value of all distances.

[0058] Embodiment 6. This embodiment further defines a vehicle navigation method based on the Cesium engine and Amap route planning described in Embodiment 5. The method for real-time roadbook announcement in step 5 is as follows:

[0059] Use the Haversine formula to calculate the spherical distance from the current vehicle position to the next waypoint. The calculation formula is:

[0060]

[0061] r is the radius of the earth, is the latitude difference, Δλ = λ2 - λ1 is the longitude difference. If the distance from the vehicle to the next waypoint is less than the preset threshold, select the roadbook corresponding to this point as the content for announcement; the voice announcement is completed using a native plugin.

[0062] Embodiment 7. This embodiment proposes a vehicle navigation system based on the Cesium engine and Amap route planning. The system includes:

[0063] A three-dimensional map data construction module, which is used to render and build a three-dimensional scene of the Gis map through the Cesium.js engine on the web front-end to obtain three-dimensional map data;

[0064] An Amap API positioning and route planning module, which is used to obtain the route data returned by the vehicle's input start and end coordinates through the Amap route planning API based on the three-dimensional map data obtained by the three-dimensional map data acquisition module;

[0065] A parsing and conversion data module, which is used to parse the longitude and latitude string in the Amap route coordinate field into an array of three-dimensional Cartesian coordinates (x, y, z) of Cesium based on the route data in the route data acquisition module;

[0066] A real-time positioning and dynamic route drawing module, which is used to draw real-time positioning and dynamic routes in the Gesium engine based on the array of three-dimensional Cartesian coordinates (x, y, z) in the parsing and conversion data module; mark the converted real-time vehicle position on the three-dimensional map using the Cesium engine, and use the interpolation algorithm provided by Cesium to update the vehicle position;

[0067] A roadbook announcement module, which is used to announce the roadbook in real time according to the route data acquisition module to the real-time positioning and parsing and conversion data module.

[0068] Embodiment 8. This embodiment proposes a computer device, which includes a memory and a processor. A computer program is stored in the memory. When the processor runs the computer program stored in the memory, the processor executes the method described in any one of Embodiments 1 to 6.

[0069] Embodiment 9. This embodiment proposes a computer-readable storage medium. The computer-readable storage medium stores a computer program. When the computer program is executed by a processor, the steps of the method described in any one of Embodiments 1 to 6 are implemented.

[0070] Embodiment 10. This embodiment proposes a computer program product. As a computer program, when the computer program is executed, the method described in any one of Solution 1 is implemented.

[0071] Embodiment 11. This embodiment proposes an example. The example is used to explain the above Embodiments 1 to 8. The specific example is as follows:

[0072] See Figure 1 To illustrate this embodiment, this embodiment provides a vehicle navigation system and method based on the Cesium engine and Amap route planning, realizing the deep integration of three-dimensional map display and efficient route planning, and improving the intuitiveness of navigation and user experience. The specific steps are as follows:

[0073] S1. Based on the three-dimensional map engine of Cesium, display the map and the route. Specifically as follows:

[0074] The web front-end renders and builds a three-dimensional scene of the gis map through the CesiumJS engine;

[0075] Introduce three-dimensional map data (including: imagery, terrain, three-dimensional oblique photography data);

[0076] Call the AMap.Driving class in the Amap route planning API, and obtain the returned route data (including: path coordinates, direction, road name road, distance distance, time time, roadbook steps, etc.) by passing in the start and end coordinates.

[0077] Parse the longitude and latitude string in the polyline path coordinate field of Amap into an array of three-dimensional Cartesian coordinates (x, y, z) of Cesium. The conversion formula is as follows:

[0078]

[0079] a is the semi-major axis of the WGS84 ellipsoid (6378137 meters), b is the semi-minor axis of the WGS84 ellipsoid (6356752.3142 meters), h is the altitude (default is 0), N is the radius of curvature, and the calculation formula is as follows:

[0080]

[0081] Draw a route Polyline entity using the parsed path coordinates with the Entity abstract class in Cesium;

[0082] Mark the starting and ending positions with the Entity entity in Cesium by passing in the parameters (starting point, ending point).

[0083] S2. Locate the vehicle position in real time and update the route dynamically. Specifically as follows:

[0084] Obtain the longitude and latitude coordinates (φ, λ) of the vehicle through the AMap.Geolocation class in the Amap positioning API, where φ is the latitude and λ is the longitude.

[0085] Convert the longitude and latitude coordinates to three-dimensional Cartesian coordinates (x, y, z) in Cesium, and the conversion formula is implemented using the formula in step S1.

[0086] Use the Entity object in Cesium to mark the real-time position of the vehicle on the three-dimensional map. And use the interpolation algorithm provided by Cesium to dynamically and smoothly update the vehicle position.

[0087] Create a SampledPositionProperty object in Cesium to store vehicle position data;

[0088] Add the real-time position of the vehicle to the SampledPositionProperty;

[0089] Bind the vehicle position to the SampledPositionProperty using the Entity object.

[0090] According to the real-time position of the vehicle and the planned route, calculate in real time whether the vehicle deviates from the route. If the vehicle deviates from the route, then call the AMap.Driving class in the Amap route planning API again to obtain new route data, and the starting point in the input parameters becomes the position when the vehicle deviates, and the ending point data remains unchanged.

[0091] Calculate the distance between the current position of the vehicle and the nearest point on the planned route. The calculation formula is as follows:

[0092]

[0093] P is the vehicle position, AB is a section of the planned route, and A and B are the two endpoints of the line segment. is the vector from point A to point P, is the vector from point A to point B, and t represents the projection position of point P on the line segment AB. Traverse all line segments of the planned route and take the minimum value among all distances.

[0094] If the distance exceeds a preset threshold, it is considered that the vehicle deviates from the route.

[0095] S3. Automatically broadcast the roadbook according to the vehicle's real-time position and the step description in the Amap route planning.

[0096] Use the Haversine formula to calculate the spherical distance from the vehicle's current position to the next waypoint. The calculation formula is as follows:

[0097]

[0098] r is the radius of the earth (6,371,000 meters), is the difference in latitude, and Δλ = λ2 - λ1 is the difference in longitude

[0099] If the distance from the vehicle to the next waypoint is less than the preset threshold, then select the roadbook corresponding to this point as the content for broadcasting. The voice broadcast is completed using the native plugin uni-speech.

[0100] In this embodiment, by deeply integrating the Cesium 3D map engine with the Amap route planning API, a new vehicle navigation system and method are provided. Its core effects include 3D map display, dynamic route update, real-time navigation, path smoothing, cross-platform compatibility, etc., and it has significant technical advantages and application values.

[0101] Those skilled in the art can understand that the above description is only the preferred embodiment of the present invention. The features described in each embodiment and / or claim of the present disclosure can be combined or combined in various ways, even if such combinations or combinations are not explicitly recorded in the present disclosure. It is not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

[0102] Although the preferred embodiments of the present invention have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention. Obviously, those skilled in the art can make various changes and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention also intends to include these modifications and variations.

Claims

1. A vehicle navigation method based on the Cesium engine and Amap route planning, characterized in that, The method includes the following steps: Step 1: Render and build a 3D scene of the Gis map through the Cesium.js engine on the web front-end to obtain 3D map data; Step 2: Based on the 3D map data obtained in Step 1, use the Amap path planning API to obtain the starting and ending coordinates of the vehicle input and obtain the returned route data; Step 3: Based on the route data in Step 2, parse the longitude and latitude strings in the Amap path coordinate field into an array of 3D Cartesian coordinates (x, y, z) in Cesium; Step 4: Based on the array of 3D Cartesian coordinates (x, y, z) in Step 3, draw real-time positioning and dynamic routes in the Gesium engine; use the Cesium engine to mark the converted real-time position of the vehicle on the 3D map, and use the interpolation algorithm provided by Cesium to update the vehicle position; Step 5: According to Steps 2 to 3, broadcast the roadbook in real time.

2. The vehicle navigation method based on the Cesium engine and Amap route planning according to claim 1, wherein, The formula for the array of 3D Cartesian coordinates (x, y, z) described in Step 3 is: Wherein, a is the major semi-axis of the ellipsoid, b is the minor semi-axis of the ellipsoid, h is the altitude, with a default value of 0, and N is the radius of curvature.

3. The vehicle navigation method based on the Cesium engine and Amap route planning according to claim 1, characterized in that The method for updating the vehicle position using the interpolation algorithm provided by Cesium in Step 4 is: Step 4.1: Create a SampledPositionProperty object in Cesium to store vehicle position data; Step 4.2: Add the real-time position of the vehicle to the SampledPositionProperty; Step 4.3: Use the Entity object to bind the vehicle position to the SampledPositionProperty.

4. The vehicle navigation method based on the Cesium engine and Amap route planning according to claim 1, characterized in that, Step 4 also includes the step of calculating whether the vehicle deviates from the route.

5. The vehicle navigation method based on the Cesium engine and Amap route planning according to claim 1, wherein The method for calculating whether the vehicle deviates from the route is: Among them, P is the vehicle position, AB is a segment of the planned route, and A and B are the two endpoints of the line segment; is the vector from point A to point P, is the vector from point A to point B, t represents the projection position of point P on the line segment AB, traverse all line segments of the planned route, and take the minimum value among all distances.

6. The vehicle navigation method based on the Cesium engine and Amap route planning according to claim 1, wherein The method for broadcasting the roadbook in real time in Step 5 is: Use the Haversine formula to calculate the spherical distance from the current position of the vehicle to the next waypoint. The calculation formula is: r is the radius of the earth, is the latitude difference, Δλ = λ2 - λ1 is the longitude difference. If the distance from the vehicle to the next waypoint is less than the preset threshold, the roadbook corresponding to this point is selected as the content for voice broadcast; the voice broadcast is completed using the native plugin.

7. A vehicle navigation system based on the Cesium engine and Amap route planning, characterized in that, The system includes: A 3D map data construction module for rendering and building a 3D scene of the Gis map through the Cesium.js engine on the web front-end to obtain 3D map data; An Amap API positioning and path planning module for obtaining the starting and ending coordinates of the vehicle input through the Amap path planning API based on the 3D map data obtained by the 3D map data acquisition module and obtaining the returned route data; A parsed conversion data module for parsing the longitude and latitude strings in the Amap path coordinate field into an array of 3D Cartesian coordinates (x, y, z) in Cesium based on the route data in the route data acquisition module; A real-time positioning and dynamic route drawing module for drawing real-time positioning and dynamic routes in the Gesium engine based on the array of 3D Cartesian coordinates (x, y, z) in the parsed conversion data module; using the Cesium engine to mark the converted real-time position of the vehicle on the 3D map, and using the interpolation algorithm provided by Cesium to update the vehicle position; A roadbook broadcast module for broadcasting the roadbook in real time according to the route data acquisition module to the real-time positioning and parsed conversion data module.

8. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein steps of the method according to any one of claims 1 to 6 are implemented when the processor executes the computer program.

9. A computer-readable storage medium storing a computer program, characterized in that, Steps of the method according to any one of claims 1 to 6 are implemented when the computer program is executed by the processor.

10. A computer program product, as a computer program, characterized in that, When the computer program is executed, the method according to any one of claims 1 to 6 is implemented.