Ship track generation method based on STK and MATLAB joint simulation
Through the combined simulation technology of STK and MATLAB, high-precision ship tracks are generated, which solves the problems of incomplete data, low update frequency and high acquisition cost in the existing technology, and achieves more flexible, accurate and safe track data acquisition.
Patent Information
- Application Number
- CN202510004608.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-05-30
- Estimated Expiration
- 2045-01-02
AI Technical Summary
The prior art has problems such as incomplete data, low update frequency, high acquisition cost and insufficient privacy and security guarantees when obtaining ship track data, especially in the ocean and polar waters.
The high-precision ship track generation method based on the joint simulation of STK and MATLAB is adopted. By setting random seeds, initializing the STK environment, selecting ship models, generating starting points and ending points, using interpolation method to generate path points, and update the tracks in real time through dynamic propagation path points.
It improves the accuracy and flexibility of track simulation, enhances the convenience of data analysis and processing, reduces the difficulty of use, and overcomes the problems of difficult simulation results in the prior art, such as insufficient flexibility, low simulation accuracy and difficulty in data extraction.
Smart Images

Figure CN120068382A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship track simulation and generation. Specifically, it relates to a high-precision ship track generation method based on joint simulation of STK and MATLAB, and also relates to a corresponding ship track generation system, a computer terminal, and a computer-readable storage medium. Background Art
[0002] In existing ship track data acquisition methods, the Automatic Identification System (AIS) is widely used for broadcasting real-time position, heading, and speed information of ships. Data is collected through land base stations and satellite receiving stations and widely distributed through multiple data provider service platforms such as MarineTraffic and VesselFinder. In addition, satellite remote sensing technologies, including optical satellites and Synthetic Aperture Radar (SAR) satellites, are used for ship position detection under various weather conditions, and their data is obtained through commercial satellite companies or government agencies. Governments and maritime organizations also provide ship in-and-out port information and navigation announcements, while the Long Range Identification and Tracking (LRIT) system is used to meet international security requirements. Commercial data analysis services provide ship tracking and analysis services by integrating multiple data sources, and research institutions and collaborative projects support scientific research activities through data sharing and open datasets. Although the existing technologies can meet market demands to a certain extent, there are still deficiencies in terms of the comprehensiveness of data coverage, update frequency, acquisition cost, privacy, and security. Especially in complex sea areas such as the open ocean and polar regions, extreme environmental conditions increase the difficulty of data collection. These limitations indicate that there is a need to develop new methods to improve the acquisition efficiency and quality of ship track data, while reducing the risk of relying on external data sources and ensuring the privacy and security of track data.
[0003] Currently, the acquisition of track data mainly faces the following problems:
[0004] Problems in obtaining ship track data mainly include data incompleteness, low update frequency, and high data acquisition costs. Especially in the vast open ocean and polar regions, traditional monitoring technologies such as AIS and satellite remote sensing are often restricted by technical and environmental factors, resulting in untimely data updates and incomplete coverage. In addition, although commercial and government platforms can provide a large amount of data, access to this data is often accompanied by high costs and complex laws and regulations, especially those related to ship privacy and international security. Data security and privacy protection are also major concerns, as unauthorized data access and use may lead to serious security risks and privacy leaks. Therefore, there is an urgent need to develop a more economical, efficient, and secure ship track data acquisition technology to overcome the limitations of existing technologies and provide more comprehensive, timely, and reliable ship track information. Especially in areas that are difficult to cover due to technical and environmental factors, there is a lack of a ship track data acquisition technology that can effectively solve the cost problem of data acquisition while ensuring the comprehensiveness, timeliness, and security of the data to support various needs such as navigation safety, ocean management, and scientific research.
[0005] In addition, there are also a series of technical problems in existing track simulation methods, which further limit their application in high-precision scenarios. First, the difficulty of reproducing simulation results is a key issue. There are many random factors in the current system, and it is difficult to obtain stable simulation results through consistent input conditions, which affects the repeatability of experiments. Second, the lack of flexibility limits users' ability to adjust parameters such as ship types and track generation areas according to their needs, resulting in poor adaptability of the simulation system in different application scenarios. Third, the low simulation accuracy is also an important defect of existing technologies. Existing simulation systems cannot provide sufficiently high spatial and temporal accuracy when dealing with complex sea areas and multi-ship interactions, affecting the reliability of the results. Finally, the problem of difficult data extraction and processing is also very prominent. The extraction and subsequent analysis steps of track data in existing systems are relatively cumbersome and lack effective tool support, limiting the application of simulation results in practice. Summary of the Invention
[0006] Aiming at the above deficiencies in the existing technology, the purpose of the present invention is to provide a high-precision ship track generation method based on the joint simulation of STK and MATLAB, and at the same time provide a corresponding ship track generation system for generating ship track information.
[0007] The present invention is achieved through the following technical solutions.
[0008] According to one aspect of the present invention, there is provided a ship track generation method based on the joint simulation of STK and MATLAB, characterized by comprising:
[0009] Set a random seed and initialize the STK environment through MATLAB to load the set simulation scenario;
[0010] Under the said simulation scenario, randomly select the ship models to be simulated, and set the corresponding types, attributes, and speeds for each ship model;
[0011] Use a random algorithm to generate the starting and ending points of each ship model, generate continuous and diverse path points using interpolation, and update the ship model's track in real time by dynamically propagating the path points.
[0012] Preferably, the above method further includes any one or more of the following:
[0013] - Extract the state data from each ship model and output all the data to a CSV file for subsequent analysis and application;
[0014] - Display the ship's travel track through the visualization module built in STK.
[0015] According to another aspect of the present invention, there is provided a ship track generation system based on joint simulation of STK and MATLAB, including:
[0016] A scenario setting module, which is used to set a random seed and initialize the STK environment for loading the set simulation scenario;
[0017] A model selection module, which is used to randomly select the ship models to be simulated under the said simulation scenario, and set the corresponding types, attributes, and speeds for each ship model;
[0018] A path generation module, which is used to use a random algorithm to generate the starting and ending points of each ship model, generate continuous and diverse path points using interpolation, and update the ship model's track in real time by dynamically propagating the path points.
[0019] Preferably, the above system further includes any one or more of the following modules:
[0020] - A data storage module, which is used to extract the state data from each ship model and output all the data to a CSV file for subsequent analysis and application;
[0021] - A visualization display module, which is used to display the ship's travel track through the visualization module built in STK.
[0022] According to the third aspect of the present invention, there is provided a computer terminal, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it can be used to execute the method described above in the present invention, or run the system described above in the present invention.
[0023] According to the fourth aspect of the present invention, there is provided a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it can be used to execute the method described above in the present invention, or run the system described above in the present invention.
[0024] Due to the adoption of the above technical solutions, compared with the prior art, the present invention has at least one of the following beneficial effects:
[0025] By pre-defining various types of ship models and attributes, users can flexibly adjust according to their needs, enhancing the flexibility and scalability of the method.
[0026] The present invention uses linear interpolation and random offsets to generate path points, significantly improving the matching degree between the simulation accuracy of ship trajectories and the real scene.
[0027] With the help of the data provider function of STK, the present invention efficiently extracts and outputs simulation data, increasing the convenience of data analysis and processing through the combination of MATLAB and STK. The operation is simple, reducing the usage difficulty and facilitating popularization and application.
[0028] The present invention overcomes the problems in the prior art such as difficult reproduction of simulation results, insufficient flexibility, low simulation accuracy, and difficulty in data extraction, realizing an efficient, reliable, flexible, and accurate multi-ship trajectory simulation technology, with significant technological progress and practical value. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 It is a flowchart of the ship trajectory generation method based on the joint simulation of STK and MATLAB in a preferred embodiment of the present invention.
[0030] Figure 2 It is a general flowchart of the ship trajectory generation method based on the joint simulation of STK and MATLAB in a specific application example of the present invention.
[0031] Figure 3 It is a visualization diagram of the trajectory in a 20km×20km scenario in a specific application example of the present invention.
[0032] Figure 4 It is a visualization diagram of the trajectory in a 10km×10km scenario in a specific application example of the present invention.
[0033] Figure 5This is a visualization graph of the track in a 5km×5km scenario in a specific application example of the present invention.
[0034] Figure 6 The intention is to show the component modules of the ship track generation system based on the joint simulation of STK and MATLAB in a preferred embodiment of the present invention. Detailed implementation manners
[0035] The embodiments of the present invention will be described in detail below: These embodiments are implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation processes are given. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention.
[0036] In order to achieve a more economical, efficient and safe ship track data acquisition technology, an embodiment of the present invention provides a ship track generation method based on the joint simulation of STK and MATLAB. This method realizes a high-precision and real-time ship track generation solution by combining the visualization and simulation capabilities of STK with the high-efficiency calculation and data processing functions of MATLAB.
[0037] Specifically, as Figure 1 shown, the ship track generation method based on the joint simulation of STK and MATLAB provided by this embodiment may include the following operations:
[0038] S1, Set a random seed, and initialize the STK environment through MATLAB, and load the set simulation scenario;
[0039] S2, In the simulation scenario, randomly select the ship models to be simulated, and set corresponding types, attributes and speeds for each ship model;
[0040] S3, Use a random algorithm to generate the starting points and ending points of each ship model, use the interpolation method to generate continuous and diverse path points, and update the track of the ship model in real time by dynamically propagating the path points.
[0041] In some preferred implementation manners, the above S1, Set a random seed, and initialize the STK environment through MATLAB, and load the set simulation scenario, may further include the following operations:
[0042] S11, Set a random number generator to ensure that the ship track data generated by each simulation is reproducible;
[0043] S12. Start the STK application using the actxserver command in MATLAB, create a simulation scenario in STK, set the time format of the simulation scenario, and specify the time range and the start time of the analysis to ensure that the time frame of the ship track simulation meets expectations.
[0044] In some preferred embodiments, for the above S2, randomly select the ship models to be simulated, and set the corresponding types, attributes, and speeds for each ship model. It may further include the following operations:
[0045] S21. Select the required models from a preset ship model library, including aircraft carrier models, cruise ship models, destroyer models, small cargo ship models, etc., and store the paths of these ship model files and the corresponding type names.
[0046] S22. According to the specified number of ship models to be simulated, create each ship model in a loop, and set the type, speed, and attributes of the ship model according to the randomly selected ship model file.
[0047] In some preferred embodiments, for the above S3, use a random algorithm to generate the starting points and ending points of each ship model. It may further include the following operations:
[0048] S31. Define a region using geographical coordinates as the simulation area for the ship model to navigate.
[0049] S32. Within the simulation area, use a random algorithm to randomly generate the starting point coordinates of the ship model, and according to the set distance range, randomly generate an ending point coordinate at a certain distance from the starting point coordinates, thereby determining the starting point and ending point of the ship model.
[0050] In some preferred embodiments, for the above S3, use the interpolation method to generate continuous and diverse path points, and update the track of the ship model in real time by dynamically propagating the path points. It may further include the following operations:
[0051] S33. According to the randomly generated starting point and ending point of the ship model, obtain multiple segments of path points for simulating the navigation track of the ship model through linear interpolation, and generate random offsets to be added between the path points to obtain continuous and diverse navigation path points of the ship model.
[0052] S34. Set the navigation path points for each ship model, and gradually propagate the path to dynamically generate the track for the ship model to navigate.
[0053] In some preferred embodiments, in step S33, according to the starting point and the ending point of the randomly generated ship model, multiple path points for simulating the sailing trajectory of the ship model are obtained through linear interpolation, and a random offset to be added between the path points is generated to obtain continuous and diverse sailing path points of the ship model. The method may further include the following operations:
[0054] S321, according to the starting point and the ending point of the ship model, the path points obtained through linear interpolation are:
[0055]
[0056]
[0057] where (lat 1 , lon 1 ), (lat 2 , lon 2 ) are respectively the starting point and the ending point of the ship model, n is the number of segments, and (lat i , lon i ) is the position of the i-th coordinate;
[0058] S322, the randomly generated and added random offsets Δlat i and Δlon i between the path points are:
[0059] Δlat i =(rand - 0.5)×2δ lat
[0060] Δlon i =(rand - 0.5)×2δ lon
[0061] where rand is a uniformly random number generated within the interval [0, 1), and δ lat and δ ioi are the maximum latitude offset and the maximum longitude offset;
[0062] S323, adding the random offsets Δlat i and Δlon i to the original path point coordinates to obtain:
[0063] lat′ i =lat i +Δlat i
[0064] lon′ i =lon i +Δlon i
[0065] where (lon′ i , lon′ i ) are the coordinates of the i-th point in the obtained navigation path points.
[0066] In some preferred embodiments, the above method may further include any one or more of the following operations:
[0067] S4. Extract status data from each ship model and output all the data to a CSV file for subsequent analysis and application;
[0068] S5. Display the travel trajectory of the ship through the visualization module provided by STK.
[0069] In some preferred embodiments, for the above S5, extracting status data from each ship model and outputting all the data to a CSV file may further include the following operations:
[0070] S51. Extract status data from each ship model, including time, longitude, latitude, heading, and speed information;
[0071] S52. Format the extracted status data into a standard time format and store it in a data table to obtain all the data;
[0072] S53. Output all the data to a CSV file.
[0073] Next, in combination with a specific application example, the technical solutions provided in the above embodiments of the present invention will be further described in detail.
[0074] This specific application example is based on the ship trajectory generation method provided in the above embodiments, and its overall architecture includes the following 5 steps:
[0075] Step S1. Scenario setting: Ensure the reproducibility of the trajectory by setting a random seed, and initialize the STK environment to load a specific simulation scenario.
[0076] Step S2. Set the ship model file and attributes: In the ship model configuration stage, randomly select multiple ship models and set corresponding attributes and speeds for each ship.
[0077] Step S3. Ship trajectory generation: Use a random algorithm to generate the starting point and ending point of the ship, and use the interpolation method to generate path points to ensure the continuity and diversity of the path. Dynamically propagate the path points to update the ship's trajectory in real time.
[0078] Step S4. Simulation data extraction and saving: Extract status data from each ship, construct a comprehensive data table, and output all the data to a CSV file for subsequent analysis and application.
[0079] Step S5, Visualization: The travel trajectory of the ship can be displayed through the visualization module built into the STK software.
[0080] The technical solution of this specific application example will be further described in detail below in conjunction with the attached drawings and experimental examples.
[0081] As Figure 2 shown, it is the overall flowchart of this ship trajectory generation method.
[0082] I. The detailed steps of scenario setting are as follows:
[0083] (1) Set the random number generator to ensure the reproducibility of the trajectory
[0084] To ensure the repeatability of the ship trajectory data generated by each simulation, first set the seed value of the random number generator. For example, the seed value can be set to 42 to ensure that the generation order of random numbers is the same each time the simulation is run, so that the random parameters such as the initial position, speed, and path of the ship are reproducible.
[0085] (2) Start the STK application and create a new scenario
[0086] Start the STK application through the actxserver command in MATLAB to run it in visible mode. Then, create a new scenario in STK, set the time format of the scenario to UTCG, and specify the time range of the scenario. At the same time, set the start time of the analysis and the stepping type of the animation for subsequent simulation operations.
[0087] To analyze the effects of ship activities with different densities, the following three scenarios are designed:
[0088] (1) Sparse distribution scenario
[0089] Deploy one ship in each 20km×20km square grid. This scenario simulates the situation of less traffic activity in the sea area and is suitable for studying the sea area traffic patterns during peacetime, with limited resources, or when there are few ship activities. Through this sparse distribution, the navigation route planning, communication, and resource coverage of ships under low density can be evaluated.
[0090] (2) Medium density scenario
[0091] Deploy one ship in each 10km×10km grid. This scenario represents a relatively common ship density and is suitable for studying traffic scheduling in an environment where merchant ship activities are relatively frequent but have not reached high density pressure. The medium density layout helps to analyze the cooperation and collision avoidance mechanisms between ships, as well as the reliability of network communication and navigation at this density.
[0092] (3) High-density scenario
[0093] One ship is arranged in each 5 km × 5 km small grid, simulating the situation of highly concentrated ship distribution. This scenario is often used to study maritime traffic during peak periods, such as ship assembly during wartime, intensive commercial navigation, or large-scale rescue operations. Under the high-density scenario, the focus is on analyzing the collision risks between ships, signal interference, route planning efficiency, and the performance of multi-ship communication networks in crowded situations.
[0094] II. The detailed steps for setting up the ship model file and attributes are as follows:
[0095] (1) Define the ship model file and type
[0096] Prepare various types of ship model files from the preset ship model library, such as aircraft carriers, cruise ships, destroyers, and small cargo ships, etc. Define and store the paths of these model files and the corresponding type names for subsequent random selection.
[0097] (2) Define the area for generating the ship's track
[0098] Determine the simulation area for the ship's navigation. Define an area using geographical coordinates (latitude and longitude), which will be used to randomly generate the starting and ending points of the ship, ensuring that the ship's track is within the specified simulation range.
[0099] III. The detailed steps for generating the ship's track are as follows:
[0100] (1) Set the number of ships
[0101] Specify the number of ships to be simulated, such as 30 ships. This number can be adjusted according to actual needs.
[0102] (2) Create and configure each ship in a loop
[0103] For each ship, perform the following steps:
[0104] a. Create a ship object and name it
[0105] Name the ship using numbers, such as "Ship_1", "Ship_2", etc., for easy identification and management. In the STK scenario, create the corresponding ship object and ensure its visibility in the simulation interface.
[0106] b. Randomly select the ship model and type
[0107] Randomly select a model file from the ship model files built into STK and assign it to the current ship object. At the same time, obtain the corresponding ship type to set specific attributes according to the type.
[0108] c. Set the speed and attributes according to the ship type
[0109] Different types of ships have different speed ranges and attributes. For example:
[0110] · Aircraft carriers and destroyers: The speed range is 55 - 65 km / h, and the attribute is "military".
[0111] · Cruise ships: The speed range is 37 - 46 km / h, and the attribute is "civilian".
[0112] · Small cargo ships: The speed range is 22 - 37 km / h, and the attribute is "civilian".
[0113] Set the speed (converted to units per second) and military / civilian attribute according to the randomly selected ship type.
[0114] d. Randomly generate the starting point and the ending point
[0115] Within the defined navigation area, randomly generate the starting coordinates (latitude and longitude) of the ship. Then, generate an ending coordinate at a certain distance from the starting point to ensure a reasonable navigation path for the ship.
[0116] e. Generate waypoints and add random offsets
[0117] To simulate the actual navigation path of the ship, generate several waypoints so that the ship sails from the starting point to the ending point. The latitude and longitude of these waypoints can be obtained by linear interpolation between the starting point and the ending point. To increase the diversity of the path, add a certain random offset to the coordinates of each waypoint.
[0118] f. Add waypoints and propagate the route
[0119] Add the generated waypoints to the ship's route. For each waypoint, set its attributes such as latitude, longitude, altitude, and speed. After adding each waypoint, perform the Propagate operation to update the ship's route.
[0120] g. Exception handling
[0121] During the process of propagating the route, situations where propagation fails may occur, such as unreasonable waypoint settings. Through the exception handling mechanism, capture and record the information of propagation errors for adjustment and optimization.
[0122] The algorithm flow for ship track generation is as follows:
[0123]
[0124] IV. Simulation data extraction and saving:
[0125] (1) Extract position, time, and heading data
[0126] Using the data interface (Data Providers) of STK, extract data such as the latitude and longitude (Latitude and Longitude), time (Time), and azimuth (Azimuth) of the vessel within the simulation time range.
[0127] (2) Format and store data
[0128] Format the extracted time data and convert it to the standard date and time format. Create a data table for each vessel, containing information such as the vessel name, time, longitude, latitude, heading, speed, and attributes.
[0129] (3) Aggregate data of all vessels
[0130] Merge the data tables of each vessel to form a total table containing the simulation data of all vessels, facilitating subsequent data analysis and processing.
[0131] (4) Output data of all vessels to a file
[0132] Output the aggregated simulation data of all vessels to a CSV file, which can be used for subsequent data analysis, visualization, or other applications.
[0133] (5) To further improve the quality of the simulation results, after data extraction and output, the present invention provides suggestions for post-processing the simulation data, including methods such as data smoothing and outlier handling, to ensure the accuracy and reliability of the data.
[0134] a. Data smoothing processing. During the simulation process, data such as the speed and heading of the vessel may have minor random fluctuations. To reduce the impact of these fluctuations on the analysis results, the extracted track data can be smoothed. Common methods include: moving average method, exponential smoothing method, filtering, etc.
[0135] b. Outlier handling. There may be outliers in the simulation data due to abnormal propagation or random factors, and these outliers may affect the analysis results. Processing methods include statistical detection, data correction, and outlier removal.
[0136] V. Data visualization display
[0137] The STK software provides a track line display function, a time control toolbar (Time Control Toolbar) for controlling the playback of the scene animation, and the visualization of the simulation data as Figures 3 to 5 shown, demonstrating the tracks of 30 vessels.
[0138] VI. Verification and Analysis of Simulation Data
[0139] Three different types of ship models (small speedboats, commercial cargo ships, and large aircraft carriers) were selected, and the voyages from the starting point to the destination were simulated respectively in the predefined marine environment in the southeast sea area of China. Each ship was set according to its specific physical characteristics and dynamic parameters, and actual marine environmental factors such as wind speed, ocean current, and weather conditions were considered to add errors to the parameters. Table 1 shows some of the track data of the aircraft carrier:
[0140] Table 1
[0141]
[0142] The track data generated by STK and MATLAB includes voyage time, track coordinates, speed, and heading changes, etc. After collecting these data, MATLAB was used for subsequent data processing and analysis, including statistical analysis of track smoothness, speed consistency, and yaw angle, as shown in Table 2:
[0143] Table 2
[0144] Ship type Position error Time matching error Speed error Maximum deviation distance Experiment 1 1.4383260 0.1587129 0.1369887 2.1329625 Experiment 2 0.9515514 0.1855630 0.2462201 4.4884164 Experiment 3 1.2659937 0.1966086 0.4004708 1.8786506
[0145] By analyzing various indicators of the simulation method, it can be seen that the method shows good accuracy and stability in multiple key aspects. First, the average value of the position error is 1.31, and the standard deviation is 0.28, indicating that the gap between the simulation trajectory and the real trajectory in space is small and the fluctuation is small, which shows that the simulation method has good spatial accuracy. The average value of the time matching error is 0.16, and the standard deviation is 0.036, indicating that the consistency in time is also good. The average value of the speed error is 0.29, indicating that the simulation trajectory is close to the real one in dynamic characteristics, and the standard deviation is only 0.12, showing high stability. The average value of the maximum deviation distance is 2.56, and the standard deviation is 1.23, indicating that the local deviation is small. Therefore, based on various indicators, it can be concluded that the simulation method shows high reliability in space, time, dynamic characteristics, and trajectory shape, which proves its effectiveness.
[0146] In summary, the high-precision ship track generation method based on the joint simulation of STK and MATLAB provided in the above embodiments of the present invention successfully simulates the voyages of multiple ships in the specified area by setting a random number generator, defining ship models and attributes, simulating the sailing paths of multiple ships, and extracting and outputting simulation data. This method can be used in fields such as maritime traffic simulation, shipping route planning, and marine safety analysis, and has important application value.
[0147] Based on the same inventive concept, an embodiment of the present invention also provides a ship track generation system based on STK and MATLAB joint simulation.
[0148] Specifically, Figure 6 As shown, the ship track generation system based on STK and MATLAB joint simulation provided in this embodiment may include the following modules:
[0149] The scene setting module is used to set the random seed and initialize the STK environment to load the set simulation scene;
[0150] Model selection module, which is used to randomly select the ship model to be simulated in the simulation scenario and set the corresponding type, attribute and speed for each ship model;
[0151] The path generation module is used to generate the starting point and end point of each ship model using a random algorithm, generate continuous and diverse path points using interpolation, and update the track of the ship model in real time by dynamically propagating the path points.
[0152] In some preferred embodiments, the above system may further include any one or more of the following modules:
[0153] -Data storage module, which is used to extract status data from each ship model and output all data to CSV files for subsequent analysis and application;
[0154] -Visual display module, which is used to display the ship's trajectory through the STK's built-in visualization module.
[0155] It should be noted that the steps in the method provided by the present invention can be implemented by using the corresponding components in the system, and those skilled in the art can refer to the technical solution of the system to implement the step flow of the method, and can also refer to the technical solution of the method to implement the composition of the system, that is, the embodiments in the system and the embodiments in the method can be understood as preferred examples of each other, which will not be elaborated here.
[0156] An embodiment of the present invention further provides a computer terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the processor can be used to execute any method of the above-mentioned embodiments of the present invention, or to run any system of the above-mentioned embodiments of the present invention.
[0157] Optionally, a memory for storing programs; the memory may include volatile memory (e.g., random-access memory, such as static random-access memory (SRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR SDRAM), etc.); the memory may also include non-volatile memory, such as flash memory. The memory is used to store computer programs (such as application programs and functional modules for implementing the above methods), computer instructions, etc. The above computer programs, computer instructions, etc. can be partitioned and stored in one or more memories. And the above computer programs, computer instructions, data, etc. can be called by the processor.
[0158] A processor for executing the computer programs stored in the memory to implement each step in the methods or each module in the various systems involved in the above embodiments. For details, reference can be made to the relevant descriptions in the previous method and system embodiments.
[0159] The processor and the memory can be of independent structure or integrated structure. When the processor and the memory are of independent structure, the memory and the processor can be coupled and connected through a bus.
[0160] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it can be used to execute the method of any one of the above embodiments of the present invention, or run the system of any one of the above embodiments of the present invention.
[0161] Among them, the computer-readable medium includes computer storage media and communication media, where the communication media includes any medium facilitating the transmission of computer programs from one place to another. The storage medium can be any available medium accessible by a general or special-purpose computer. An exemplary storage medium is coupled to the processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. Additionally, the ASIC can be located in a user device. Of course, the processor and the storage medium can also exist as discrete components in a communication device.
[0162] The ship trajectory generation method and system based on the joint simulation of STK and MATLAB provided in the above embodiments of the present invention. First, a suitable model is selected from a preset ship model library, and the model is set with attributes including size, mass, dynamic parameters, etc. to ensure the accuracy and authenticity of the trajectory simulation. Then, based on MATLAB, the whole-course trajectory points of the ship from the starting point to the ending point are calculated, and the errors of the wind speed and ocean current on the trajectory estimation are calculated. The unpredictability and randomness of the trajectory are increased through the random offset technology. Finally, the dynamic simulation of the trajectory is carried out through the animation module of STK, and the generated trajectory data is used for subsequent analysis and application. This method not only improves the efficiency and practicability of the trajectory simulation, but also greatly enhances the convenience and accuracy of the trajectory data analysis through the automated data processing and output functions, and is applicable to fields such as ocean research, navigation safety assessment, waterway planning, and military and education training.
[0163] Matters not described in detail in the above embodiments of the present invention are all well-known technologies in the art.
[0164] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above specific implementation manners, and those skilled in the art can make various deformations or modifications within the scope of the claims, which does not affect the essence of the present invention.
Claims
1. A ship track generation method based on STK and MATLAB joint simulation, characterized in that: include: Set the random seed, initialize the STK environment through MATLAB, and load the set simulation scene; In the simulation scenario, randomly select the ship model to be simulated, and set the corresponding type, attribute and speed for each ship model; A random algorithm is used to generate the starting and ending points of each ship model, and the interpolation method is used to generate continuous and diverse path points. The track of the ship model is updated in real time by dynamically propagating the path points.
2. The ship track generation method based on STK and MATLAB joint simulation according to claim 1 is characterized in that: The random seed is set, and the STK environment is initialized through MATLAB, and the set simulation scene is loaded, including: Set up a random number generator to ensure that the ship track data generated in each simulation can be reproduced; Start the STK application through the actxserver command in MATLAB, create a simulation scene in STK, set the time format of the simulation scene, and specify the time range and analysis start time to ensure that the time frame of the ship track simulation meets expectations.
3. The ship track generation method based on STK and MATLAB joint simulation according to claim 1 is characterized in that: The randomly selected ship models to be simulated and the corresponding type, attribute and speed are set for each ship model, including: Select the required model from the preset ship model library, including: aircraft carrier model, cruise ship model, destroyer model and small cargo ship model, and store the path and corresponding type name of these ship model files; According to the specified number of ship models that need to be simulated, each ship model is created in a loop, and the type, speed and properties of the ship model are set according to the randomly selected ship model file.
4. The ship track generation method based on STK and MATLAB joint simulation according to claim 1 is characterized in that: The random algorithm is used to generate the starting point and the ending point of each ship model, including: A region is defined by using geographic coordinates as a simulation region for the navigation of the ship model; In the simulation area, a random algorithm is used to randomly generate the starting point coordinates of the ship model, and according to a set distance range, an end point coordinate having a certain distance from the starting point coordinates is randomly generated, thereby determining the starting point and the end point of the ship model.
5. The ship track generation method based on STK and MATLAB joint simulation according to claim 1 is characterized in that: The method of generating continuous and diverse path points by interpolation and updating the track of the ship model in real time by dynamically propagating the path points includes: According to the randomly generated starting point and ending point of the ship model, multiple path points for simulating the navigation trajectory of the ship model are obtained through linear interpolation, and random offsets are generated to be added between the path points to obtain continuous and diverse navigation path points of the ship model; Set navigation path points for each ship model, and propagate the path step by step to dynamically generate tracks for the ship model's navigation.
6. The ship track generation method based on STK and MATLAB joint simulation according to claim 5 is characterized in that: The method of obtaining multiple path points for simulating the navigation track of the ship model by linear interpolation based on the randomly generated starting point and ending point of the ship model, and generating random offsets for adding between the path points to obtain continuous and diverse navigation path points of the ship model comprises: According to the starting point and ending point of the ship model, the path points are obtained by linear interpolation: In the formula, (lat1, lon1) and (lat2, lon2) are the starting point and the ending point of the ship model respectively, n is the number of segments, (lat i ,lon i ) is the position of the i-th coordinate; A random offset Δlat generated and added by interpolation between waypoints i and Δlon i for: Δlat i =(rand-0.5)×2δ lat Δlon i =(rand-0.5)×2δ lon In the formula, rand is a uniform random number generated in the interval [0,1), δ lat and δ lon is the maximum latitude offset and the maximum longitude offset; The random offset Δlat i and Δlon i Add to the original path point coordinates, we get: years' i =years i +Δlat i lon′ i =lon i +Δlon i In the formula, (lat′ i ,lon′ i ) is the coordinate of the i-th point in the obtained navigation path.
7. The ship track generation method based on STK and MATLAB joint simulation according to any one of claims 1-6, characterized in that: Also includes any one or more of the following: - Extract status data from each ship model and export all data to CSV files for subsequent analysis and application; -Display the ship's trajectory through STK's built-in visualization module.
8. The ship track generation method based on STK and MATLAB joint simulation according to claim 7 is characterized in that: The state data is extracted from each ship model and all data is exported to a CSV file, including: Extract status data from each ship model, including time, longitude, latitude, heading and speed information; Formatting the extracted status data into a standard time format and storing it in a data table to obtain all data; Export all the data described to a CSV file.
9. A ship track generation system based on STK and MATLAB joint simulation, characterized in that: include: The scene setting module is used to set the random seed and initialize the STK environment to load the set simulation scene; A model selection module, which is used to randomly select a ship model to be simulated in the simulation scenario, and set a corresponding type, attribute and speed for each ship model; The path generation module is used to generate the starting point and end point of each ship model using a random algorithm, generate continuous and diverse path points using interpolation, and update the track of the ship model in real time by dynamically propagating the path points.
10. The ship track generation system based on STK and MATLAB joint simulation according to claim 9 is characterized in that: It also includes any one or more of the following modules: -Data storage module, which is used to extract status data from each ship model and output all data to CSV files for subsequent analysis and application; -Visual display module, which is used to display the ship's trajectory through the STK's built-in visualization module.
Citation Information
Patent Citations
Ship path planning method and device
CN115829179A
Unmanned ship path planning algorithm based on improved DQN
CN117055549A
Ship route planning method based on adaptive step length Inform-RRTstar algorithm
CN117268398A
Ship trajectory prediction method and system, computer equipment and storage medium
CN119066373A
Method and vessel steering module for seismic data acquiring and for routing a vessel
US20200217980A1