Three-dimensional display implementation method of helmet-mounted display
By loading vertex and fragment shaders on the helmet display to generate and display three-dimensional symbols, the problem of singularity and three-dimensionality of two-dimensional character display in the prior art is solved, and a more realistic three-dimensional display effect is achieved, and the pilot's comprehensive situational awareness ability is improved.
Patent Information
- Application Number
- CN202411709224.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-14
AI Technical Summary
The display content of the existing helmet display is two-dimensional characters, resulting in a single display, no three-dimensional sense, and poor distance perception, which cannot effectively improve the pilot's comprehensive situational awareness ability.
By loading the vertex shader and fragment shader, the vertex data of the three-dimensional symbols to be drawn is generated, and the corresponding index data is generated based on the vertex data, the vertex data is converted into three-dimensional vertex coordinates under the coordinate system with the current aircraft position as the origin of the coordinates, the model matrix, the observation matrix, the crop matrix, and finally, the three-dimensional symbols are drawn and displayed based on the index data and the set matrix.
It realizes three-dimensional display of the pilot's helmet display, providing a more realistic and three-dimensional display effect, significantly improving the pilot's comprehensive situational awareness ability, and is also suitable for different models of helmet displays.
Smart Images

Figure CN119625227A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of display technology, and in particular to a method for realizing three-dimensional display of a helmet display. Background Art
[0002] The Helmet Mounted Display (HMD) can provide the pilot with aiming information and aircraft attitude information. It is a high-performance aiming display device with a large field of view and the ability to quickly capture targets. It has become an important part of the aircraft cockpit display system. The three-dimensional display of the helmet display can provide the pilot with a more realistic and three-dimensional display effect, enhancing the pilot's comprehensive situational awareness.
[0003] However, the inventors of the present application have discovered that the contents displayed on the current helmet displays are all two-dimensional characters, which can only display some basic flight information, mission information and prompt information. There are problems such as single character display, lack of three-dimensional sense and poor distance perception. Summary of the invention
[0004] In view of this, the embodiments of the present application propose a method for realizing three-dimensional display of a helmet display, which can provide the pilot with a more realistic and three-dimensional display effect, thereby significantly improving the pilot's comprehensive situational awareness capability.
[0005] In a first aspect, an embodiment of the present application provides a method for realizing three-dimensional display of a helmet display, comprising:
[0006] Load the vertex shader and fragment shader. The vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes. The fragment shader is used to calculate the final color of the pixel.
[0007] Generate vertex data of the three-dimensional symbol to be drawn, and generate corresponding index data based on the vertex data; wherein the vertex data includes longitude, latitude and altitude;
[0008] Converting the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin;
[0009] Setting the model matrix, the observation matrix, and the clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn;
[0010] Based on the index data and the set model matrix, observation matrix, and clipping matrix, the three-dimensional symbol to be drawn is drawn and displayed on the helmet display.
[0011] In some optional embodiments, the three-dimensional symbol to be drawn includes a three-dimensional terrain grid to be drawn and a three-dimensional threat envelope to be drawn;
[0012] For the 3D terrain grid to be drawn, the vertex data of the 3D symbol to be drawn is generated, including:
[0013] Generate vertex data of the three-dimensional terrain grid to be drawn according to the longitude, latitude, altitude of the current aircraft and the elevation data within a preset range of the current longitude, latitude, and altitude;
[0014] For the three-dimensional threat envelope to be drawn, vertex data of the three-dimensional symbol to be drawn is generated, including:
[0015] According to the longitude, latitude, altitude and radius of the current threat area, vertex data of the three-dimensional threat envelope to be drawn are generated.
[0016] In some optional embodiments, converting the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin includes:
[0017] Converting the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in the earth coordinate system established with the center of the earth as the origin;
[0018] The three-dimensional vertex coordinates in the earth coordinate system are converted into the three-dimensional vertex coordinates in the coordinate system established with the current aircraft position as the coordinate origin.
[0019] In some optional embodiments, the longitude, latitude, and altitude of the three-dimensional symbol to be drawn are lon1, lat1, and height1 respectively, and the vertex data of the three-dimensional symbol to be drawn is converted into three-dimensional vertex coordinates in a terrestrial coordinate system established with the center of the earth as the origin, including:
[0020] The longitude and latitude of the three-dimensional symbol to be drawn are converted into radians, which can be expressed by the formula:
[0021] θ=(lat1*π) / 180,
[0022] Among them, θ and They represent the arcs converted from the latitude and longitude of the three-dimensional symbol to be drawn;
[0023] Based on the converted radian and the height of the three-dimensional symbol to be drawn, the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin are obtained, which is expressed by the formula:
[0024]
[0025]
[0026] Z = (r + height1) * sinθ;
[0027] Among them, r represents the radius of the earth, and (X, Y, Z) represents the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin.
[0028] In some optional embodiments, the longitude, latitude, and altitude of the current aircraft are lon2, lat2, and height2 respectively, and the coordinates of the current aircraft in the earth coordinate system established with the center of the earth as the origin are (x, y, z). The three-dimensional vertex coordinates in the earth coordinate system are converted into the three-dimensional vertex coordinates in the coordinate system established with the current aircraft position as the coordinate origin, including:
[0029] Convert the current aircraft's longitude and latitude into radians, expressed by the formula:
[0030] ρ=(lat2*π) / 180, σ=(lon2*π) / 180;
[0031] Among them, ρ and σ represent the radians converted from the current aircraft's latitude and longitude respectively;
[0032] The rotation matrix R is calculated based on the converted radians and is expressed as follows:
[0033]
[0034] Based on the rotation matrix, the coordinates of the current aircraft in the earth coordinate system established with the center of the earth as the origin, and the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin, the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the coordinate system established with the current aircraft position as the coordinate origin are obtained, which is expressed by the formula:
[0035] Result x =R 11 *(Xx)+R 12 *(Yy)+R 13 *(Zz);
[0036] Result y =R 21 *(Xx)+R 22 *(Yy)+R 23 *(Zz);
[0037] Result z =R 31 *(Xx)+R 32 *(Yy)+R 33 *(Zz);
[0038] Among them, (resultx ,result y ,result z ) represents the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the coordinate system established with the current aircraft position as the coordinate origin.
[0039] In some optional embodiments, the model matrix is responsible for the translation, rotation, and scaling of the three-dimensional symbol; the observation matrix is responsible for determining the angle of observation of the three-dimensional symbol, and the content of the three-dimensional symbol seen at different observation angles is different; the cropping matrix is responsible for cropping within a preset spatial range, displaying the three-dimensional symbols within the preset spatial range, and cropping the three-dimensional symbols that are not within the preset spatial range. The cropping matrix is divided into orthogonal projection and perspective projection.
[0040] In some optional embodiments, based on the index data and the set model matrix, observation matrix, and clipping matrix, drawing the three-dimensional symbol to be drawn and displaying it on the helmet display includes:
[0041] Vertex data and index data are stored in the GPU video memory through the vertex buffer object and index buffer object of OpenGL ES2.0 respectively. By calling the standard API function of OpenGL ES2.0, the vertex data is drawn in a certain order according to the index data to draw the three-dimensional symbol to be drawn, and displayed on the helmet display.
[0042] A three-dimensional display implementation method for a helmet display proposed in an embodiment of the present application effectively solves the problems of traditional helmet displays such as single two-dimensional character display, lack of three-dimensional sense, and poor distance perception. First, a vertex shader for 3D coordinate conversion and basic processing of vertex attributes and a final color fragment shader for calculating pixel points are loaded, and then vertex data of the three-dimensional symbol to be drawn are generated, and corresponding index data are generated based on the vertex data. The vertex data of the three-dimensional symbol to be drawn is then converted into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin. Then, a model matrix, an observation matrix, and a clipping matrix are set based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn. Finally, based on the index data and the set model matrix, observation matrix, and clipping matrix, the three-dimensional symbol to be drawn is drawn and displayed on the helmet display, which can provide the pilot with a more realistic and three-dimensional display effect, thereby significantly improving the pilot's comprehensive situational awareness capability. At the same time, it is not limited to the model of the helmet display and has high universal applicability.
[0043] In a second aspect, an embodiment of the present application proposes a three-dimensional display implementation system for a helmet display, comprising:
[0044] The shader loading module is used to load vertex shaders and fragment shaders. The vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes. The fragment shader is used to calculate the final color of the pixel.
[0045] A data generation module, used to generate vertex data of the three-dimensional symbol to be drawn, and to generate corresponding index data based on the vertex data; wherein the vertex data includes longitude, latitude and altitude;
[0046] A coordinate conversion module, used to convert the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin;
[0047] A matrix setting module, used for setting a model matrix, an observation matrix, and a clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn;
[0048] The drawing execution module is used to draw the three-dimensional symbol to be drawn and display it on the helmet display based on the index data and the set model matrix, observation matrix, and clipping matrix.
[0049] In a third aspect, an embodiment of the present application proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a three-dimensional display implementation method for a helmet display as described in the first aspect above.
[0050] In a fourth aspect, an embodiment of the present application proposes a computer-readable storage medium storing a computer program, which, when executed by a processor, can implement a three-dimensional display implementation method of a helmet display as described in the first aspect above.
[0051] It can be understood that the beneficial effects of the second to fourth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the related technologies, the drawings required for use in the embodiments of the present application or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0053] Figure 1 It is a flow chart of a method for realizing three-dimensional display of a helmet display provided by an embodiment of the present application;
[0054] Figure 2 This is a three-dimensional display effect diagram of a helmet display provided by an embodiment of the present application;
[0055] Figure 3 is a structural diagram of a three-dimensional display implementation system of a helmet display provided by another embodiment of the present application;
[0056] Figure 4 It is a structural diagram of an electronic device provided in another embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. In the various embodiments of the present application, many technical details are proposed in order to make the reader better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is only for the convenience of description, and the specific implementation mode of the present application should not constitute any limitation. The various embodiments can be combined with each other and referenced to each other under the premise of no contradiction.
[0058] An embodiment of the present application proposes a method for implementing three-dimensional display of a helmet display, which is applied to an electronic device, wherein the electronic device can be a terminal or a server. In this embodiment and the following embodiments, the electronic device is described using a server as an example. The implementation details of the method for implementing three-dimensional display of a helmet display proposed in this embodiment are specifically described below. The following content is only the implementation details provided for ease of understanding and is not necessary for implementing this solution.
[0059] The process of a method for realizing three-dimensional display of a helmet display proposed in this embodiment is as follows: Figure 1 As shown, including:
[0060] Step 101, loading the vertex shader and the fragment shader, the vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes, and the fragment shader is used to calculate the final color of the pixel.
[0061] In the specific implementation, the server first needs to load the vertex shader and fragment shader. The vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes, while the fragment shader is used to calculate the final color of the pixel.
[0062] A shader is a small program that the GPU runs for each rendering pipeline stage. It is mainly divided into two types: vertex shader and fragment shader. Vertex shader is mainly used to convert 3D coordinates into another type of 3D coordinates, and perform some basic processing on vertex attributes. Fragment shader is mainly used to calculate the final color of the pixel. Drawing a 3D symbol requires a vertex shader and a fragment shader, which are loaded, compiled, and linked to form an executable program, and finally executed on the GPU.
[0063] Step 102, generating vertex data of the three-dimensional symbol to be drawn, and generating corresponding index data based on the vertex data, wherein the vertex data includes longitude, latitude and altitude.
[0064] In the specific implementation, after the server loads the vertex shader and fragment shader, it immediately generates the vertex data of the 3D symbol to be drawn, and generates the corresponding index data based on the vertex data; the vertex data includes longitude, latitude and altitude. 3D symbols are basically composed of line segments connected by many vertices. Compared with 2D symbols, each vertex of 3D symbols has depth information and has a three-dimensional sense.
[0065] In one example, the three-dimensional symbols to be drawn include but are not limited to the three-dimensional terrain grid to be drawn and the three-dimensional threat envelope to be drawn, and different three-dimensional symbols generate vertex data in different ways. For example, for the three-dimensional terrain grid to be drawn, it is necessary to generate the vertex data of the three-dimensional terrain grid to be drawn based on the longitude, latitude, and altitude of the current aircraft, and the elevation data within the preset range of the current longitude, latitude, and altitude. For the three-dimensional threat envelope to be drawn, it is necessary to generate the vertex data of the three-dimensional threat envelope to be drawn based on the longitude, latitude, and altitude of the current threat area, as well as the radius size of the current threat area.
[0066] It is worth noting that after the vertex data with depth information is generated, corresponding index data needs to be generated based on the vertex data. The index data specifies the order in which the vertex data used to draw the three-dimensional symbols will be used to draw the line segments. When there are a large number of vertices, it is more efficient to use index data to draw three-dimensional symbols.
[0067] Step 103 : converting the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin.
[0068] In a specific implementation, after generating vertex data and index data of the three-dimensional symbol to be drawn, the server can convert the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin.
[0069] In one example, the coordinate conversion process is carried out in two steps. The first step is to convert the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in the earth coordinate system established with the center of the earth as the origin. The second step is to convert the three-dimensional vertex coordinates in the earth coordinate system into three-dimensional vertex coordinates in the coordinate system established with the current aircraft position as the coordinate origin.
[0070] Assume that the longitude, latitude, and height of the 3D symbol to be drawn are lon1, lat1, and height1 respectively. The server converts the longitude and latitude of the 3D symbol to be drawn into radians, that is, let θ = (lat1*π) / 180. θ and They represent the radians converted from the latitude and longitude of the three-dimensional symbol to be drawn. Subsequently, the server obtains the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin based on the converted radians and the height of the three-dimensional symbol to be drawn. The process is expressed by the formula:
[0071]
[0072]
[0073] Z = (r + height1) * sinθ;
[0074] Among them, r represents the radius of the earth, and (X, Y, Z) represents the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin.
[0075] Suppose the longitude, latitude, and altitude of the current aircraft are lon2, lat2, and height2 respectively, and the coordinates of the current aircraft in the earth coordinate system established with the center of the earth as the origin are (x, y, z). The server first converts the longitude and latitude of the current aircraft into radians. The process is expressed by the formula: ρ = (lat2*π) / 180, σ = (lon2*π) / 180, ρ and σ represent the radians converted from the latitude and longitude of the current aircraft respectively.
[0076] Then, the server calculates the rotation matrix R based on the converted radians. The process is expressed by the formula:
[0077]
[0078] After that, the server needs to perform a rotation transformation based on the rotation matrix, the coordinates of the current aircraft in the earth coordinate system established with the center of the earth as the origin, and the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin, and obtain the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the coordinate system established with the current aircraft position as the coordinate origin. The process is expressed by the formula:
[0079] Result x =R 11 *(Xx)+R 12 *(Yy)+R 13 *(Zz);
[0080] Result y =R 21 *(Xx)+R 22 *(Yy)+R 23 *(Zz);
[0081] Result x =R 31 *(Xx)+R 32 *(Yy)+R 33 *(Zz);
[0082] Among them, (result x ,result y ,result z ) represents the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the coordinate system established with the current aircraft position as the coordinate origin.
[0083] Step 104, setting a model matrix, a viewing matrix, and a clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn.
[0084] In the specific implementation, drawing three-dimensional symbols involves the conversion of many coordinate systems, including local coordinates, world coordinates, observation coordinates, clipping coordinates, screen coordinates, etc. Among them, the three most important matrices involved are the model matrix, observation matrix, and clipping matrix. The server needs to set the model matrix, observation matrix, and clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn.
[0085] In an example, the model matrix is responsible for the translation, rotation, and scaling of three-dimensional symbols; the observation matrix is responsible for determining the angle of observation of the three-dimensional symbol. The content of the three-dimensional symbol seen at different observation angles is different; the clipping matrix is responsible for clipping within the preset spatial range, displaying the three-dimensional symbols within the preset spatial range and clipping out the three-dimensional symbols that are not within the preset spatial range. The clipping matrix is divided into orthogonal projection and perspective projection.
[0086] Generally speaking, the clipping matrix uses perspective projection, which will produce a display effect where objects that are closer appear larger and objects that are farther away appear smaller.
[0087] Step 105 , based on the index data and the set model matrix, observation matrix, and clipping matrix, the three-dimensional symbol to be drawn is drawn and displayed on the helmet display.
[0088] In a specific implementation, after the server sets up each matrix, it can draw the three-dimensional symbol to be drawn and display it on the helmet display based on the index data and the set model matrix, observation matrix, and clipping matrix.
[0089] In one example, vertex data and index data are stored in GPU memory through OpenGL ES2.0 vertex buffer objects and index buffer objects respectively. By calling the standard API function of OpenGL ES2.0, the vertex data is used to draw the 3D symbol to be drawn in a certain order according to the index data and displayed on the helmet display. The 3D display effect diagram of the helmet display can be as follows: Figure 2 shown.
[0090] A three-dimensional display implementation method for a helmet display proposed in this embodiment effectively solves the problems of traditional helmet displays such as single two-dimensional character display, lack of three-dimensional sense, and poor distance perception. First, a vertex shader for converting 3D coordinates and performing basic processing on vertex attributes and a final color fragment shader for calculating pixel points are loaded, and then vertex data of the three-dimensional symbol to be drawn are generated, and corresponding index data are generated based on the vertex data. The vertex data of the three-dimensional symbol to be drawn is then converted into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin. Then, a model matrix, an observation matrix, and a clipping matrix are set based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn. Finally, based on the index data and the set model matrix, observation matrix, and clipping matrix, the three-dimensional symbol to be drawn is drawn and displayed on the helmet display, which can provide the pilot with a more realistic and three-dimensional display effect, thereby significantly improving the pilot's comprehensive situation awareness capability. At the same time, the model of the helmet display is not limited, and it has high universal applicability.
[0091] The step division of the above methods is only for clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this application; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this application.
[0092] Another embodiment of the present application proposes a three-dimensional display implementation system for a helmet display. The implementation details of the three-dimensional display implementation system for a helmet display proposed in this embodiment are specifically described below. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for implementing this example. Figure 31 is a schematic diagram of the structure of a three-dimensional display implementation system of a helmet display proposed in this embodiment, the system includes: a shader loading module 201, a data generating module 202, a coordinate conversion module 203, a matrix setting module 204 and a drawing execution module 205.
[0093] The shader loading module 201 is used to load the vertex shader and the fragment shader. The vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes. The fragment shader is used to calculate the final color of the pixel.
[0094] The data generation module 202 is used to generate vertex data of the three-dimensional symbol to be drawn, and to generate corresponding index data based on the vertex data; wherein the vertex data includes longitude, latitude and altitude.
[0095] The coordinate conversion module 203 is used to convert the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin.
[0096] The matrix setting module 204 is used to set the model matrix, the observation matrix, and the clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn.
[0097] The drawing execution module 205 is used to draw the three-dimensional symbol to be drawn and display it on the helmet display 300 based on the index data and the set model matrix, observation matrix, and clipping matrix.
[0098] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0099] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiments are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiments.
[0100] Another embodiment of the present application provides an electronic device, whose specific structure is as follows: Figure 4As shown, it includes: at least one processor 401; and a memory 402 that is communicatively connected to the at least one processor 401; wherein the memory 402 stores instructions that can be executed by the at least one processor 401, and the instructions are executed by the at least one processor 401 so that the at least one processor 401 can execute a three-dimensional display implementation method of a helmet display described in the above-mentioned method embodiments.
[0101] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and will not be further described in this article. The bus interface is responsible for providing an interface between the bus and the transceiver. The transceiver can be one component or multiple components, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium through an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0102] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0103] Another embodiment of the present application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement a three-dimensional display implementation method of a helmet display described in the above method embodiments.
[0104] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory), RAM (Random Access Memory), disk or optical disk and other media that can store program codes.
[0105] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for realizing three-dimensional display of a helmet display, characterized in that: include: Load the vertex shader and fragment shader. The vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes. The fragment shader is used to calculate the final color of the pixel. Generate vertex data of the three-dimensional symbol to be drawn, and generate corresponding index data based on the vertex data; wherein the vertex data includes longitude, latitude and altitude; Converting the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin; Setting the model matrix, the observation matrix, and the clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn; Based on the index data and the set model matrix, observation matrix, and clipping matrix, the three-dimensional symbol to be drawn is drawn and displayed on the helmet display.
2. The method for realizing three-dimensional display of a helmet display according to claim 1, characterized in that: The three-dimensional symbols to be drawn include a three-dimensional terrain grid to be drawn and a three-dimensional threat envelope to be drawn; For the 3D terrain grid to be drawn, the vertex data of the 3D symbol to be drawn is generated, including: Generate vertex data of the three-dimensional terrain grid to be drawn according to the longitude, latitude, altitude of the current aircraft and the elevation data within a preset range of the current longitude, latitude, and altitude; For the three-dimensional threat envelope to be drawn, vertex data of the three-dimensional symbol to be drawn is generated, including: According to the longitude, latitude, altitude and radius of the current threat area, vertex data of the three-dimensional threat envelope to be drawn are generated.
3. The method for realizing three-dimensional display of a helmet display according to claim 1, characterized in that: The vertex data of the 3D symbol to be drawn is converted into the 3D vertex coordinates in the coordinate system established with the current aircraft position as the coordinate origin, including: Converting the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in the earth coordinate system established with the center of the earth as the origin; The three-dimensional vertex coordinates in the earth coordinate system are converted into the three-dimensional vertex coordinates in the coordinate system established with the current aircraft position as the coordinate origin.
4. The method for realizing three-dimensional display of a helmet display according to claim 3, characterized in that: set up The longitude, latitude and height of the three-dimensional symbol to be drawn are lon1, lat1 and height1 respectively. The vertex data of the three-dimensional symbol to be drawn is converted into the three-dimensional vertex coordinates in the earth coordinate system established with the center of the earth as the origin, including: The longitude and latitude of the three-dimensional symbol to be drawn are converted into radians, which can be expressed by the formula: θ=(lat1*π) / 180, Among them, θ and They represent the arc converted from the latitude and longitude of the three-dimensional symbol to be drawn; Based on the converted radian and the height of the three-dimensional symbol to be drawn, the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin are obtained, which is expressed by the formula: Z = (r + height1) * sinθ; Among them, r represents the radius of the earth, and (X, Y, Z) represents the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin.
5. The method for realizing three-dimensional display of a helmet display according to claim 4, characterized in that: The longitude, latitude, and altitude of the current aircraft are lon2, lat2, and height2 respectively. The coordinates of the current aircraft in the earth coordinate system established with the center of the earth as the origin are (x, y, z). The three-dimensional vertex coordinates in the earth coordinate system are converted to the three-dimensional vertex coordinates in the coordinate system established with the current aircraft position as the coordinate origin, including: Convert the current aircraft's longitude and latitude into radians, expressed by the formula: ρ=(lat2*π) / 180, σ=(lon2*π) / 180; Among them, ρ and σ represent the radians converted from the current aircraft's latitude and longitude respectively; The rotation matrix R is calculated based on the converted radians and is expressed as follows: Based on the rotation matrix, the coordinates of the current aircraft in the earth coordinate system established with the center of the earth as the origin, and the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the earth coordinate system established with the center of the earth as the origin, the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the coordinate system established with the current aircraft position as the coordinate origin are obtained, which is expressed by the formula: result x =R 11 *(X-x)+R 12 *(Y-y)+R 13 *(Z-z); result y =R 21 *(X-x)+R 22 *(Y-y)+R 23 *(Z-z); result z =R 31 *(X-x)+R 32 *(Y-y)+R 33 *(Z-z); Among them, (result x ,result y ,result z ) represents the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn in the coordinate system established with the current aircraft position as the coordinate origin.
6. The method for realizing three-dimensional display of a helmet display according to claim 1, characterized in that: The model matrix is responsible for the translation, rotation, and scaling of three-dimensional symbols; the observation matrix is responsible for determining the angle of observation of three-dimensional symbols. The content of three-dimensional symbols seen at different observation angles is different; the clipping matrix is responsible for clipping within the preset spatial range, displaying the three-dimensional symbols within the preset spatial range and clipping out the three-dimensional symbols that are not within the preset spatial range. The clipping matrix is divided into orthogonal projection and perspective projection.
7. A method for realizing three-dimensional display of a helmet display according to any one of claims 1 to 6, characterized in that: Based on the index data and the set model matrix, observation matrix, and clipping matrix, the 3D symbol to be drawn is drawn and displayed on the helmet display, including: Vertex data and index data are stored in the GPU video memory through the vertex buffer object and index buffer object of OpenGL ES2.0 respectively. By calling the standard API function of OpenGL ES2.0, the vertex data is drawn in a certain order according to the index data to draw the three-dimensional symbol to be drawn, and displayed on the helmet display.
8. A three-dimensional display implementation system for a helmet display, characterized in that: include: The shader loading module is used to load vertex shaders and fragment shaders. The vertex shader is used to convert 3D coordinates and perform basic processing on vertex attributes. The fragment shader is used to calculate the final color of the pixel. A data generation module, used to generate vertex data of the three-dimensional symbol to be drawn, and to generate corresponding index data based on the vertex data; wherein the vertex data includes longitude, latitude and altitude; A coordinate conversion module, used to convert the vertex data of the three-dimensional symbol to be drawn into three-dimensional vertex coordinates in a coordinate system established with the current aircraft position as the coordinate origin; A matrix setting module, used for setting a model matrix, an observation matrix, and a clipping matrix based on the three-dimensional vertex coordinates of the three-dimensional symbol to be drawn; The drawing execution module is used to draw the three-dimensional symbol to be drawn and display it on the helmet display based on the index data and the set model matrix, observation matrix, and clipping matrix.
9. An electronic device, characterized in that: include: at least one processor; and, a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a three-dimensional display implementation method for a helmet display as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it can implement a three-dimensional display implementation method of a helmet display as claimed in any one of claims 1 to 7.