Agricultural machinery motion real-time positioning method and system based on Unity3D

By using high-precision GPS sensors and Mercator coordinate conversion technology on the Unity3D platform, real-time positioning and synchronous display of agricultural machinery movements are achieved, and the problems of coordinate mapping errors and intermittent jumps in the existing technology are solved, improving simulation accuracy and operation controllability.

CN119693565APending Publication Date: 2025-03-25HENAN UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411560379.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-04
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In the prior art, there is a large error in the mapping relationship between the latitude and longitude information of real farmland and the coordinate points of virtual farmland, resulting in inconsistent with the actual position of the agricultural machinery in the virtual scene, affecting the simulation accuracy; at the same time, the agricultural machinery positioning system has intermittent jumps during the movement, making it difficult to accurately reflect the actual motion direction and path of the agricultural machinery.

Method used

The real-time positioning method of agricultural machinery based on Unity3D is adopted. By equipping with high-precision GPS sensors in a real farm, the longitude and longitude data of the agricultural machinery are collected in real time and converted into Mercator coordinates. Combined with the world coordinates of the reference points, the world coordinates of the agricultural machinery in the virtual farm are calculated to realize the real-time synchronous display of agricultural machinery movement.

Benefits of technology

The accuracy of coordinate mapping between real farmland and virtual farmland is improved, ensuring that the position of the agricultural machinery in the virtual environment is highly consistent with the real position, solving the intermittent jumping problem of the agricultural machinery positioning system, and improving the operation accuracy and reliability of crop status monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119693565A_ABST
    Figure CN119693565A_ABST
Patent Text Reader

Abstract

The invention relates to an agricultural machinery real-time motion positioning method and system based on Unity 3D, and the method comprises the steps: constructing a scene environment of a farm into a virtual farm scene, collecting the latitude and longitude coordinates of the agricultural machinery in a real scene, mapping the real-time motion of the agricultural machinery in the real scene into the virtual farm scene, and carrying out the positioning of the real-time motion of the agricultural machinery in the real scene. Support is provided for the agricultural machinery production process and crop state display after production; the mapping of the coordinates is realized by converting the longitude and latitude into Mercator coordinates and further calculating the coordinate information of the virtual environment, so that the coordinate conversion precision is effectively improved in the conversion process, and the consistency between the position of the agricultural machine in the virtual environment and the height of the real position is ensured; in addition, the system also provides an agricultural machine track playback function, so that the position and movement condition of the agricultural machine in a historical time period can be conveniently inquired and displayed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of geographic information data processing and virtual simulation, and in particular to a real-time positioning method and system for agricultural machinery movement based on Unity3D. Background Art

[0002] In agricultural production, the operation of agricultural machinery usually requires drivers to perform ground operations, such as harvesting and sowing. With the rapid development of modern agriculture, intelligent and automated technologies have gradually replaced traditional manual operations, promoting agriculture to develop in an efficient, precise and sustainable direction. As an important part of smart agriculture, unmanned driving technology is increasingly being used in large-scale farmland operations. At the same time, intuitive visualization of the movement of agricultural machinery and the status of crops after operation has become the focus of the current development of smart agriculture.

[0003] With the rapid development of digital twin technology, the field of smart agriculture has ushered in new development opportunities. Through digital twin technology, a virtual farm model corresponding to the real farm is constructed, making it possible to display the position and movement status of agricultural machinery in real time in a virtual environment. Using the Unity3D platform, the coordinate mapping relationship between the real farm and the virtual farm is established. Combined with advanced positioning technology, it can not only intuitively display the operation process of agricultural machinery in the virtual environment, but also monitor the growth and harvesting of crops in real time, making agricultural machinery operation more intelligent and controllable. However, the existing technology still has the following problems: on the one hand, there is a large error in the mapping relationship between the latitude and longitude information of the real farmland and the coordinate points of the virtual farmland, which makes the position of the agricultural machinery in the virtual scene not completely consistent with the actual position, affecting the simulation accuracy; on the other hand, the existing agricultural machinery positioning system often shows intermittent jumping during the movement process, which is difficult to accurately reflect the actual movement direction and path of the agricultural machinery, which not only affects the accuracy of the operation, but also causes difficulties in monitoring the crop status after the agricultural machinery operation. Summary of the invention

[0004] In order to solve the above technical problems, the present invention provides a real-time positioning method and system for agricultural machinery movement based on Unity3D.

[0005] The technical solution adopted by the present invention is as follows:

[0006] A real-time motion positioning method for agricultural machinery based on Unity3D, comprising the following steps:

[0007] (1) Use modeling software to build a virtual farm scene that is exactly the same as the real farm based on the actual farm scene diagram, and build three-dimensional models of agricultural machinery such as harvesters and planters. Import the created virtual farm scene and three-dimensional models into Unity to complete the construction of the virtual farm scene;

[0008] (2) Install a high-precision GPS sensor at the center of the real agricultural machinery and equipment to record the latitude and longitude data of the agricultural machinery and equipment in the real farm, establish a cloud server, and transmit the data collected by the GPS sensor to the cloud server in real time;

[0009] (3) Determine the position of the reference point, create an empty object in the virtual farm scene and place it at the position of the reference point, and record the latitude and longitude coordinates of the reference point and its world coordinates in the Unity3D virtual farm;

[0010] (4) Convert the latitude and longitude coordinates of the reference point and the latitude and longitude coordinates of the agricultural machinery into Mercator coordinates respectively, and obtain the world coordinates of the agricultural machinery in the Unity3D virtual farm based on the relative positions of the corresponding Mercator coordinates of the two and the world coordinates of the reference point in the Unity3D virtual farm;

[0011] (5) Using a long connection or a short connection, the location information of the agricultural machinery equipment is obtained once per unit time and displayed in the Unity3D virtual farm. The direction and moving distance of the agricultural machinery equipment are calculated through the coordinate points of the two positions before and after the actual movement of the agricultural machinery equipment, so that the agricultural machinery equipment can move smoothly from the starting point to the target point in the Unity3D virtual farm at a uniform speed. Repeat the above steps to realize the synchronous display of the movement of the agricultural machinery equipment in the Unity3D virtual farm.

[0012] A real-time positioning system for agricultural machinery movement based on Unity3D comprises a Unity environment construction module, a data acquisition and processing module, an agricultural machinery coordinate conversion module, an agricultural machinery real-time movement module and a trajectory playback module.

[0013] The functions of the Unity environment building module are:

[0014] Use the modeling software Blender to build a virtual farm scene. According to the map image, farm structure diagram or oblique image, a virtual farm scene that is exactly the same as the real farm is built. In the actual modeling, the terrain changes are not considered, and the farm plots and roads are on the same plane.

[0015] Build a 3D model of the same size as the actual agricultural machinery, such as a harvester, planter, etc., and set the origin as the geometric center of the agricultural machinery;

[0016] Import the created 3D model into Unity3D, use the visual editor of Unity3D to build a virtual farm scene; record the height h0 from the center point of the agricultural machinery to the ground.

[0017] The data acquisition and processing module includes a high-precision GPS sensor installed at the geometric center of the agricultural machinery equipment to collect the longitude and latitude coordinates of the agricultural machinery in real time during movement, and connect the data acquisition system of the GPS sensor to the cloud server to standardize the format of the longitude and latitude coordinates, and collect and store the longitude and latitude coordinates of each agricultural machinery equipment in real time.

[0018] The agricultural machinery coordinate conversion module first sets a reference point in the virtual farm environment, and converts the longitude and latitude coordinates of the agricultural machinery equipment into world coordinates in the Unity3D environment through a coordinate conversion algorithm to obtain the position of the agricultural machinery in the virtual environment. In the coordinate conversion process, the Mercator coordinates are used as an intermediary to first convert the longitude and latitude coordinates into Mercator coordinates, and then the Mercator coordinate distance between the current position of the agricultural machinery equipment and the reference point is calculated, and finally the world coordinates of the current position of the agricultural machinery equipment are obtained.

[0019] The calculation method of the world coordinates of agricultural machinery in the Unity3D virtual farm is as follows:

[0020] 1) Select reference points and preprocess them

[0021] Select a geographical landmark point in the real farm as the reference point, record the longitude and latitude coordinates (lon0, lat0) of the point, find the location of the reference point in the virtual farm scene, and set its longitude and latitude coordinates to (lon0, lat0), record the coordinates of the current reference point in the Unity3D world coordinate system (X0, Y0, Z0), and set Y0 to the height h0 from the center point of the agricultural machinery to the ground;

[0022] Convert the latitude and longitude coordinates of the above reference points to Mercator coordinates (x0, y0). Mercator projection is a commonly used map projection method that can convert the latitude and longitude information on the earth's surface into plane coordinates. The calculation formula is as follows:

[0023]

[0024]

[0025] Where R is the radius of the Earth.

[0026] 2) Read the longitude and latitude coordinates of the agricultural machinery and calculate its world coordinates in the Unity3D virtual farm

[0027] Obtain the longitude and latitude coordinates (lon, lat) of the agricultural machinery in the real farm scene from the cloud platform, and convert the obtained longitude and latitude coordinates into Mercator coordinates (x, y) using the following formula:

[0028]

[0029]

[0030] Where R is the radius of the earth;

[0031] According to the obtained Mercator coordinates and the Mercator coordinates of the reference point, calculate the X-direction distance d between the target point and the reference point in the Unity3D virtual farm coordinate system x The distance d in the Z direction y , the formula is as follows:

[0032] d x =x-x0

[0033] d y =y-y0

[0034] Calculate the coordinates (X, Y, Z) of the target point in the Unity3D virtual farm coordinate system to obtain the position of the agricultural machinery in the Unity3D virtual farm.

[0035] X=X0+d x

[0036] Y=Y0

[0037] Z=Z0+d y

[0038] The agricultural machinery real-time motion module is used to update the position of agricultural machinery in the Unity3D virtual farm in real time. The update method is as follows:

[0039] 1) Use a long connection or a short connection in Unity3D to obtain the real-time latitude and longitude coordinates and equipment name of the agricultural machinery from the cloud platform once after a fixed time, and the fixed time is t;

[0040] 2) The acquired longitude and latitude coordinates are converted into world coordinates in the Unity3D virtual farm through calculation to determine the position of the agricultural machinery in the virtual environment; the acquired equipment name, current system time and converted world coordinates are stored in the database;

[0041] 3) Set two variables position1 and position2 to represent the world coordinates of the starting position and the end position of the agricultural machinery in the time period t in the Unity3D virtual farm. When the system starts, initialize position1 and position2, convert the longitude and latitude coordinates of the agricultural machinery obtained for the first and second times into the world coordinates (X1, Y1, Z1) and (X2, Y2, Z2) in Unity3D, and assign them to position1 and position2 respectively. When both position1 and position2 are not empty, perform the following steps;

[0042] 4) Smooth movement of agricultural machinery

[0043] Calculate the distance between position1 and position2 to determine the distance d that the agricultural machine moves from the starting position to the end position within the time period t. The formula is as follows:

[0044]

[0045] Calculate the direction vector from position1 to position2 to determine the direction in which the agricultural machine moves from the starting position to the end position within the time period t. The formula is as follows:

[0046]

[0047] In the time period t, according to the calculated moving direction of the agricultural machinery, the function Quaterion.LookRotation is used to update the moving direction of the agricultural machinery; according to the moving distance d of the agricultural machinery and the time step t, the Vector3.MoveTowards method is used to gradually update the position of the agricultural machinery so that it moves uniformly and smoothly from the starting position to the end position;

[0048] 5) When receiving new longitude and latitude coordinates from the cloud server, update the values ​​of position1 and position2, and obtain the new world coordinates (X t ,Y t ,Z t ), reassign the value of position2 to position1, and assign the new coordinate (X t ,Y t ,Z t ) is assigned to position2, and then the agricultural machinery smooth movement step is executed;

[0049] 6) Repeat the above steps to achieve real-time update of agricultural machinery movement.

[0050] The trajectory playback module works as follows:

[0051] 1) By inputting the device name and selecting the time period, the world coordinates of the agricultural machinery in Unity3D within the selected time period are obtained from the database established by the agricultural machinery real-time motion module in step 1, and these coordinates are stored in an array;

[0052] 2) Set two variables pos1 and pos2 to represent the starting position and target position in the same time interval.

[0053] 3) Initialize the loop and iterate over all coordinate points in the array in each iteration;

[0054] 4) Set pos1 to the i-th coordinate point in the array.

[0055] 5) Set pos2 to the i+1th coordinate point in the array.

[0056] 6) Execute step 4) of the real-time motion module of agricultural machinery, where pos1 and pos2 respectively represent position1 and position2 in step 4) of the real-time motion module of agricultural machinery, to ensure smooth movement of the agricultural machinery in the virtual scene.

[0057] 7) The traversal is completed, and the movement trajectory playback function of the agricultural machinery at the selected time is completed.

[0058] The present invention discloses a method and system for real-time positioning and movement of agricultural machinery based on Unity3D, which uses the simplest longitude and latitude coordinate information to complete the coordinate mapping of the real scene and the virtual scene, and realizes the real-time mapping of the movement of agricultural machinery in the real scene to the virtual farm scene, providing support for the subsequent real-time display of the production process of agricultural machinery and the status of crops after production.

[0059] In the coordinate mapping process, the longitude and latitude are first converted into Mercator coordinates, and then the coordinate information in the virtual environment is further calculated. This conversion process effectively improves the accuracy of coordinate conversion and ensures that the position of the agricultural machinery in the virtual environment is highly consistent with the real position. In addition, the system also provides an agricultural machinery trajectory playback function, which is convenient for querying and displaying the position and movement of agricultural machinery in the historical time period. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] Figure 1 The present invention discloses a workflow diagram of a real-time positioning motion system for agricultural machinery based on Unity3D.

[0061] Figure 2 Flowchart of the coordinate transformation algorithm for agricultural machinery in a virtual farm. DETAILED DESCRIPTION

[0062] In order to more clearly introduce the purpose and technical solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0063] Example

[0064] like Figure 1 The agricultural machinery real-time positioning and motion system based on Unity3D shown in the figure includes a Unity environment construction module, a data acquisition and processing module, an agricultural machinery coordinate conversion module, an agricultural machinery real-time motion module, and a trajectory playback module.

[0065] 1. Unity environment building module

[0066] 1.1 Use the modeling software Blender to build a virtual farm scene. You can build a virtual farm scene that is exactly the same as the real farm based on map images, farm structure diagrams or oblique images. In the actual modeling, the terrain changes are not considered, and the farm plots and roads are on the same plane.

[0067] 1.2 Create a 3D model of the same size as the actual agricultural machinery, such as a harvester, planter, etc., and set the origin as the geometric center of the agricultural machinery.

[0068] 1.3 Import the created 3D model into Unity3D, use the visual editor of Unity3D to build a virtual farm scene; record the height h0 from the center point of the agricultural machinery to the ground.

[0069] 2. Data Acquisition and Processing Module

[0070] 2.1 Install a high-precision GPS sensor at the geometric center of the agricultural machinery to collect the longitude and latitude coordinates of the agricultural machinery in real time during movement.

[0071] 2.2 Data storage, and connect the data acquisition system of the GPS sensor to the cloud server, standardize the format of longitude and latitude coordinates, and collect and store the longitude and latitude coordinates of each agricultural machinery in real time.

[0072] 3. Agricultural Machinery Coordinate Conversion Module

[0073] This module first sets a reference point in the virtual environment, and uses a coordinate conversion algorithm to convert the longitude and latitude coordinates of the agricultural machinery into world coordinates in the Unity3D environment to obtain the position of the agricultural machinery in the virtual environment. In the coordinate conversion process, the Mercator coordinates are used as an intermediary to first convert the longitude and latitude coordinates into Mercator coordinates, and then calculate the Mercator coordinate distance between the current position of the agricultural machinery and the reference point, and finally obtain the world coordinates of the current position of the agricultural machinery. The specific algorithm flow chart is as follows Figure 2 shown.

[0074] 3.1 Select reference points and preprocess them.

[0075] 3.1.1 Select a geographical landmark point in the real farm as the reference point, record the longitude and latitude coordinates of the point (lon0, lat0), find the position of the reference point in the virtual farm scene, and set its longitude and latitude coordinates to (lon0, lat0), record the coordinates of the current reference point in the Unity3D world coordinate system (X0, Y0, Z0), and set Y0 to the height h0 from the center point of the agricultural machinery to the ground.

[0076] 3.1.2 Convert the latitude and longitude coordinates of the above reference points into Mercator coordinates (x0, y0). Mercator projection is a commonly used map projection method that can convert the latitude and longitude information on the earth's surface into plane coordinates. The calculation formula is as follows:

[0077]

[0078]

[0079] Where R is the radius of the Earth.

[0080] 3.2 Read the latitude and longitude coordinates of the agricultural machinery and convert them into world coordinates under Unity3D.

[0081] 3.2.1 Obtain the longitude and latitude coordinates (lon, lat) of the agricultural machinery in the real farm scene from the cloud platform.

[0082] 3.2.2 Convert the obtained latitude and longitude coordinates to Mercator coordinates (x, y) using the following formula:

[0083]

[0084]

[0085] Where R is the radius of the Earth.

[0086] 3.2.3 Based on the obtained Mercator coordinates and the Mercator coordinates of the reference point, calculate the X-direction distance d between the target point and the reference point in the Unity3D world coordinate system. x The distance d in the Z direction y , the formula is as follows:

[0087] d x =x-x0

[0088] d y =y-y0

[0089] 3.2.4 Calculate the coordinates (X, Y, Z) of the target point in the Unity3D world coordinate system to obtain the position of the agricultural machinery in the virtual environment.

[0090] X=X0+d x

[0091] Y=Y0

[0092] Z=Z0+d y

[0093] 4. Agricultural Machinery Real-time Motion Module

[0094] 4.1 Use a long connection or a short connection in Unity3D to obtain the real-time latitude and longitude coordinates and equipment name of the agricultural machinery from the cloud platform once after a fixed time, and the fixed time is t.

[0095] 4.2 The longitude and latitude coordinates obtained in step 3.2 are converted into world coordinates in the Unity3D environment to determine the position of the agricultural machinery in the virtual environment; the obtained device name, current system time and converted world coordinates are stored in the database.

[0096] 4.3 Set two variables position1 and position2 to represent the world coordinates of the starting position and the end position of the agricultural machinery in the time period t in Unity3D. When the system starts, initialize position1 and position2, convert the longitude and latitude coordinates of the agricultural machinery obtained for the first and second time into the world coordinates (X1, Y1, Z1) and (X2, Y2, Z2) in Unity3D through step 4.2, and assign them to position1 and position2 respectively. When both position1 and position2 are not empty, perform the following steps.

[0097] 4.4 Smooth movement of agricultural machinery

[0098] 4.4.1 Calculate the distance between position1 and position2, and determine the distance d that the agricultural machine moves from the starting position to the end position within the time period t. The formula is as follows:

[0099]

[0100] 4.4.2 Calculate the direction vector from position1 to position2 to determine the direction in which the agricultural machine moves from the starting position to the end position within the time period t. The formula is as follows:

[0101]

[0102] 4.4.3 Within the time period t, according to the calculated moving direction of the agricultural machinery, use the Quaterion.LookRotation function to update the moving direction of the agricultural machinery; according to the moving distance d of the agricultural machinery and the time step t, use the Vector3.MoveTowards method to gradually update the position of the agricultural machinery so that it moves uniformly and smoothly from the starting position to the end position.

[0103] 4.5 When receiving new longitude and latitude coordinates from the cloud server, update the values ​​of position1 and position2, and obtain the new world coordinates (X t,Y t ,Z t ), reassign the value of position2 to position1, and assign the new coordinate (X t ,Y t ,Z t ) is assigned to position2, and then the agricultural machinery smoothing motion step 4.4 is executed.

[0104] 4.6 Repeat step 4.5 to achieve real-time update of agricultural machinery movement.

[0105] 5. Trajectory playback module

[0106] 5.1 By entering the device name and selecting the time period, obtain the world coordinates of the agricultural machinery in Unity3D within the selected time period from the database established in step 4.2, and store these coordinates in an array.

[0107] 5.2 Set two variables pos1 and pos2 to represent the starting position and target position in the same time interval.

[0108] 5.3 Initialize the loop and iterate through all the coordinate points in the array. In each iteration:

[0109] 5.3.1 Set pos1 to the i-th coordinate point in the array.

[0110] 5.3.2 Set pos2 to the i+1th coordinate point in the array.

[0111] 5.3.3 Execute step 4.4, where pos1 and pos2 represent position1 and position2 in 4.4 respectively, to ensure smooth movement of the agricultural machinery in the virtual scene.

[0112] 5.4 The traversal is completed, and the movement trajectory playback function of the agricultural machinery at the selected time is completed.

Claims

1. A real-time motion positioning method for agricultural machinery based on Unity3D, characterized in that: It includes the following steps: (1) Use modeling software to build a virtual farm scene that is exactly the same as the real farm based on the actual farm scene diagram, and build three-dimensional models of agricultural machinery such as harvesters and planters. Import the created virtual farm scene and three-dimensional models into Unity to complete the construction of the virtual farm scene; (2) Install a high-precision GPS sensor at the center of the real agricultural machinery and equipment to record the latitude and longitude data of the agricultural machinery and equipment in the real farm, establish a cloud server, and transmit the data collected by the GPS sensor to the cloud server in real time; (3) Determine the position of the reference point, create an empty object in the virtual farm scene and place it at the position of the reference point, and record the latitude and longitude coordinates of the reference point and its world coordinates in the Unity3D virtual farm; (4) Convert the latitude and longitude coordinates of the reference point and the latitude and longitude coordinates of the agricultural machinery into Mercator coordinates respectively, and obtain the world coordinates of the agricultural machinery in the Unity3D virtual farm based on the relative positions of the corresponding Mercator coordinates of the two and the world coordinates of the reference point in the Unity3D virtual farm; (5) Using a long connection or a short connection, the location information of the agricultural machinery equipment is obtained once per unit time and displayed in the Unity3D virtual farm. The direction and moving distance of the agricultural machinery equipment are calculated through the coordinate points of the two positions before and after the actual movement of the agricultural machinery equipment, so that the agricultural machinery equipment can move smoothly from the starting point to the target point in the Unity3D virtual farm at a uniform speed. Repeat the above steps to realize the synchronous display of the movement of the agricultural machinery equipment in the Unity3D virtual farm.

2. A real-time positioning system for agricultural machinery motion based on Unity3D, which adopts the real-time positioning method for agricultural machinery motion based on Unity3D described in claim 1.

3. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 2, characterized in that: It includes Unity environment construction module, data acquisition and processing module, agricultural machinery coordinate conversion module, agricultural machinery real-time motion module and trajectory playback module.

4. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 3, characterized in that: The functions of the Unity environment building module are: Use the modeling software Blender to build a virtual farm scene. According to the map image, farm structure diagram or oblique image, a virtual farm scene that is exactly the same as the real farm is built. In the actual modeling, the terrain changes are not considered, and the farm plots and roads are on the same plane. Build a 3D model of the same size as the actual agricultural machinery, such as a harvester, planter, etc., and set the origin as the geometric center of the agricultural machinery; Import the created 3D model into Unity3D, use the visual editor of Unity3D to build a virtual farm scene; record the height h0 from the center point of the agricultural machinery to the ground.

5. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 4, characterized in that: The data acquisition and processing module includes a high-precision GPS sensor installed at the geometric center of the agricultural machinery equipment to collect the longitude and latitude coordinates of the agricultural machinery in real time during movement, and connect the data acquisition system of the GPS sensor to the cloud server to standardize the format of the longitude and latitude coordinates, and collect and store the longitude and latitude coordinates of each agricultural machinery equipment in real time.

6. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 5, characterized in that: The agricultural machinery coordinate conversion module first sets a reference point in the virtual farm environment, and converts the longitude and latitude coordinates of the agricultural machinery equipment into world coordinates in the Unity3D environment through a coordinate conversion algorithm to obtain the position of the agricultural machinery in the virtual environment. In the coordinate conversion process, the Mercator coordinates are used as an intermediary to first convert the longitude and latitude coordinates into Mercator coordinates, and then the Mercator coordinate distance between the current position of the agricultural machinery equipment and the reference point is calculated, and finally the world coordinates of the current position of the agricultural machinery equipment are obtained.

7. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 6, characterized in that: The calculation method of the world coordinates of agricultural machinery in the Unity3D virtual farm is as follows: 1) Select reference points and preprocess them Select a geographical landmark point in the real farm as the reference point, record the longitude and latitude coordinates (lon0, lat0) of the point, find the location of the reference point in the virtual farm scene, and set its longitude and latitude coordinates to (lon0, lat0), record the coordinates of the current reference point in the Unity3D world coordinate system (X0, Y0, Z0), and set Y0 to the height h0 from the center point of the agricultural machinery to the ground; Convert the latitude and longitude coordinates of the above reference points to Mercator coordinates (x0, y0). Mercator projection is a commonly used map projection method that can convert the latitude and longitude information on the earth's surface into plane coordinates. The calculation formula is as follows: Where R is the radius of the Earth. 2) Read the longitude and latitude coordinates of the agricultural machinery and calculate its world coordinates in the Unity3D virtual farm Obtain the longitude and latitude coordinates (lon, lat) of the agricultural machinery in the real farm scene from the cloud platform, and convert the obtained longitude and latitude coordinates into Mercator coordinates (x, y) using the following formula: Where R is the radius of the earth; According to the obtained Mercator coordinates and the Mercator coordinates of the reference point, calculate the X-direction distance d between the target point and the reference point in the Unity3D virtual farm coordinate system x The distance d in the Z direction y , the formula is as follows: d x =x-x0 d y =y-y0 Calculate the coordinates (X, Y, Z) of the target point in the Unity3D virtual farm coordinate system to obtain the position of the agricultural machinery in the Unity3D virtual farm. X=X0+d x Y=Y0 Z=Z0+d y 8. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 7, characterized in that: The agricultural machinery real-time motion module is used to update the position of agricultural machinery in the Unity3D virtual farm in real time. The update method is as follows: 1) Use a long connection or a short connection in Unity3D to obtain the real-time latitude and longitude coordinates and equipment name of the agricultural machinery from the cloud platform once after a fixed time, and the fixed time is t; 2) The acquired longitude and latitude coordinates are converted into world coordinates in the Unity3D virtual farm through calculation to determine the position of the agricultural machinery in the virtual environment; the acquired equipment name, current system time and converted world coordinates are stored in the database; 3) Set two variables position1 and position2 to represent the world coordinates of the starting position and the end position of the agricultural machinery in the time period t in the Unity3D virtual farm. When the system starts, initialize position1 and position2, convert the longitude and latitude coordinates of the agricultural machinery obtained for the first and second times into the world coordinates (X1, Y1, Z1) and (X2, Y2, Z2) in Unity3D, and assign them to position1 and position2 respectively. When both position1 and position2 are not empty, perform the following steps; 4) Smooth movement of agricultural machinery Calculate the distance between position1 and position2 to determine the distance d that the agricultural machine moves from the starting position to the end position within the time period t. The formula is as follows: Calculate the direction vector from position1 to position2 to determine the direction in which the agricultural machine moves from the starting position to the end position within the time period t. The formula is as follows: In the time period t, according to the calculated moving direction of the agricultural machinery, the function Quaterion.LookRotation is used to update the moving direction of the agricultural machinery; according to the moving distance d of the agricultural machinery and the time step t, the Vector3.MoveTowards method is used to gradually update the position of the agricultural machinery so that it moves uniformly and smoothly from the starting position to the end position; 5) When receiving new longitude and latitude coordinates from the cloud server, update the values ​​of position1 and position2, and obtain the new world coordinates (X t ,Y t ,Z t ), reassign the value of position2 to position1, and assign the new coordinate (X t ,Y t ,Z t ) is assigned to position2, and then the agricultural machinery smooth movement step is executed; 6) Repeat the above steps to achieve real-time update of agricultural machinery movement.

9. The real-time positioning system for agricultural machinery movement based on Unity3D according to claim 8, characterized in that: The trajectory playback module works as follows: 1) By inputting the device name and selecting the time period, the world coordinates of the agricultural machinery in Unity3D within the selected time period are obtained from the database established by the agricultural machinery real-time motion module in step 1, and these coordinates are stored in an array; 2) Set two variables pos1 and pos2 to represent the starting position and target position in the same time interval. 3) Initialize the loop and iterate over all coordinate points in the array in each iteration; 4) Set pos1 to the i-th coordinate point in the array. 5) Set pos2 to the i+1th coordinate point in the array. 6) Execute step 4) of the real-time motion module of agricultural machinery, where pos1 and pos2 respectively represent position1 and position2 in step 4) of the real-time motion module of agricultural machinery, to ensure smooth movement of the agricultural machinery in the virtual scene. 7) The traversal is completed, and the movement trajectory playback function of the agricultural machinery at the selected time is completed.