A method and device for switching a three-dimensional visualized geographic scene based on a map framework
By calculating the offset and motion data of adversarial units within the Cesium map framework, the conversion deviation from the independent coordinate system to the GPS geographic coordinate system is resolved, enabling the reuse of tactical scenarios across multiple scenarios and improving the reliability of tactical scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU EBOYLAMP ELECTRONICS CO LTD
- Filing Date
- 2023-06-28
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, Cesium has a deviation in the conversion from independent coordinate systems to GPS geographic coordinate systems, which makes it impossible to reuse a single tactical scenario in multiple scenarios, thus reducing the reliability of the tactical scenario.
By acquiring the tactical scenario information and target confrontation scenario name input by the user, the offset coordinate set of the confrontation unit is determined, and the scenario center coordinates are searched in the preset database. The target coordinate set is calculated using longitude, latitude and altitude offsets, and the trajectory of the confrontation unit is drawn by combining motion data to achieve the accuracy of coordinate system transformation.
It enables the reuse of a single tactical scenario in multiple scenarios, improving the reliability and utilization of the tactical scenario.
Smart Images

Figure CN117011484B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of military 3D visualization, and in particular to a method and apparatus for switching 3D visualization geographic scenes based on a map frame. Background Technology
[0002] Cesium, an open-source JavaScript-based 3D mapping framework, boasts advantages such as cross-platform compatibility, lightweight design, and support for multiple data formats. Typically, within a B / S architecture-based 3D visualization solution, Cesium can be used to visualize various 3D map scenarios, thereby addressing complex scenarios in military simulation environments.
[0003] In actual scenario simulation, the application of tactical scenario deduction is indispensable. This tactical scenario deduction can be understood as formulating feasible scenarios according to the adversary's intentions, refining the adversary unit tasks at each stage, and finally presenting the real-time exercise and result analysis process to the user in a visual manner. However, because the deviation problem of Cesium's conversion from an independent coordinate system to the GPS geographic coordinate system has not been well resolved in the existing technology, it is impossible to reuse a single tactical scenario in multiple scenarios. This easily leads to the underutilization of the tactical scenarios formulated by the user, thus greatly reducing the reliability of the scenarios. Summary of the Invention
[0004] This application aims to address the aforementioned problem of the inability to reuse a single tactical scenario across multiple scenarios. Embodiments of this application provide a method and apparatus for switching between three-dimensional visualized geographic scenes based on a map frame. The technical solution is as follows:
[0005] Firstly, embodiments of this specification provide a method for switching between three-dimensional visualized geographic scenes based on a map frame, including:
[0006] Obtain the tactical scenario information and target confrontation scenario name input by the user, and determine the first offset coordinate set of the confrontation unit based on the relative position of the confrontation unit in the tactical scenario information and the preset center coordinates.
[0007] The system retrieves the center coordinates of the scene corresponding to the name of the target adversarial scene from the preset database, and calculates the first target coordinate set based on the first offset coordinate set and the scene center coordinates. The preset database includes at least two adversarial scene names and the scene center coordinates corresponding to each adversarial scene. The coordinate system corresponding to the preset center coordinates is different from the coordinate system corresponding to the scene center coordinates.
[0008] Based on the first offset coordinate set and the motion data of the opposing units in the tactical scenario information, the second target coordinate set is calculated.
[0009] Based on the first target coordinate set and the second target coordinate set, the first trajectory of the adversarial unit in the target adversarial scenario is drawn.
[0010] In one alternative of the first aspect, the first offset coordinate set includes longitude offsets and latitude offsets corresponding to the adversarial units;
[0011] Based on the first offset coordinate set and the scene center coordinates, the first target coordinate set is calculated, including:
[0012] The radius offset is obtained based on the scene center coordinates and the preset Earth radius;
[0013] Substitute the longitude offset, radius offset, and scene center coordinates corresponding to the adversarial unit into the preset longitude calculation formula to obtain the longitude coordinates corresponding to the longitude offset;
[0014] Substitute the latitude offset corresponding to the adversarial unit, the preset Earth radius, and the scene center coordinates into the preset latitude calculation formula to obtain the latitude coordinates corresponding to the latitude offset.
[0015] The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset.
[0016] In another alternative to the first aspect, the first offset coordinate set also includes an altitude offset;
[0017] Based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset, the first target coordinate set is obtained, including:
[0018] Use the altitude offset corresponding to the combat unit as the altitude coordinate;
[0019] The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset, the latitude coordinates corresponding to the latitude offset, and the altitude coordinates.
[0020] In another alternative to the first aspect, the motion data of the adversary unit includes Euler angles corresponding to a preset time interval and motion velocity;
[0021] Based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information, the second target coordinate set is calculated, including:
[0022] The movement path of the adversary unit is calculated based on Euler angles, movement speed, and a preset time interval.
[0023] Based on the first offset coordinate set and the movement path of the adversary unit, the second offset coordinate set corresponding to the time interval between the adversary unit and the preset time interval is calculated.
[0024] Based on the second offset coordinate set and the scene center coordinates, the second target coordinate set is calculated.
[0025] In another alternative to the first aspect, after drawing the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set, the method further includes:
[0026] Select the tactical adjustment coordinate set in the coordinate system corresponding to the scene center coordinates, and perform coordinate transformation on the tactical adjustment coordinate set to obtain the third offset coordinate set;
[0027] The scene center coordinates are processed based on a preset coordinate transformation formula to obtain the scene center transformed coordinates.
[0028] The fourth offset coordinate set is calculated based on the third offset coordinate set, the scene center transformation coordinates, and the preset Earth radius.
[0029] The coordinate set of the third target is calculated based on the coordinate set of the fourth offset.
[0030] In another alternative to the first aspect, the third target coordinate set is calculated based on the fourth offset coordinate set, including:
[0031] Interpolation calculations are performed on the offset coordinates corresponding to any two adjacent adversarial units in the fourth offset coordinate set to obtain the fifth offset coordinate set; wherein, the number of offset coordinates of adversarial units in the fifth offset coordinate set is greater than the number of offset coordinates of adversarial units in the fourth offset coordinate set.
[0032] The third target coordinate set is calculated based on the fifth offset coordinate set and the scene center coordinates.
[0033] In another alternative to the first aspect, after calculating the third target coordinate set based on the fourth offset coordinate set, the following is also included:
[0034] Based on the coordinate sets of the first and third targets, the second trajectory of the adversarial unit in the target adversarial scenario is drawn.
[0035] Secondly, embodiments of this application provide a three-dimensional visualization geographic scene switching device based on a map frame, comprising:
[0036] The first processing module is used to obtain the tactical scenario information and the name of the target confrontation scenario input by the user, and determine the first offset coordinate set of the confrontation unit based on the relative position of the confrontation unit and the preset center coordinate in the tactical scenario information.
[0037] The second processing module is used to find the scene center coordinates corresponding to the target adversarial scene name in the preset database, and to calculate the first target coordinate set based on the first offset coordinate set and the scene center coordinates; wherein, the preset database includes at least two adversarial scene names and the scene center coordinates corresponding to each adversarial scene, and the coordinate system corresponding to the preset center coordinates is inconsistent with the coordinate system corresponding to the scene center coordinates.
[0038] The third processing module is used to calculate the second target coordinate set based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information.
[0039] The fourth processing module is used to draw the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set.
[0040] Thirdly, embodiments of this application also provide a three-dimensional visualization geographic scene switching device based on a map frame, including a processor and a memory;
[0041] The processor is connected to the memory;
[0042] Memory, used to store executable program code;
[0043] The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to implement the map-frame-based three-dimensional visualization geographic scene switching method provided by the first aspect or any implementation of the first aspect of the embodiments of this application.
[0044] Fourthly, embodiments of this application provide a computer storage medium storing a computer program, which includes program instructions. When executed by a processor, the program instructions can implement the map-frame-based three-dimensional visualization geographic scene switching method provided by the first aspect or any implementation of the first aspect of this application.
[0045] The beneficial effects of the technical solutions provided in some embodiments of this specification include at least the following:
[0046] In the process of switching between 3D visualized geographic scenes based on a map framework, the system acquires the user-input tactical scenario information and the name of the target adversary scenario. Based on the relative positions of the adversary units in the tactical scenario information and the preset center coordinates, it determines the first offset coordinate set of the adversary units. It then searches a preset database for the scene center coordinates corresponding to the target adversary scenario name and calculates the first target coordinate set based on the first offset coordinate set and the scene center coordinates. Based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information, it calculates the second target coordinate set. Finally, based on the first and second target coordinate sets, it draws the first trajectory of the adversary unit in the target adversary scenario. By compensating for the deviation in the conversion from an independent coordinate system to the GPS geographic coordinate system, it enables the reuse of a single tactical scenario in multiple scenarios, ensuring full utilization of the user-defined tactical scenarios and thus improving their reliability. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 A flowchart illustrating an overall method for switching three-dimensional visual geographic scenes based on a map frame, as provided in this application embodiment;
[0049] Figure 2 A schematic diagram showing the relative positional relationship between the adversarial unit and the preset center in an independent coordinate system in a tactical scenario designed to decouple from the adversarial scene.
[0050] Figure 3 A schematic diagram of the structure of a map-frame-based 3D visualization geographic scene switching device provided in an embodiment of this application;
[0051] Figure 4 This is a schematic diagram of the structure of another map-frame-based 3D visualization geographic scene switching device provided in the embodiments of this application. Detailed Implementation
[0052] The technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings.
[0053] In the following description, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance. The following description provides multiple embodiments of this application, which can be substituted or combined with each other. Therefore, this application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B, and C, and another embodiment includes features B and D, then this application should also be considered to include embodiments containing one or more other possible combinations of A, B, C, and D, even if such embodiments are not explicitly described in the following text.
[0054] The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made to the function and arrangement of the described elements without departing from the scope of this application. Various processes or components may be appropriately omitted, substituted, or added to the examples. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
[0055] Please see Figure 1 , Figure 1 The diagram shows an overall flowchart of a map-frame-based three-dimensional visualization geographic scene switching method provided in an embodiment of this application.
[0056] like Figure 1 As shown, this map-frame-based 3D visualization geographic scene switching method may include at least the following steps:
[0057] Step 101: Obtain the tactical scenario information and target confrontation scenario name input by the user, and determine the first offset coordinate set of the confrontation unit based on the relative position of the confrontation unit and the preset center coordinate in the tactical scenario information.
[0058] In the embodiments of this application, the three-dimensional visualization geographic scene switching method based on the map frame can be, but is not limited to, using the client as the execution subject; the execution subject can also be the server.
[0059] Understandably, the client primarily handles user input, coordinate calculation, and trajectory drawing. During trajectory drawing, the client establishes a persistent connection with the server and sends requests to the server for relevant algorithms at a pre-agreed frequency. Upon receiving the request, the server invokes core methods in the situational analysis algorithm module to process various coordinate data and provide real-time responses. The processed coordinate data is then sent back to the client, which performs real-time drawing based on the coordinate data returned by the server. Therefore, the client can compensate for coordinate system transformation errors through coordinate transformation and related calculations, thereby enabling the reuse of a single tactical scenario across multiple scenarios.
[0060] Specifically, the tactical scenario information input by the user includes information on both sides' units, the confrontation strategies, the relative positions of the units, and the preset center coordinates. The confrontation strategies include, but are not limited to, attack strategies, defense strategies, patrol strategies, and tracking strategies. Furthermore, attack strategies include, but are not limited to, various attack methods such as pincer attack, cross attack, bilateral attack, unilateral attack, air-to-ground strike, multi-target strike, and defensive attack. In addition, the preset center coordinates are based on an independent coordinate system, that is, an abstract coordinate system independent of actual geographical location. The relative positions of the units are represented by spatial coordinates of their offset from the preset center coordinates, denoted as... P2, P3...Pn. These coordinates will also serve as the initial positions of both sides in the confrontation, i.e., the first offset coordinate set. Furthermore, the target confrontation scenario name entered by the user can be found in a pre-set database. This database stores some necessary attributes of the confrontation scenario, including but not limited to the scenario name, the cover image corresponding to the scenario, the center coordinates of the scenario, and the scenario affiliation of the scenario. The pre-set database includes at least two scenarios and the corresponding scene center coordinates for each scenario.
[0061] The relative positional relationship between the initial position and the preset center coordinates of the adversarial unit in the tactical scenario decoupled from the adversarial scenario in an independent coordinate system can be found in [reference needed]. Figure 2 .
[0062] like Figure 2 As shown, the opposing sides are divided into red and blue teams. red1, red2, red3, and red4 are four opposing units for the red team, and blue1, blue2, blue3, and blue4 are four opposing units for the blue team. The diamond-shaped point in the diagram can be a preset scene center, which serves as the origin of an independent coordinate system. The diagram illustrates one possible initial position for both sides and the relative positional relationship of the opposing units with respect to the preset center coordinates, i.e., the relationship between the initial position coordinates of the opposing units and the origin coordinates.
[0063] Step 102: Find the center coordinates of the scene corresponding to the name of the confrontation scene with the target in the preset database, and calculate the first target coordinate set based on the first offset coordinate set and the scene center coordinates.
[0064] Specifically, based on the target adversarial scenario name input by the user, the system retrieves the corresponding scenario center coordinates from a pre-defined database. These scenario center coordinates are generated using the GPS coordinate system and can be represented as C(lng, lat) or C(lng, lat, alt). lat represents the longitude of the scene center, alt represents the latitude of the scene center, and alt represents the altitude of the scene center.
[0065] Furthermore, the client can convert the first offset coordinate set and the scene center coordinates to obtain the first target coordinate set, thereby converting the initial position coordinates of the adversarial unit from an independent coordinate system to the GPS geographic coordinate system and compensating for the deviation between the two coordinate systems, ensuring the accuracy of the initial position coordinates of the adversarial unit in the GPS geographic coordinate system.
[0066] As an optional embodiment of this application, the first offset coordinate set includes longitude offset and latitude offset corresponding to the countermeasure unit;
[0067] Based on the first offset coordinate set and the scene center coordinates, the first target coordinate set is calculated, including:
[0068] The radius offset is obtained based on the scene center coordinates and the preset Earth radius;
[0069] Substitute the longitude offset, radius offset, and scene center coordinates corresponding to the adversarial unit into the preset longitude calculation formula to obtain the longitude coordinates corresponding to the longitude offset;
[0070] Substitute the latitude offset corresponding to the adversarial unit, the preset Earth radius, and the scene center coordinates into the preset latitude calculation formula to obtain the latitude coordinates corresponding to the latitude offset.
[0071] The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset.
[0072] Specifically, here, we can first convert the latitude of the scene center coordinates from degrees to radians, which can be calculated using the following formula:
[0073]
[0074] Next, based on the calculated latitude-radian coordinates of the scene center, the radius offset R' at that latitude can be calculated using the following formula:
[0075]
[0076] Where R is the preset Earth radius, fixed at 63171393, and the unit is meters.
[0077] Next, the longitude coordinates can be calculated using the following formula based on the calculated radius offset:
[0078]
[0079] Where x is the relative coordinate of the adversarial unit with respect to the preset scene center in the longitude direction in an independent coordinate system, that is, the longitude offset in the first offset coordinate set, in meters. OffsetLng can be understood as an intermediate quantity in the calculation process, in degrees, where lng is the longitude coordinate.
[0080] Next, the latitude coordinates can be calculated using the following formula based on the preset Earth radius:
[0081]
[0082]
[0083] Where y represents the relative coordinates of the adversarial unit with respect to the preset scene center in the independent coordinate system in the latitude direction, which is also the latitude offset in the first offset coordinate set, in meters. OffsetLat can be understood as an intermediate quantity in the calculation process, in degrees, and lat represents the latitude coordinate. Both longitude and latitude coordinates are based on the GPS geographic coordinate system. OffsetLng and OffsetLat are used to compensate for the deviation during the conversion from the independent coordinate system to the GPS geographic coordinate system. It is important to note that the coordinate unit in the independent coordinate system is meters, while the coordinate units in the GPS geographic coordinate system and the scene center coordinates are all in degrees. However, due to the requirements of the language layer interface, the scene center coordinates are converted to radians during the intermediate calculation process.
[0084] Understandably, if the center coordinates of the adversarial scenario are C=(117, 37), and the relative position coordinates of a certain adversarial unit, i.e., the first offset coordinates, are P=(127165.8, 20123.2), then by calling the core methods computerLngLat.getLng(lng0, x) and computerLngLat.getLat(lat0, y), the transformed latitude and longitude coordinates, i.e., the GPS coordinates P'=(118.4319, 37.1810), can be obtained respectively. Here, P is the coordinate in the independent coordinate system, and P' is the coordinate in the GPS geographic coordinate system. Furthermore, the aforementioned core method is a function specifically designed for coordinate transformation within a program created based on the above formula.
[0085] As another optional embodiment of this application, the first offset coordinate set also includes an altitude offset;
[0086] Based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset, the first target coordinate set is obtained, including:
[0087] Use the altitude offset corresponding to the combat unit as the altitude coordinate;
[0088] The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset, the latitude coordinates corresponding to the latitude offset, and the altitude coordinates.
[0089] Specifically, the coordinates in the first offset coordinate set include not only the longitude and latitude offsets corresponding to the adversarial units, but also the altitude offset. In the offset calculation, since the altitude is always based on a plane with an altitude of 0 on Earth, it has no impact on the offset results in 3D adversarial scenarios. Therefore, during the offset calculation process, the altitude offset is directly taken from the height point before transformation, that is, the altitude offset corresponding to the adversarial unit is directly used as the altitude coordinate.
[0090] It is understandable that if the first offset coordinate set is Then the transformed first target coordinate set is Where x is the longitude offset in the first offset coordinate set, y is the latitude offset in the first offset coordinate set, and z is the altitude offset in the first offset coordinate set.
[0091] Step 103: Based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information, calculate the second target coordinate set.
[0092] Specifically, the first offset coordinate set contains the initial position coordinates of the adversary unit in the tactical scenario, while the motion data of the adversary unit in the tactical scenario contains various possible motion-related values of the adversary unit after its initial position. Using these values, the possible subsequent motion of the adversary unit can be estimated, and based on this motion, the subsequent coordinates of the adversary unit in the GPS geographic coordinate system, i.e., the second target coordinate set, can be calculated.
[0093] As another optional embodiment of this application, the motion data of the adversarial unit includes Euler angles corresponding to a preset time interval and motion speed;
[0094] Based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information, the second target coordinate set is calculated, including:
[0095] The movement path of the adversary unit is calculated based on Euler angles, movement speed, and a preset time interval.
[0096] Based on the first offset coordinate set and the movement path of the adversary unit, the second offset coordinate set corresponding to the time interval between the adversary unit and the preset time interval is calculated.
[0097] Based on the second offset coordinate set and the scene center coordinates, the second target coordinate set is calculated.
[0098] Specifically, the motion data of the adversary unit in the tactical scenario mainly includes Euler angles, motion velocity, and a preset time interval. Euler angles are a set of three independent angular parameters used to determine the position of a fixed-point rotating rigid body, consisting of the nutation angle θ, the precession angle ψ, and the rotation angle φ. Based on the initial position coordinates of the adversary unit, i.e., the first offset coordinate set, the possible subsequent motion direction of the adversary unit can be predicted according to the preset time interval and these angular parameters. The subsequent motion distance can be determined according to the preset time interval and motion velocity, and the movement path of the adversary unit can be obtained using calculation methods including but not limited to the Pythagorean theorem.
[0099] In addition to the embodiments mentioned above, this application can also utilize other data information from the tactical scenario to obtain the movement path of the combat unit. This other data information includes, but is not limited to, the combat unit's current altitude, speed, direction of movement, attitude, and physical quantities such as thrust, drag, and lift during movement. By inputting the aforementioned other data information into the aerodynamic model established based on the combat unit, the axial overload and normal overload of the combat unit are calculated, thereby obtaining the axial acceleration and normal acceleration values of the combat unit, and subsequently, the combat unit's speed, direction of movement, and attitude. Based on the subsequent movement trend information such as the combat unit's speed, direction of movement, and attitude, the movement path of the combat unit can be derived using calculation methods including, but not limited to, the Pythagorean theorem.
[0100] Based on the movement path of the countermeasure unit and the preset time interval, the movement position coordinates at the interval points of the preset time interval can be obtained. Using the movement position coordinates along the movement path of the countermeasure unit, the second offset coordinate set corresponding to the countermeasure unit and the preset time interval can be calculated.
[0101] Based on the second offset coordinate set and the scene center coordinates, the second target coordinate set can be calculated using the conversion method in step 102 above.
[0102] Step 104: Based on the first target coordinate set and the second target coordinate set, draw the first trajectory of the adversarial unit in the target adversarial scenario.
[0103] Specifically, the first target coordinate set consists of the GPS geographic coordinates corresponding to the initial position coordinates of the adversarial unit, while the second target coordinate set consists of the GPS geographic coordinates corresponding to the subsequent position coordinates of the adversarial unit. Therefore, the position coordinates of the adversarial unit throughout its entire movement process, i.e., the first adversarial unit entity coordinate set, can be obtained through the first and second target coordinate sets. This first adversarial unit entity coordinate set includes multiple target coordinate sets, representing the adversarial unit's position at different time intervals. Thus, based on the Cesium 3D mapping framework, the first adversarial unit entity coordinate set can be stored using the Cesium.CzmlDataSource interface, and the CzmlDataSource.load() method can be called to draw the first trajectory of the adversarial unit in the target adversarial scenario.
[0104] As another optional embodiment of this application, after drawing the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set, the method further includes:
[0105] Select the tactical adjustment coordinate set in the coordinate system corresponding to the scene center coordinates, and perform coordinate transformation on the tactical adjustment coordinate set to obtain the third offset coordinate set;
[0106] The scene center coordinates are processed based on a preset coordinate transformation formula to obtain the scene center transformed coordinates.
[0107] The fourth offset coordinate set is calculated based on the third offset coordinate set, the scene center transformation coordinates, and the preset Earth radius.
[0108] The coordinate set of the third target is calculated based on the coordinate set of the fourth offset.
[0109] Specifically, if tactical strategies need to be adjusted during the drawing of the first trajectory, the tactical adjustment coordinates based on the GPS geographic coordinate system can be selected first, i.e., the tactical adjustment coordinate set. This tactical adjustment coordinate set can also be selected by the user through the target confrontation scenario interface displayed on the client. Then, using the scene center coordinates, the formula in step 102 above can be reversed to convert the tactical adjustment coordinate set into a fourth offset coordinate set based on an independent coordinate system. This conversion involves unit conversion of both the scene center coordinates and the tactical adjustment coordinates. Specifically, the scene center coordinates are converted to scene center transformed coordinates, and the tactical adjustment coordinate set is converted to the third offset coordinate set, with the units of the third offset coordinate set remaining consistent with those of the scene center transformed coordinates.
[0110] It is understandable that coordinate unit conversion includes, but is not limited to, the following methods:
[0111] Because Cesium uses Cartesian coordinates by default, calculating tactical adjustment coordinates first requires calling the `Cesium.Cartographic.fromCartesia` method to convert Cartesian coordinates to radian coordinates. Secondly, when calculating the difference between the tactical adjustment coordinates and the scene center coordinates, the units of measurement should be consistent with the tactical adjustment coordinates. That is, either convert the tactical adjustment coordinates to degrees or convert the scene center coordinates to radians. Since the results obtained by the two methods are identical, the radian-based calculation method was chosen to reduce computational load.
[0112] The specific process of reversing the formula in step 102 above is as follows:
[0113] To adjust the coordinate set for tactical purposes, This is the fourth offset coordinate set. Each tactical adjustment coordinate P in Q will be converted to the third offset coordinate set by calling the Cesium.Cartographic.fromCartesia method, that is, P(lng, lat, alt) will be converted to P(𝛼, 𝛽, alt), where 𝛼 and 𝛽 are in radians. Here, Q is the coordinate set in the GPS geographic coordinate system, and Q' is the coordinate set in an independent coordinate system, with the altitude offset alt remaining unchanged. Then, the scene center coordinates can be converted from the angle expression (lng0, lat0) to the radian expression (𝛼0, 𝛽0) using the following formula, i.e., the scene center coordinate transformation:
[0114]
[0115]
[0116] Next, based on the calculated third offset coordinate set, the scene center transformation coordinates, and the preset Earth radius R, the fourth offset coordinate set can be calculated using the following formula:
[0117]
[0118]
[0119] Where R is fixed at 63171393, in meters. x and y are the longitude and latitude offsets of the fourth offset coordinates, respectively, in meters.
[0120] Understandably, taking the example of combat aircraft flight path planning, based on tactical adjustments, the coordinates of a point after the flight path adjustment are obtained through the `Cesium.viewer.scene.pick` click event, which is Q0 = (118.4021, 37.1641, 8000). These coordinates are the tactical adjustment coordinates. If the center coordinates of the combat scene are C = (117, 37), then by calling the core methods `computerOffset.getX(lng0, lng)` and `computerOffset.getY(lat0, lat)`, the converted offset coordinates Q0' = (124520.07323, 18248.21304, 8000) are obtained respectively. The aforementioned core methods are functions specifically designed for coordinate transformation within a program created based on the above formula.
[0121] Subsequently, based on the fourth offset coordinate set, the third target coordinate set can be calculated using interpolation.
[0122] It should be noted that this embodiment can be executed either after step 104 or independently.
[0123] Specifically, based on existing tactical scenarios, a target confrontation scenario is selected, and the corresponding scenario center coordinates C are obtained. Tactical adjustment coordinates P are selected, forming a tactical adjustment coordinate set Q. Then, the `Cesium.Cartographic.fromCartesia` method is called to convert each tactical adjustment coordinate P in Q into a third offset coordinate, that is, converting the latitude and longitude coordinates of P from degrees to radians, denoted as P(𝛼, 𝛽, alt). Here, alt is the altitude coordinate, which remains unchanged during the conversion. Next, the scenario center coordinates are converted from angle expressions to radians to obtain the scenario center transformed coordinates (𝛼0, 𝛽0). Then, based on the third offset coordinate set, the scenario center transformed coordinates, and the preset Earth radius R, the fourth offset coordinate set is calculated using the following formula:
[0124]
[0125]
[0126] Where R is fixed at 63171393, in meters. x and y are the longitude and latitude offsets of the fourth offset coordinates, respectively, in meters.
[0127] Subsequently, based on the fourth offset coordinate set, the third target coordinate set can be calculated using interpolation.
[0128] As another optional embodiment of this application, the third target coordinate set is calculated based on the fourth offset coordinate set, including:
[0129] Interpolation calculations are performed on the offset coordinates corresponding to any two adjacent adversarial units in the fourth offset coordinate set to obtain the fifth offset coordinate set; wherein, the number of offset coordinates of adversarial units in the fifth offset coordinate set is greater than the number of offset coordinates of adversarial units in the fourth offset coordinate set.
[0130] The third target coordinate set is calculated based on the fifth offset coordinate set and the scene center coordinates.
[0131] Specifically, the conversion from the fourth offset coordinate set to the fifth offset coordinate set is mainly achieved by interpolating the offset coordinates corresponding to any two adjacent adversarial units in the fourth offset coordinate set. In other words, interpolation is performed on the coordinates of every two adjacent adversarial units within the fourth offset coordinate set for each adversarial unit. This increases the number of offset coordinates and makes the offset path more detailed and accurate. Therefore, the number of offset coordinates of adversarial units in the fifth offset coordinate set is greater than the number of offset coordinates of adversarial units in the fourth offset coordinate set. Then, based on the fifth offset coordinate set and the scene center coordinates, the third target coordinate set is calculated according to the calculation method in step 102 above.
[0132] As another optional embodiment of this application, after calculating the third target coordinate set based on the fourth offset coordinate set, the method further includes:
[0133] Based on the coordinate sets of the first and third targets, the second trajectory of the adversarial unit in the target adversarial scenario is drawn.
[0134] Specifically, the coordinates of the tactically adjusted adversary unit throughout its entire movement can be obtained from the first target coordinate set and the third target coordinate set, corresponding to the coordinates in the GPS geographic coordinate system. This constitutes the second set of adversary unit entity coordinates. Therefore, based on the Cesium 3D map framework, the second set of adversary unit entity coordinates can be stored using the Cesium.CzmlDataSource interface. The CzmlDataSource.load() method can then be called to draw the second trajectory of the tactically adjusted adversary unit in the target adversarial scenario.
[0135] Please see Figure 3 , Figure 3 A schematic diagram of the structure of a map-frame-based three-dimensional visualization geographic scene switching device provided in an embodiment of this application is shown.
[0136] like Figure 3 As shown, the map-frame-based 3D visualization geographic scene switching device may include at least a first processing module 301, a second processing module 302, a third processing module 303, and a fourth processing module 304, wherein:
[0137] The first processing module 301 is used to obtain the tactical scenario information and the name of the target confrontation scenario input by the user, and determine the first offset coordinate set of the confrontation unit according to the relative position of the confrontation unit and the preset center coordinate in the tactical scenario information.
[0138] The second processing module 302 is used to find the scene center coordinates corresponding to the target confrontation scene name in the preset database, and calculate the first target coordinate set based on the first offset coordinate set and the scene center coordinates; wherein, the preset database includes at least two confrontation scene names and the scene center coordinates corresponding to each confrontation scene, and the coordinate system corresponding to the preset center coordinates is inconsistent with the coordinate system corresponding to the scene center coordinates.
[0139] The third processing module 303 is used to calculate the second target coordinate set based on the first offset coordinate set and the motion data of the adversary unit in the tactical scenario information.
[0140] The fourth processing module 304 is used to draw the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set.
[0141] In some possible embodiments, the first offset coordinate set includes longitude offsets and latitude offsets corresponding to the adversarial unit;
[0142] The second processing module 302 is specifically used for:
[0143] Based on the first offset coordinate set and the scene center coordinates, the first target coordinate set is calculated, including:
[0144] The radius offset is obtained based on the scene center coordinates and the preset Earth radius;
[0145] Substitute the longitude offset, radius offset, and scene center coordinates corresponding to the adversarial unit into the preset longitude calculation formula to obtain the longitude coordinates corresponding to the longitude offset;
[0146] Substitute the latitude offset corresponding to the adversarial unit, the preset Earth radius, and the scene center coordinates into the preset latitude calculation formula to obtain the latitude coordinates corresponding to the latitude offset.
[0147] The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset.
[0148] In some possible embodiments, the first offset coordinate set may also include an altitude offset;
[0149] The second processing module 302 is specifically used for:
[0150] Based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset, the first target coordinate set is obtained, including:
[0151] Use the altitude offset corresponding to the combat unit as the altitude coordinate;
[0152] The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset, the latitude coordinates corresponding to the latitude offset, and the altitude coordinates.
[0153] In some possible embodiments, the motion data of the adversarial unit includes Euler angles corresponding to a preset time interval and motion speed;
[0154] The third processing module 303 is specifically used for:
[0155] Based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information, the second target coordinate set is calculated, including:
[0156] The movement path of the adversary unit is calculated based on Euler angles, movement speed, and a preset time interval.
[0157] Based on the first offset coordinate set and the movement path of the adversary unit, the second offset coordinate set corresponding to the time interval between the adversary unit and the preset time interval is calculated.
[0158] Based on the second offset coordinate set and the scene center coordinates, the second target coordinate set is calculated.
[0159] In some possible embodiments, after drawing the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set, the method further includes:
[0160] The fourth processing module 304 is specifically used for:
[0161] Select the tactical adjustment coordinate set in the coordinate system corresponding to the scene center coordinates, and perform coordinate transformation on the tactical adjustment coordinate set to obtain the third offset coordinate set;
[0162] The scene center coordinates are processed based on a preset coordinate transformation formula to obtain the scene center transformed coordinates.
[0163] The fourth offset coordinate set is calculated based on the third offset coordinate set, the scene center transformation coordinates, and the preset Earth radius.
[0164] The coordinate set of the third target is calculated based on the coordinate set of the fourth offset.
[0165] In some possible embodiments, the third target coordinate set is calculated based on the fourth offset coordinate set, including:
[0166] The fourth processing module 304 is specifically used for:
[0167] Interpolation calculations are performed on the offset coordinates corresponding to any two adjacent adversarial units in the fourth offset coordinate set to obtain the fifth offset coordinate set; wherein, the number of offset coordinates of adversarial units in the fifth offset coordinate set is greater than the number of offset coordinates of adversarial units in the fourth offset coordinate set.
[0168] The third target coordinate set is calculated based on the fifth offset coordinate set and the scene center coordinates.
[0169] In some possible embodiments, after calculating the third target coordinate set based on the fourth offset coordinate set, the method further includes:
[0170] The fourth processing module 304 is specifically used for:
[0171] Based on the coordinate sets of the first and third targets, the second trajectory of the adversarial unit in the target adversarial scenario is drawn.
[0172] Please see Figure 4 , Figure 4 This illustration shows a structural schematic diagram of another map-frame-based 3D visualization geographic scene switching device provided in an embodiment of this application;
[0173] like Figure 4 As shown, the map-frame-based 3D visualization geographic scene switching device 400 may include at least one processor 401, at least one network interface 404, user interface 403, memory 405, and at least one communication bus 402.
[0174] The communication bus 402 can be used to realize the connection and communication of the above components.
[0175] The user interface 403 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.
[0176] Among them, network interface 404 may include, but is not limited to, Bluetooth module, NFC module, Wi-Fi module, etc.
[0177] The processor 401 may include one or more processing cores. The processor 401 connects to various parts within the electronic device 400 using various interfaces and lines. It executes various functions and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 405, and by calling data stored in the memory 405. Optionally, the processor 401 may be implemented using at least one hardware form of DSP, FPGA, or PLA. The processor 401 may integrate one or more of the following: CPU, GPU, and modem. The CPU primarily handles the operating system, user interface, and applications; the GPU is responsible for rendering and drawing the content required for display; and the modem handles wireless communication. It is understood that the modem may also not be integrated into the processor 401 and may be implemented as a separate chip.
[0178] The memory 405 may include RAM or ROM. Optionally, the memory 405 may include a non-transitory computer-readable medium. The memory 405 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 405 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the above-described method embodiments, etc.; the data storage area may store data involved in the above-described method embodiments, etc. Optionally, the memory 405 may also be at least one storage device located remotely from the aforementioned processor 401. Figure 4 As shown, the memory 405, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a map-frame-based 3D visualization geographic scene switching application.
[0179] Specifically, processor 401 can be used to call the map-frame-based 3D visualization geographic scene switching application stored in memory 405, and specifically perform the following operations:
[0180] Obtain the tactical scenario information and target confrontation scenario name input by the user, and determine the first offset coordinate set of the confrontation unit based on the relative position of the confrontation unit in the tactical scenario information and the preset center coordinates.
[0181] The system retrieves the center coordinates of the scene corresponding to the name of the target adversarial scene from the preset database, and calculates the first target coordinate set based on the first offset coordinate set and the scene center coordinates. The preset database includes at least two adversarial scene names and the scene center coordinates corresponding to each adversarial scene. The coordinate system corresponding to the preset center coordinates is different from the coordinate system corresponding to the scene center coordinates.
[0182] Based on the first offset coordinate set and the motion data of the opposing units in the tactical scenario information, the second target coordinate set is calculated.
[0183] Based on the first target coordinate set and the second target coordinate set, the first trajectory of the adversarial unit in the target adversarial scenario is drawn.
[0184] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described method. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0185] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0186] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions in other embodiments.
[0187] In the several embodiments provided in this application, it should be understood that the disclosed apparatus can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some service interface; the indirect coupling or communication connection between apparatuses or units may be electrical or other forms.
[0188] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0189] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0190] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage device (CMD). Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a memory and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned memory includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0191] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0192] The above are merely exemplary embodiments of this disclosure and should not be construed as limiting the scope of this disclosure. Any equivalent changes and modifications made in accordance with the teachings of this disclosure shall still fall within the scope of this disclosure. Those skilled in the art will readily conceive of embodiments of this disclosure upon considering the specification and practicing the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not described herein. The specification and embodiments are to be considered exemplary only, and the scope and spirit of this disclosure are defined by the claims.
Claims
1. A method for switching between three-dimensional visual geographic scenes based on a map frame, characterized in that, include: The system obtains the tactical scenario information and target confrontation scenario name input by the user, and determines the first offset coordinate set of the confrontation unit based on the relative position of the confrontation unit in the tactical scenario information and the preset center coordinates. The system retrieves the scene center coordinates corresponding to the name of the target adversarial scenario from a preset database, and calculates the first target coordinate set based on the first offset coordinate set and the scene center coordinates. The preset database includes at least two adversarial scenario names and scene center coordinates corresponding to each adversarial scenario. The coordinate system corresponding to the preset center coordinates is different from the coordinate system corresponding to the scene center coordinates. Based on the first offset coordinate set and the motion data of the opposing units in the tactical scenario information, the second target coordinate set is calculated. Based on the first target coordinate set and the second target coordinate set, the first trajectory of the adversarial unit in the target adversarial scenario is drawn; The first offset coordinate set includes longitude offset and latitude offset corresponding to the countermeasure unit; The step of calculating the first target coordinate set based on the first offset coordinate set and the scene center coordinates includes: The radius offset is obtained based on the center coordinates of the scene and the preset Earth radius; Substitute the longitude offset, the radius offset, and the scene center coordinates corresponding to the adversarial unit into the preset longitude calculation formula to obtain the longitude coordinates corresponding to the longitude offset; Substitute the latitude offset corresponding to the adversarial unit, the preset Earth radius, and the scene center coordinates into the preset latitude calculation formula to obtain the latitude coordinates corresponding to the latitude offset. Based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset, a first target coordinate set is obtained; The first offset coordinate set also includes altitude offset; The step of obtaining the first target coordinate set based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset includes: The altitude offset corresponding to the countermeasure unit is used as the altitude coordinate. The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset, the latitude coordinates corresponding to the latitude offset, and the altitude coordinates. The motion data of the countermeasure unit includes Euler angles corresponding to a preset time interval and motion speed; The calculation of the second target coordinate set based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information includes: The movement path of the adversary unit is calculated based on the Euler angles, the movement speed, and the preset time interval. Based on the first offset coordinate set and the movement path of the adversary unit, the second offset coordinate set corresponding to the pre-set time interval between the adversary unit and the pre-set time interval is calculated. Based on the second offset coordinate set and the scene center coordinates, the second target coordinate set is calculated.
2. The method according to claim 1, characterized in that, After drawing the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set, the method further includes: A tactical adjustment coordinate set is selected in the coordinate system corresponding to the center coordinates of the scene, and the tactical adjustment coordinate set is subjected to coordinate transformation to obtain the third offset coordinate set. The scene center coordinates are processed based on a preset coordinate transformation formula to obtain the scene center transformed coordinates; a fourth offset coordinate set is calculated based on the third offset coordinate set, the scene center transformed coordinates, and the preset Earth radius. The third target coordinate set is calculated based on the fourth offset coordinate set.
3. The method according to claim 2, characterized in that, The process of calculating the third target coordinate set based on the fourth offset coordinate set includes: Interpolation calculation is performed on the offset coordinates corresponding to any two adjacent adversary units in the fourth offset coordinate set to obtain the fifth offset coordinate set; wherein, the number of offset coordinates of adversary units in the fifth offset coordinate set is greater than the number of offset coordinates of adversary units in the fourth offset coordinate set. The third target coordinate set is calculated based on the fifth offset coordinate set and the scene center coordinates.
4. The method according to claim 2, characterized in that, After calculating the third target coordinate set based on the fourth offset coordinate set, the method further includes: Based on the first target coordinate set and the third target coordinate set, the second trajectory of the adversarial unit in the target adversarial scenario is drawn.
5. A three-dimensional visualization geographic scene switching device based on a map frame, characterized in that, include: The first processing module is used to acquire the tactical scenario information and the name of the target confrontation scenario input by the user, and determine the first offset coordinate set of the confrontation unit according to the relative position of the confrontation unit and the preset center coordinate in the tactical scenario information. The second processing module is used to find the scene center coordinates corresponding to the name of the target adversarial scene in the preset database, and to calculate the first target coordinate set based on the first offset coordinate set and the scene center coordinates. The preset database includes at least two adversarial scenario names and the scenario center coordinates corresponding to each adversarial scenario. The coordinate system corresponding to the preset center coordinates is different from the coordinate system corresponding to the scenario center coordinates. The third processing module is used to calculate the second target coordinate set based on the first offset coordinate set and the motion data of the opposing units in the tactical scenario information. The fourth processing module is used to draw the first trajectory of the adversarial unit in the target adversarial scenario based on the first target coordinate set and the second target coordinate set; The first offset coordinate set includes longitude offset and latitude offset corresponding to the countermeasure unit; The step of calculating the first target coordinate set based on the first offset coordinate set and the scene center coordinates includes: The radius offset is obtained based on the center coordinates of the scene and the preset Earth radius; Substitute the longitude offset, the radius offset, and the scene center coordinates corresponding to the adversarial unit into the preset longitude calculation formula to obtain the longitude coordinates corresponding to the longitude offset; Substitute the latitude offset corresponding to the adversarial unit, the preset Earth radius, and the scene center coordinates into the preset latitude calculation formula to obtain the latitude coordinates corresponding to the latitude offset. Based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset, a first target coordinate set is obtained; The first offset coordinate set also includes altitude offset; The step of obtaining the first target coordinate set based on the longitude coordinates corresponding to the longitude offset and the latitude coordinates corresponding to the latitude offset includes: The altitude offset corresponding to the countermeasure unit is used as the altitude coordinate. The first target coordinate set is obtained based on the longitude coordinates corresponding to the longitude offset, the latitude coordinates corresponding to the latitude offset, and the altitude coordinates. The motion data of the countermeasure unit includes Euler angles corresponding to a preset time interval and motion speed; The calculation of the second target coordinate set based on the first offset coordinate set and the motion data of the adversary units in the tactical scenario information includes: The movement path of the adversary unit is calculated based on the Euler angles, the movement speed, and the preset time interval. Based on the first offset coordinate set and the movement path of the adversary unit, the second offset coordinate set corresponding to the pre-set time interval between the adversary unit and the pre-set time interval is calculated. Based on the second offset coordinate set and the scene center coordinates, the second target coordinate set is calculated.
6. A three-dimensional visualization geographic scene switching device based on a map frame, characterized in that, Including the processor and memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code stored in the memory to perform the steps of the method as described in any one of claims 1-4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer-readable storage medium stores instructions that, when executed on a computer or processor, cause the computer or processor to perform the steps of the method as described in any one of claims 1-4.