Feasibility Design of MATLAB-Cesium Joint Simulation

As an excellent open-source GIS software, Cesium has powerful data rendering and interaction capabilities. To achieve dynamic functions such as simulating aircraft flight, it can be linked with high-performance data processing software MATLAB for joint simulation. Here, the author proposes a feasible solution. This solution requires the use of three software: Cesium 1.131, node 22.17.1 (optional), and MATLAB 2024b. The following are the specific details of this feasibility plan.1. Data processing and output program in MATLAB For high efficiency in joint simulation, MATLAB should transmit data through data streams rather than generating files. In another series of the author’s work, [MATLAB-STK Joint Simulation Program Construction], a program for waypoint calculation, GUI construction, and data output has been designed and implemented. This program has been tested and adjusted, making it a reusable solution. Modifications can be made to this program to change the data output format and method to transmit data to the server in the correct format.Here, the author proposes two sub-solutions: Solution A: Simulink solution (modular programming through blocks, simple and quick) Solution B: Pure code solution (convenient for adjustments and error handling)2. WebSocket server program (Solutions A and B) Since Cesium implements data visualization through the browser, a local server is needed for data relaying. After a brief investigation, it was found that MATLAB can directly achieve this functionality: starting from version 2020a, MATLAB includes the matlab.net.http package, which can be used directly after debugging. To prevent this path from failing, a mature server program, node, is used as a backup solution (the author prefers the former solution as they have not systematically studied Java).In summary, the author proposes two sub-solutions: Solution A: MATLAB relay solution (can be integrated with the data output program) Solution B: Node relay solution (high maturity, can be used directly)3. Data reception and rendering program in Cesium Cesium has a built-in data stream interface that supports dynamic data transmission. A simple Java front-end program is sufficient to achieve data reception. The processing and rendering program is run directly by Cesium without manual intervention.4. Advantages of this solution1. GUI control and quick error handling can be achieved through MATLAB.2. Command control can be implemented to instruct Cesium to execute simulation tasks, reducing operational difficulty.3. The data processing capabilities of MATLAB can be combined with the data rendering capabilities of Cesium.5. Challenges1. The specific data format received by Cesium2. Local deployment of Cesium6. Conclusion This solution is highly feasible, and a minimal viable verification program can be started. After verification is completed, a complete joint simulation program can be constructed.

Leave a Comment