Flight simulation method, device and equipment
By sending UDP control and request messages to the simulated flight platform, the erroneous flight data and simulation results problems in the flight control system due to compressed simulation time are solved, and accurate flight data and simulation results are achieved, improving the authenticity and credibility of the simulation.
Patent Information
- Application Number
- CN202510274958.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-04-04
AI Technical Summary
In the flight control system, in order to quickly complete the simulation, the simulation platform needs to compress the simulation time, resulting in the acquisition of incorrect flight data and simulation results.
By sending UDP control messages and request messages to the simulated flight platform, and using the simulated flight platform for flight control and data acquisition, the simulation platform no longer compresses the simulation time, but uses real time for data exchange.
It achieves accurate flight data and simulation results, improves the authenticity and credibility of simulation, and improves the real-time and accuracy of data interaction.
Smart Images

Figure CN119758770A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of flight control technology, and in particular to a flight simulation method, device and equipment. Background Art
[0002] The flight control system is one of the core subsystems of unmanned aviation and spacecraft. The flight control, navigation and guidance, flight management and other technologies used in the flight control system are extremely complex. Flight simulation is a key link to verify the correctness and robustness of the flight control system design, and to provide a guarantee for the safety and success of the actual flight of unmanned aviation and spacecraft. Flight simulation can assist in the realization of flight control, navigation and guidance, flight management, etc.
[0003] The flight control system has higher requirements for the functions and performance of flight simulation. The main performance indicators of flight simulation include: real-time performance, simulation accuracy, interface type and expansion capability. For example, the real-time performance of flight simulation can range from 0.1 milliseconds to 1 millisecond. The simulation accuracy of flight simulation can be 2 to the negative 64th power. Regarding the interface type of flight simulation, there needs to be a rich interface to exchange real-time data with the flight control system under test, the three-axis electric turntable, the dynamic and static pressure simulator, the GPS (Global Positioning System) simulator, etc. Regarding the expansion capability of flight simulation, it needs to have a friendly human-machine interface and the ability to display three-dimensional visual animation in real time.
[0004] In the flight control system, the simulation platform can send control instructions to the simulated aircraft so that the simulated aircraft can fly based on the control instructions. However, when controlling the simulated aircraft, in order to quickly complete the simulation, the simulation platform needs to compress the simulation time, such as compressing 1 hour to 1 minute, which leads to erroneous flight data and then erroneous simulation results. Summary of the invention
[0005] The present application provides a flight simulation method, which is applied to a simulation platform, and the method comprises: Sending a User Datagram Protocol (UDP) control message to the flight simulation platform, wherein the UDP control message includes a target control parameter, so that the flight simulation platform performs flight control on the simulated aircraft based on the target control parameter, wherein the target control parameter is used to control the simulated aircraft to reach an expected value of flight data; After the target interval, a UDP request message is sent to the simulated flight platform, so that the simulated flight platform obtains the actual value of the flight data of the simulated aircraft during the flight; Receive a UDP response message sent by the simulated flight platform, wherein the UDP response message includes the actual value of the flight data, and obtain the actual value of the flight data from the UDP response message; wherein the actual value of the flight data and the expected value of the flight data are used to determine a simulation verification result.
[0006] The present application provides a flight simulation device, which is applied to a simulation platform, and the device comprises: A sending module is used to send a User Datagram Protocol UDP control message to a simulated flight platform, wherein the UDP control message includes a target control parameter, so that the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, and the target control parameter is used to control the simulated aircraft to reach an expected value of flight data; after an interval target time, a UDP request message is sent to the simulated flight platform, so that the simulated flight platform obtains an actual value of flight data of the simulated aircraft during flight; A receiving module, used for receiving a UDP response message sent by the simulated flight platform; wherein the UDP response message includes the actual value of the flight data; An acquisition module is used to acquire the actual value of the flight data from the UDP response message; the actual value of the flight data and the expected value of the flight data are used to determine the simulation verification result.
[0007] The present application provides an electronic device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; the processor is used to execute the machine-executable instructions to implement the flight simulation method of the above example of the present application.
[0008] The present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the flight simulation method of the above example of the present application is implemented.
[0009] The present application provides a machine-readable storage medium, which stores machine-executable instructions that can be executed by a processor; wherein the processor is used to execute the machine-executable instructions, and when the machine-executable instructions are executed, the flight simulation method of the above example of the present application is implemented.
[0010] It can be seen from the above technical solutions that in the embodiment of the present application, the simulation platform and the simulated flight platform jointly simulate to realize the flight simulation method. By using the simulated flight platform, the simulation platform does not send control instructions to the simulated aircraft, but sends a UDP (User Datagram Protocol) control message to the simulated flight platform, so that the simulated flight platform can control the simulated aircraft based on the UDP control message. Since the simulated flight platform can highly simulate real flight driving and highly restore driving operations, the simulated flight platform can accurately control the simulated aircraft and obtain accurate flight data. In this way, the simulation platform can obtain accurate flight data. In addition, after the simulation platform sends the UDP control message to the simulated flight platform, the simulation platform does not need to compress the simulation time (compress 1 hour to 1 minute), but uses real time. After the target interval (such as 1 hour), it continues to send UDP request messages to the simulated flight platform so that the simulated flight platform obtains the actual value of the flight data of the simulated aircraft during the flight, so that the simulation platform can obtain accurate flight data instead of wrong flight data. When simulating based on accurate flight data, accurate simulation results can be obtained. In addition, UDP messages are used to interact between the simulation platform and the simulated flight platform to achieve efficient two-way data interaction between the simulation platform and the simulated flight platform. Data exchange can be completed within milliseconds through UDP messages, ensuring the real-time and accuracy of data interaction, thereby improving the authenticity and credibility of the simulation. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] Figure 1 is a schematic flow chart of a flight simulation method in one embodiment of the present application; Figure 2A is a schematic diagram of the structure of a flight control system in one embodiment of the present application; Figure 2B is a schematic diagram of a simulated aircraft simulating real flight driving in one embodiment of the present application; Figure 3 is a schematic diagram of a graphical interface in one embodiment of the present application; Figure 4 It is a schematic diagram of the time synchronization process in one implementation of the present application; Figure 5 is a schematic flow chart of a flight simulation method in one embodiment of the present application; Figure 6 is a schematic structural diagram of a flight simulation device in one embodiment of the present application; Figure 7 It is a hardware structure diagram of an electronic device in one embodiment of the present application. DETAILED DESCRIPTION
[0012] In the embodiment of the present application, a flight simulation method is proposed, which can be applied to a simulation platform, see Figure 1 FIG. 1 is a flow chart of the flight simulation method, which may include: Step 101: Send a UDP control message to the flight simulation platform. The UDP control message may include target control parameters so that the flight simulation platform can perform flight control on the simulated aircraft based on the target control parameters. The target control parameters are used to control the simulated aircraft to reach expected flight data values.
[0013] Step 102: After the target time interval, a UDP request message is sent to the flight simulation platform so that the flight simulation platform obtains the actual value of the flight data of the simulated aircraft during the flight.
[0014] Step 103, receiving a UDP response message sent by the simulated flight platform, the UDP response message may include the actual value of the flight data, and obtaining the actual value of the flight data from the UDP response message; wherein the actual value of the flight data and the expected value of the flight data are used to determine the simulation verification result.
[0015] Exemplarily, when the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, the target control parameter is used to control the simulated aircraft to reach the expected value of flight data after the initial time interval. The target time can be determined based on the initial time and the time offset, and the time offset represents the difference between the local time of the simulation platform and the local time of the simulated flight platform.
[0016] Exemplarily, the process of obtaining the time offset may include, but is not limited to: obtaining multiple exchange moments; for each exchange moment, the simulation platform sends a first timestamp to the simulated flight platform at the exchange moment, and the simulation platform receives a second timestamp sent by the simulated flight platform at the exchange moment; wherein the first timestamp may represent the local time of the simulation platform at the exchange moment, and the second timestamp may represent the local time of the simulated flight platform at the exchange moment. The simulation platform determines the time difference corresponding to each exchange moment; wherein the time difference is the difference between the first timestamp of the exchange moment and the second timestamp of the exchange moment. The simulation platform obtains the time offset based on the average value of the time differences corresponding to all exchange moments.
[0017] Exemplarily, the UDP request message may include a flight data type, and the flight data type may be a target type name or a target type identifier; wherein the simulation platform and the simulated flight platform may maintain a data list, and the data list may include multiple type names, and the target type identifier indicates an index value corresponding to the target type name in the data list. wherein the actual value of the flight data includes the actual value of the flight data corresponding to the target type name, and the expected value of the flight data includes the expected value of the flight data corresponding to the target type name.
[0018] Exemplarily, before sending a UDP control message to the flight simulation platform, a graphical interface may be displayed, which may include multiple control parameters supported by the simulation platform and multiple type names supported by the simulation platform; wherein each control parameter is a parameter used to perform flight control on a simulated aircraft, and each type name is a type of flight data of the simulated aircraft. On this basis, a first operation instruction may be received, the first operation instruction includes a target control parameter, and the target control parameter includes some or all of the control parameters displayed on the graphical interface. A second operation instruction may be received, the second operation instruction includes a target type name, and the target type name includes some or all of the type names displayed on the graphical interface.
[0019] In a possible implementation, the multiple type names may include at least but not limited to multiple of the following type names: airspeed, ground speed, altitude, vertical speed, pitch angle, roll angle, yaw angle, flight attitude, flight heading, waypoint, flight route, engine rotations per minute, throttle position, fuel quantity, wind speed and direction, temperature, humidity, atmospheric pressure, and visibility.
[0020] Exemplarily, the UDP control message includes a first identifier and a first CRC (Cyclic Redundancy Check) check code, the first identifier can indicate the message type of the UDP control message, and the first CRC check code is obtained by performing a cyclic redundancy operation on the UDP control message. The UDP request message includes a second identifier and a second CRC check code, the second identifier can indicate the message type of the UDP request message, and the second CRC check code is obtained by performing a cyclic redundancy operation on the UDP request message.
[0021] The UDP response message may include a third identifier and a third CRC check code. Obtaining the actual value of the flight data from the UDP response message may include but is not limited to: if the message type of the UDP response message is determined to be a response type based on the third identifier, and if the verification of the UDP response message is determined to be passed based on the third CRC check code, the actual value of the flight data can be obtained from the UDP response message.
[0022] It can be seen from the above technical solutions that in the embodiment of the present application, the simulation platform and the simulated flight platform jointly simulate to realize the flight simulation method. By using the simulated flight platform, the simulation platform does not send control instructions to the simulated aircraft, but sends a UDP (User Datagram Protocol) control message to the simulated flight platform, so that the simulated flight platform can control the simulated aircraft based on the UDP control message. Since the simulated flight platform can highly simulate real flight driving and highly restore driving operations, the simulated flight platform can accurately control the simulated aircraft and obtain accurate flight data. In this way, the simulation platform can obtain accurate flight data. In addition, after the simulation platform sends the UDP control message to the simulated flight platform, the simulation platform does not need to compress the simulation time (compress 1 hour to 1 minute), but uses real time. After the target interval (such as 1 hour), it continues to send UDP request messages to the simulated flight platform so that the simulated flight platform obtains the actual value of the flight data of the simulated aircraft during the flight, so that the simulation platform can obtain accurate flight data instead of wrong flight data. When simulating based on accurate flight data, accurate simulation results can be obtained. In addition, UDP messages are used to interact between the simulation platform and the simulated flight platform to achieve efficient two-way data interaction between the simulation platform and the simulated flight platform. Data exchange can be completed within milliseconds through UDP messages, ensuring the real-time and accuracy of data interaction, thereby improving the authenticity and credibility of the simulation.
[0023] The above technical solutions of the embodiments of the present application are described below in combination with specific application scenarios.
[0024] The flight control system has higher requirements for the functions and performance of flight simulation. The main performance indicators of flight simulation include: real-time performance, simulation accuracy, interface type and expansion capability. In the flight control system, the simulation platform can send control instructions to the simulated aircraft so that the simulated aircraft can fly based on the control instructions. However, when the simulation platform controls the simulated aircraft, in order to quickly complete the simulation, the simulation platform needs to compress the simulation time, such as compressing 1 hour to 1 minute, which leads to erroneous flight data and then erroneous simulation results. In addition, the communication efficiency between the simulation platform and the simulated aircraft is low, and the delay between the simulation platform and the simulated aircraft is high (usually >50ms), which cannot meet the millisecond-level real-time interaction requirements, and thus cannot meet the real-time requirements of flight simulation.
[0025] In response to the above findings, in an embodiment of the present application, a simulation platform and a simulated flight platform jointly simulate to implement a flight simulation method. By borrowing the simulated flight platform, the simulation platform does not send control instructions to the simulated aircraft, but instead sends a UDP control message to the simulated flight platform, so that the simulated flight platform can control the flight of the simulated aircraft based on the UDP control message, and the simulation platform can obtain accurate flight data.
[0026] See also Figure 2A As shown in the figure, it is a structural diagram of the flight control system, and the flight control system may include a simulation platform and a simulated flight platform. Among them, the simulation platform may also be referred to as a simulation device, such as a server, a personal computer, a laptop, a smart phone, etc. There is no restriction on the type of the simulation platform, as long as it can realize the flight simulation function. For example, when the flight simulation function is realized through hardware tools (such as GPU, FPGA, ASIC, etc.), the device where the hardware tool is located can be referred to as a simulation platform, and when the flight simulation function is realized through software tools (such as APP, etc.), the device where the software tool is located can be referred to as a simulation platform.
[0027] For example, the simulation platform is an important part of the flight control system and is used to realize the flight simulation function. The simulation platform can adopt a modular design, support multi-machine collaborative simulation, complex weather conditions simulation, and customized flight mission configuration, and can be widely used in flight training, aircraft design verification, flight control system development, and automatic driving algorithm testing. That is, in these fields, flight simulation is realized through the simulation platform, simulation verification results are obtained, and the algorithm is verified based on the simulation verification results.
[0028] The flight simulation platform is also called the flight simulation device, such as a server, personal computer, laptop computer, smart phone, etc. There is no restriction on the type of the flight simulation platform, as long as it can realize the flight simulation function. For example, when the flight simulation function is realized through hardware tools (such as GPU, FPGA, ASIC, etc.), the device where the hardware tool is located can be called the flight simulation platform, and when the flight simulation function is realized through software tools (such as flight simulation software), the device where the software tool is located can be called the flight simulation platform.
[0029] For example, taking flight simulation software as an example, the device where the flight simulation software is located is called a flight simulation platform. In the subsequent process, the operations performed by the flight simulation platform are all performed by the flight simulation software.
[0030] For example, flight simulation software can be a flight game software, a flight operation software, or other types of software as long as it can realize the flight simulation function.
[0031] For example, flight simulation software can simulate real flight driving to a high degree and restore the driving operation of the aircraft to a high degree. Flight simulation software can simulate various types of aircraft and various environments (such as rainstorms, foggy environments, etc.), that is, simulate real flight driving in various environments. Flight simulation software has good scalability and supports developers to arbitrarily expand functions, such as developers adding their own designed aircraft to the flight simulation software, and developers adding their own designed environments to the flight simulation software.
[0032] When simulating real flight driving, the flight simulation software can control the simulated aircraft to simulate real flight driving. For the sake of distinction, the aircraft (such as an airplane) running in the flight simulation software is called a simulated aircraft (i.e., a simulated aircraft). For example, it takes 100 minutes for a real aircraft to fly from city A to city B. Then, in the map of the flight simulation software, the flight simulation software controls the simulated aircraft to simulate real flight driving. Moreover, when the simulated aircraft flies from city A to city B (i.e., from city A in the map to city B), it also takes 100 minutes, thereby highly simulating real flight driving.
[0033] See also Figure 2B The figure shows a schematic diagram of the flight simulation software controlling the simulated aircraft to simulate real flight driving. Figure 2B The aircraft in the game is a simulated aircraft. Figure 2B The environment in is the environment within the flight simulation software.
[0034] Exemplarily, in order to realize flight simulation, the simulation platform needs to obtain target control parameters in advance. The target control parameters are parameters used to control the flight of the simulated aircraft. The target control parameters can reflect the parameter type and parameter value. For example, the target control parameters may include the rudder angle A (the rudder angle reflects the parameter type, and A reflects the parameter value), the throttle position B, and the heading angle C. Based on this target control parameter, the rudder angle of the simulated aircraft that needs to be controlled is the rudder angle A, the throttle position of the simulated aircraft that needs to be controlled is the throttle position B, and the heading angle of the simulated aircraft that needs to be controlled is the heading angle C.
[0035] The target control parameters can be provided by the flight control system. For example, when the flight control system designs the flight control algorithm, the flight control algorithm needs to use certain parameters to control the simulated aircraft. These parameters are called target control parameters, and the flight control algorithm provides the target control parameters to the simulation platform, which obtains the target control parameters. Alternatively, the target control parameters can be configured by the developer, that is, the developer provides the target control parameters to the simulation platform, which obtains the target control parameters.
[0036] In a possible implementation, the simulation platform may also obtain the target control parameter in the following manner: the simulation platform may display a graphical interface, which may include multiple control parameters supported by the simulation platform (such as all control parameters supported by the simulation platform), and each control parameter is a parameter used to perform flight control on the simulated aircraft. On this basis, the simulation platform may receive a first operation instruction, which includes the target control parameter (that is, the control parameter in the first operation instruction is used as the target control parameter), and the target control parameter includes some or all of the control parameters displayed on the graphical interface.
[0037] For example, when the multiple control parameters supported by the simulation platform include the rudder angle, throttle position and heading angle, then the graphical interface may include the rudder angle, throttle position and heading angle, and the developer may select some or all of the control parameters. When the rudder angle, throttle position and heading angle are selected, the parameter value of the rudder angle may also be input, such as the rudder angle A, the parameter value of the throttle position may be input, such as the throttle position B, and the parameter value of the heading angle may be input, such as the heading angle C. In this way, the simulation platform may receive a first operation instruction, and the first operation instruction includes the rudder angle A, the throttle position B and the heading angle C, and the target control parameters include the rudder angle A, the throttle position B and the heading angle C.
[0038] For example, the graphical interface may include a rudder angle A1, a rudder angle A2, ..., a throttle position B1, a throttle position B2, ..., a heading angle C1, a heading angle C2, ..., that is, the graphical interface includes multiple parameter values for each control parameter, and the developer selects some or all of the control parameters. When selecting the rudder angle, the throttle position, and the heading angle, a certain parameter value of the rudder angle may also be selected (that is, the parameter value is provided by the graphical interface), such as the rudder angle A1, a certain parameter value of the throttle position may be selected, such as the throttle position B1, and a certain parameter value of the heading angle may be selected, such as the heading angle C1. In this way, the simulation platform may receive a first operation instruction, and the first operation instruction includes the rudder angle A1, the throttle position B1, and the heading angle C1, and the target control parameters include the rudder angle A1, the throttle position B1, and the heading angle C1.
[0039] To sum up, the simulation platform can obtain the target control parameters in advance. In the subsequent process, the simulation platform can perform flight control on the simulated aircraft based on the target control parameters, which will not be elaborated here.
[0040] Exemplarily, in order to realize flight simulation, the simulation platform needs to obtain the target type name in advance. The target type name is the type name of the flight data of the simulated aircraft, indicating that the simulated aircraft provides flight data corresponding to the target type name. The target type name can reflect the parameter type, but does not need to reflect the parameter value. For example, the target type name can include flight attitude (flight attitude can reflect the parameter type without involving parameter value), altitude, and ascent and descent speed. Based on this target type name, it means that the flight attitude value, altitude value, and ascent and descent speed value of the simulated aircraft need to be obtained. The flight attitude value, altitude value, and ascent and descent speed value are the flight data (i.e., parameter values) of the simulated aircraft during flight.
[0041] The target type name can be provided by the flight control system. For example, when the flight control system designs the flight control algorithm, the flight control algorithm needs to obtain certain types of flight data for simulation verification. These types are called target type names, and the flight control algorithm provides the target type name to the simulation platform, which obtains the target type name. Alternatively, the target type name can be configured by the developer, that is, the developer provides the target type name to the simulation platform, which obtains the target type name.
[0042] In a possible implementation, the simulation platform may also obtain the target type name in the following manner: the simulation platform may display a graphical interface, which may include multiple type names supported by the simulation platform (such as all type names supported by the simulation platform), and each type name is a type of flight data of the simulated aircraft. On this basis, the simulation platform may receive a second operation instruction, which includes a target type name (that is, the type name in the second operation instruction is used as the target type name), and the target type name includes part of the type name or all of the type names displayed on the graphical interface.
[0043] For example, when the multiple type names supported by the simulation platform include flight attitude, altitude, and ascent and descent speed, then the graphical interface may include flight attitude, altitude, and ascent and descent speed, and the developer may select some or all of the type names. When the flight attitude, altitude, and ascent and descent speed are selected, the simulation platform may receive a second operation instruction, and the second operation instruction includes the flight attitude, altitude, and ascent and descent speed, and the target type name includes the flight attitude, altitude, and ascent and descent speed.
[0044] For example, with respect to the multiple type names supported by the simulation platform, the multiple type names may include but are not limited to one or more of the following type names. Of course, these are just a few examples of the type names.
[0045] Airspeed: When the target type name includes airspeed, it means that you need to obtain the airspeed of the simulated aircraft during flight. Groundspeed: When the target type name includes groundspeed, it means that you need to obtain the horizontal speed of the simulated aircraft relative to the ground.
[0046] Altitude: When the target type name includes altitude, it means that the altitude of the simulated aircraft needs to be obtained. Vertical speed: When the target type name includes vertical speed, it means that the change rate of the flight altitude of the simulated aircraft needs to be obtained.
[0047] Pitch angle pitch, when the target type name includes pitch angle, it means that the pitch angle of the simulated aircraft needs to be obtained. Roll angle roll, when the target type name includes roll angle, it means that the roll angle of the simulated aircraft needs to be obtained. Yaw angle yaw, when the target type name includes yaw angle, it means that the yaw angle of the simulated aircraft needs to be obtained. Flight attitude attitude, when the target type name includes flight attitude, it means that the flight attitude of the simulated aircraft (that is, the state of the aircraft in the air relative to a fixed coordinate system) needs to be obtained.
[0048] Heading, that is, the direction of the nose of the aircraft. When the target type name includes the heading, it means that the flight heading of the simulated aircraft needs to be obtained. Waypoint, when the target type name includes the waypoint, it means that the waypoint of the simulated aircraft needs to be obtained. Flight plan, that is, the scheduled flight route. When the target type name includes the flight route, it means that the flight route of the simulated aircraft needs to be obtained.
[0049] Engine RPM (Revolutions Per Minute), when the target type name includes engine RPM, it means that the engine RPM of the simulated aircraft needs to be obtained. Throttle position, when the target type name includes throttle position, it means that the throttle position of the simulated aircraft needs to be obtained. Fuel quantity, when the target type name includes fuel quantity, it means that the fuel quantity of the simulated aircraft needs to be obtained.
[0050] owind speed and direction, when the target type name includes wind speed and direction, it means that the wind speed and direction of the current environment need to be obtained. temperature temperature, when the target type name includes temperature, it means that the temperature of the current environment needs to be obtained. humidity humidity, when the target type name includes humidity, it means that the humidity of the current environment needs to be obtained. barometric pressure, when the target type name includes barometric pressure, it means that the barometric pressure of the current environment needs to be obtained. visibility visibility, when the target type name includes visibility, it means that the visibility of the current environment needs to be obtained.
[0051] In summary, the simulation platform can obtain the target type name in advance. In the subsequent process, the simulation platform can collect data on the simulated aircraft based on the target type name, which will not be elaborated here.
[0052] In one possible implementation, the simulation platform can define input signals and output signals through a graphical interface, the input signal can represent the target control parameter, and the output signal can represent the target type name. For example, the input signal can be defined through the input pin, that is, the input pin is mapped to the target control parameter (such as binding the input pin to the control instruction corresponding to the target control parameter). The graphical interface supports dynamic addition and deletion of input pins. When adding input pins, the target control parameter can be increased, and when deleting input pins, the target control parameter can be reduced. In addition, the output signal can be defined through the output pin, that is, the output pin is mapped to the target type name (such as binding the output pin to the flight data corresponding to the target type name). The graphical interface supports dynamic addition and deletion of output pins. When adding output pins, the target type name can be increased, and when deleting output pins, the target type name can be reduced.
[0053] See also Figure 3As shown in the figure, it is a schematic diagram of the graphical interface. Here, three input signals and four output signals are used as examples for explanation. The three input signals represent three target control parameters. The names of the three target control parameters (such as pin names) can be configured in the graphical interface, such as IN1, IN2 and IN3. The parameter type corresponding to IN1 is the rudder angle, and the parameter value corresponding to IN1 is A (i.e., rudder angle A). The parameter type corresponding to IN2 is the throttle position, and the parameter value corresponding to IN2 is B (i.e., throttle position B). The parameter type corresponding to IN3 is the heading angle, and the parameter value corresponding to IN3 is C (i.e., heading angle C). In addition, the four output signals represent four target type names. The names of the four target type names (such as pin names) can be configured in the graphical interface, such as OUT1, OUT2, OUT3 and OUT4. The parameter type corresponding to OUT1 is the flight attitude, and the parameter value corresponding to OUT1 is empty. The parameter type corresponding to OUT2 is the altitude, and the parameter value corresponding to OUT2 is empty. The parameter type corresponding to OUT3 is the lift speed, and the parameter value corresponding to OUT3 is empty. The parameter type corresponding to OUT4 is the flight heading, and the parameter value corresponding to OUT4 is empty.
[0054] For example, in order to realize flight simulation, the simulation platform and the simulated flight platform can be time synchronized to solve the time coupling problem between the simulation platform and the simulated flight platform, ensure the consistency of the simulation time of the simulation platform and the real time of the simulated flight platform, and improve the authenticity and credibility of the simulation. Figure 4 FIG. 1 is a schematic diagram of a time synchronization process, which may include: Step 401: The simulation platform obtains multiple exchange moments, and the simulated flight platform obtains multiple exchange moments.
[0055] For example, the simulation platform obtains an initial exchange time t1, and the flight simulation platform obtains an initial exchange time t1'. The initial exchange time t1 and the initial exchange time t1' can be the same. How to achieve the initial exchange time t1 and the initial exchange time t1' are the same is not limited in this embodiment. For example, the simulation platform uses 07:00:00 (local time) on January 1, 2025 as the initial exchange time t1, and the flight simulation platform uses 07:00:00 (local time) on January 1, 2025 as the initial exchange time t1'.
[0056] On the basis of the initial exchange moment t1, the simulation platform determines the time interval based on the fixed frequency X to obtain multiple moments, such as moment t2 (the time interval between moment t2 and the initial exchange moment t1 is determined based on the fixed frequency X), moment t3 (the time interval between moment t3 and moment t2 is determined based on the fixed frequency X), moment t4, ... In this way, the multiple moments and the initial exchange moment t1 constitute multiple exchange moments, such as N exchange moments.
[0057] On the basis of the initial exchange moment t1', the simulated flight platform determines the time interval based on the fixed frequency X (the same as the fixed frequency X of the simulation platform) to obtain multiple moments, such as moment t2', moment t3', moment t4', ..., so that the multiple moments and the initial exchange moment t1' constitute N exchange moments.
[0058] Step 402: For each exchange moment, the simulation platform sends a first timestamp to the simulated flight platform at the exchange moment, and the simulated flight platform sends a second timestamp to the simulation platform at the exchange moment. The simulation platform receives the second timestamp sent by the simulated flight platform at the exchange moment, and the simulated flight platform receives the first timestamp sent by the simulation platform at the exchange moment. The first timestamp represents the local time of the simulation platform at the exchange moment, and the second timestamp represents the local time of the simulated flight platform at the exchange moment.
[0059] For example, the simulation platform sends a first timestamp to the simulated flight platform at time t1, the first timestamp indicates the local time of the simulation platform at time t1, and the simulated flight platform sends a second timestamp to the simulation platform at time t1', the second timestamp indicates the local time of the simulated flight platform at time t1'.
[0060] The simulation platform sends a first timestamp to the simulated flight platform at time t2, and the simulated flight platform sends a second timestamp to the simulation platform at time t2', and the second timestamp represents the local time of the simulated flight platform at time t2', and so on.
[0061] Step 403: The simulation platform determines the time difference corresponding to each exchange moment; wherein the time difference is the difference between the first timestamp of the exchange moment and the second timestamp of the exchange moment.
[0062] In addition, the simulated flight platform determines a time difference corresponding to each exchange moment; wherein the time difference is a difference between a first timestamp of the exchange moment and a second timestamp of the exchange moment.
[0063] Step 404: The simulation platform obtains a time offset based on the average value of the time differences corresponding to all exchange moments. The time offset represents the difference between the local time of the simulation platform and the local time of the simulated flight platform.
[0064] The flight simulation platform obtains a time offset based on an average value of time differences corresponding to all exchange moments, and the time offset represents a difference between the local time of the simulation platform and the local time of the flight simulation platform.
[0065] For example, simulation platforms and flight simulation platforms can use the following formula to obtain the time offset:
[0066] In the above formula, Indicates the time offset, represents the total number of exchange moments, Indicates the first timestamp of the i-th exchange moment, that is, the local time of the simulation platform at the i-th exchange moment, The second timestamp representing the i-th exchange moment, that is, the local time of the flight simulation platform at the i-th exchange moment, Indicates the time difference corresponding to the i-th exchange moment, and the value range of i is 1- Obviously, the time offset Represents the average time difference between the simulation platform and the simulated flight platform.
[0067] In summary, the simulation platform can obtain a time offset, and based on the time offset, ensure the consistency between the simulation time of the simulation platform and the real time of the simulated flight platform. Please refer to the subsequent embodiments.
[0068] Similarly, the simulated flight platform can obtain a time offset, and based on the time offset, ensure the consistency between the simulation time of the simulation platform and the real time of the simulated flight platform. This process will not be described in detail.
[0069] For example, the time offset can be reduced by adjusting the solver settings of the simulation platform, optimizing the data interaction logic, etc. , thereby achieving more accurate time synchronization, without any restrictions.
[0070] In the above application scenario, a flight simulation method is proposed in the embodiment of the present application, see Figure 5 FIG. 1 is a flow chart of the flight simulation method, which may include: Step 501: The simulation platform sends a UDP control message to the simulated flight platform.
[0071] Exemplarily, the UDP protocol is used to transmit data between the simulation platform and the simulated flight platform, and a lightweight data packet structure can be designed, which includes the following fields: an identifier field, a timestamp field, a payload field, and a CRC check code field. Of course, the above fields are optional, such as including an identifier field or not including an identifier field. A timestamp field may be included or not including a timestamp field. A CRC check code field may be included or not including a CRC check code field. In addition, in addition to the above fields, the lightweight data packet structure may also include other fields, which are not limited to this.
[0072] For the identifier field, the identifier field can be 4 bytes or other bytes, and the identifier field is used to distinguish the instruction type. For example, in a UDP control message, the identifier field can be a first identifier, and the first identifier can indicate the message type (instruction type) of the UDP control message, that is, the first identifier can indicate that the current UDP message is a UDP control message, which is used to control the flight of a simulated aircraft.
[0073] For the timestamp field, the timestamp field can be 8 bytes or other bytes. The timestamp field is used for microsecond accuracy based on the Coordinated Universal Time (UTC). For example, in a UDP control message, the timestamp field can be the local time of the simulation platform.
[0074] For the payload field, the length of the payload field can be variable, and the payload field is used to carry instruction parameters or flight data. For example, in a UDP control message, the payload field is used to carry target control parameters, such as the payload field is used to carry the rudder angle A, throttle position B, and heading angle C.
[0075] For the CRC check code field, the CRC check code field can be 2 bytes or other bytes, and the CRC check code field is used to ensure data integrity. For example, in a UDP control message, the CRC check code field can be a first CRC check code, and the first CRC check code is obtained by performing a cyclic redundancy operation on the UDP control message by the simulation platform, and there is no restriction on the acquisition process of the first CRC check code.
[0076] Exemplarily, the flight simulation platform can install a plug-in that matches the simulation platform to ensure that the plug-in supports UDP communication, so that the UDP protocol is used to transmit data between the simulation platform and the flight simulation platform.
[0077] Exemplarily, the IP address of the simulated flight platform may be configured on the simulation platform, and the simulation platform may be able to send a UDP control message to the simulated flight platform based on the IP address of the simulated flight platform.
[0078] Step 502: The simulated flight platform performs flight control on the simulated aircraft based on the target control parameters.
[0079] Exemplarily, after receiving the UDP control message, the flight simulation platform can parse the target control parameters from the UDP control message, and then use the target control parameters to control the flight of the simulated aircraft. For example, if the target control parameters include the rudder angle A, the throttle position B, and the heading angle C, the flight simulation platform needs to control the rudder angle of the simulated aircraft to be the rudder angle A, the throttle position of the simulated aircraft to be the throttle position B, and the heading angle of the simulated aircraft to be the heading angle C.
[0080] Exemplarily, for the target control parameter, the target control parameter is used to control the simulated aircraft to reach the expected value of flight data, where the expected value of flight data is the expected flight data. For example, when the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, the target control parameter is used to control the simulated aircraft to reach the expected value of flight data after the initial interval time.
[0081] The expected flight data value includes the expected flight data value corresponding to the target type name. For example, if the target type name includes flight attitude, altitude and ascent and descent speed, then the expected flight data value includes the expected flight attitude value corresponding to the flight attitude (i.e., the expected value for the flight attitude), the expected altitude value corresponding to the altitude, and the expected ascent and descent speed value corresponding to the ascent and descent speed.
[0082] The expected value of flight data can be provided by the flight control system. For example, when the flight control system designs the flight control algorithm, when the target control parameter is used to control the flight of the simulated aircraft, the flight control algorithm needs to provide the expected value of flight data for the target control parameter, indicating that under the control of the target control parameter, the simulated aircraft is expected to reach the expected value of flight data. The flight control algorithm can provide the expected value of flight data to the simulation platform, and the simulation platform obtains the expected value of flight data.
[0083] For example, the expected values of flight data include the expected flight attitude value s1, the expected altitude value s2, and the expected ascent and descent speed value s3. Based on this, when the simulated flight platform uses the target control parameters (such as the rudder angle A, the throttle position B, and the heading angle C) to control the flight of the simulated aircraft, after the simulated aircraft has been controlled for an initial period of time (such as 1 hour) (i.e., the control period of the simulated aircraft using the target control parameters reaches the initial period of time), the flight control algorithm expects (anticipates) that the flight attitude of the simulated aircraft is the expected flight attitude value s1, the altitude is the expected altitude value s2, and the ascent and descent speed is the expected ascent and descent speed value s3.
[0084] During the flight of the simulated aircraft, although the flight control algorithm expects the flight attitude to be the expected flight attitude value s1, the altitude to be the expected altitude value s2, and the ascent and descent speed to be the expected ascent and descent speed value s3, the actual value of the flight attitude may not be the expected flight attitude value s1, the actual value of the altitude may not be the expected altitude value s2, and the actual value of the ascent and descent speed may not be the expected ascent and descent speed value s3.
[0085] Exemplarily, after receiving the UDP control message, the flight simulation platform can parse out the first identifier from the UDP control message. If the first identifier indicates that the current UDP message is a UDP control message, the target control parameter can be parsed from the UDP control message, and then the target control parameter is used to control the flight of the simulated aircraft. If the first identifier indicates that the current UDP message is not a UDP control message, the target control parameter will not be further parsed, and the flight of the simulated aircraft will not be controlled.
[0086] Exemplarily, after receiving the UDP control message, the flight simulation platform can parse out a first CRC check code from the UDP control message. If the verification of the UDP control message is determined to be passed based on the first CRC check code, the target control parameters can be parsed from the UDP control message, and then the target control parameters are used to control the flight of the simulated aircraft. If the verification of the UDP control message is determined to be failed based on the first CRC check code, the UDP control message is discarded, and the UDP control message is abnormal.
[0087] Step 503: After the target duration has elapsed, the simulation platform sends a UDP request message to the simulated flight platform, wherein the target duration may be determined based on the initial duration and the time offset.
[0088] For example, when the simulated flight platform uses target control parameters to control the flight of the simulated aircraft, the simulated aircraft is expected to reach the expected value of flight data after an initial interval time. Therefore, it is necessary to obtain the flight data of the simulated aircraft after the initial interval time and compare the flight data of the simulated aircraft after the initial interval time with the expected value of flight data.
[0089] It should be noted that, since there is a time offset between the local time of the simulation platform and the local time of the simulated flight platform, it is also necessary to correct the initial duration based on the time offset to obtain the target duration, that is, the sum of the initial duration and the time offset is used as the target duration. After the target duration, the simulation platform sends a UDP request message to the simulated flight platform, and obtains the flight data of the simulated aircraft through the UDP request message. This flight data is the flight data of the simulated aircraft after the initial duration.
[0090] To sum up, in this embodiment, after the simulation platform sends a UDP control message to the simulated flight platform, it does not immediately obtain the flight data of the simulated aircraft, but waits for the target time length before obtaining the flight data of the simulated aircraft. In this way, the simulation platform does not need to compress the simulation time (compress 1 hour to 1 minute), but uses real time. After an interval of the target time length (such as 1 hour), the flight data of the simulated aircraft during the flight is obtained through a UDP request message, so that the simulation platform can obtain accurate flight data instead of erroneous flight data, and then obtain accurate simulation results.
[0091] Exemplarily, the UDP request message includes the following fields: an identifier field, a timestamp field, a payload field, and a CRC checksum field. The identifier field may be 4 bytes. In the UDP request message, the identifier field may be a second identifier, and the second identifier may indicate the message type (instruction type) of the UDP request message, i.e., the second identifier indicates that the current UDP message is a UDP request message. The timestamp field may be 8 bytes, and in the UDP request message, the timestamp field may be the local time of the simulation platform.
[0092] For the payload field, the length of the payload field can be variable. In the UDP request message, the payload field is used to carry the flight data type, and the flight data type is the target type name or target type identifier.
[0093] If the flight data type is a target type name, the payload field of the UDP request message is used to carry the target type name. For example, if the target type name includes flight attitude, altitude, and ascent and descent speed, the payload field is used to carry the flight attitude, altitude, and ascent and descent speed.
[0094] If the flight data type is a target type identifier, the payload field of the UDP request message is used to carry the target type identifier, and the target type identifier represents the index value corresponding to the target type name in the data list.
[0095] For example, both the simulation platform and the flight simulation platform maintain data lists, which may include multiple types of names, such as the data list including airspeed, ground speed, altitude, vertical speed, pitch angle, roll angle, yaw angle, flight attitude, flight heading, waypoints, flight routes, engine revolutions per minute, throttle position, fuel quantity, wind speed and direction, temperature, humidity, atmospheric pressure, and visibility. Of course, the above are only examples of data lists, and the content of the data list is not limited.
[0096] Based on this, if the target type name includes flight attitude, altitude, and ascent and descent speed, then the payload field is used to carry 8, 3, and 4. For example, 8 can represent the 8th type name in the data list (i.e., the index value corresponding to flight attitude in the data list is 8), 3 can represent the 3rd type name in the data list (i.e., the index value corresponding to altitude in the data list is 3), and 4 can represent the 4th type name in the data list (i.e., the index value corresponding to ascent and descent speed in the data list is 4).
[0097] Obviously, after parsing 8, 3 and 4 from the payload field, the flight simulation platform queries the data list through the index value 8 to obtain the type name of "flight attitude", queries the data list through the index value 3 to obtain the type name of "altitude", and queries the data list through the index value 4 to obtain the type name of "ascent and descent speed". At this point, it is determined that the target type names include flight attitude, altitude and ascent and descent speed.
[0098] With respect to the CRC check code field, in the UDP request message, the CRC check code field is a second CRC check code, and the second CRC check code is obtained by performing a cyclic redundancy operation on the UDP request message by the simulation platform.
[0099] Step 504: The simulated flight platform obtains actual values of flight data of the simulated aircraft during flight.
[0100] Exemplarily, after receiving the UDP request message, the flight simulation platform can parse the target type name (or target type identifier, and obtain the target type name corresponding to the target type identifier) from the UDP request message, and then obtain the actual value of the flight data corresponding to the target type name. For example, if the target type name includes flight attitude, altitude, and ascent and descent speed, the flight simulation platform needs to obtain the actual value of the current flight attitude of the simulated aircraft (that is, the current real value of the simulated aircraft, not the expected value of the simulated aircraft), the actual value of the altitude, and the actual value of the ascent and descent speed.
[0101] Exemplarily, after receiving the UDP request message, the flight simulation platform can parse the second identifier from the UDP request message. If the second identifier indicates that the current UDP message is a UDP request message, the target type name can be parsed from the UDP request message, and then the actual value of the flight data corresponding to the target type name can be obtained. If the second identifier indicates that the current UDP message is not a UDP request message, the target type name will not be further parsed, and the actual value of the flight data will not be obtained.
[0102] Exemplarily, after receiving the UDP request message, the flight simulation platform can parse out the second CRC check code from the UDP request message. If the verification of the UDP request message is determined to be passed based on the second CRC check code, the target type name can be parsed from the UDP request message, and then the actual value of the flight data corresponding to the target type name can be obtained. If the verification of the UDP request message is determined to be failed based on the second CRC check code, the UDP request message is discarded, and the UDP request message is abnormal.
[0103] Step 505: The simulated flight platform sends a UDP response message to the simulation platform.
[0104] Exemplarily, the UDP response message includes the following fields: an identifier field, a timestamp field, a payload field, and a CRC checksum field. The identifier field may be 4 bytes. In the UDP response message, the identifier field may be a third identifier, and the third identifier may indicate the message type (instruction type) of the UDP response message, that is, the third identifier indicates that the current UDP message is a UDP response message. The timestamp field may be 8 bytes, and in the UDP response message, the timestamp field may be the local time of the simulated flight platform.
[0105] For the payload field, the length of the payload field can be variable. In the UDP response message, the payload field is used to carry the actual value of the flight data, that is, the actual value of the flight data corresponding to the target type name. For example, the payload field is used to carry the actual value of the flight attitude, the actual value of the altitude, and the actual value of the ascent and descent speed.
[0106] With respect to the CRC check code field, in the UDP response message, the CRC check code field is the third CRC check code, and the third CRC check code is obtained by performing cyclic redundancy on the UDP response message by the simulated flight platform.
[0107] Step 506: The simulation platform obtains the actual value of the flight data from the UDP response message.
[0108] Exemplarily, after receiving the UDP response message, the simulation platform can parse the actual value of the flight data from the UDP response message, and the actual value of the flight data and the expected value of the flight data are used to determine the simulation verification result. For example, a simulation verification can be performed based on the actual value of the flight data and the expected value of the flight data to obtain a simulation verification result. This embodiment does not limit the simulation verification process. For example, the simulation can be started, and the flight status of the simulated aircraft can be observed in real time based on the actual value of the flight data, and the correctness and performance of the flight control algorithm can be verified based on the actual value of the flight data and the expected value of the flight data. The simulation platform can also record the interaction data to facilitate analysis and optimization based on the interaction data in subsequent processes.
[0109] Obviously, the actual value of the flight data represents the actual value of the flight data of the simulated aircraft, and the expected value of the flight data represents the expected value (expected value) of the flight data of the simulated aircraft. In this way, when the actual value of the flight data is closer to the expected value of the flight data, it means that the control effect of the target control parameter meets expectations, that is, the simulation verification result shows that the control effect of the target control parameter meets expectations. When the actual value of the flight data is more different from the expected value of the flight data, it means that the control effect of the target control parameter does not meet expectations, that is, the simulation verification result shows that the control effect of the target control parameter does not meet expectations.
[0110] Exemplarily, after receiving the UDP response message, the simulation platform can parse the third identifier from the UDP response message, and if the third identifier indicates that the current UDP message is a UDP response message, the actual value of the flight data can be parsed from the UDP response message. If the third identifier indicates that the current UDP message is not a UDP response message, the actual value of the flight data will not be further parsed.
[0111] Exemplarily, after receiving the UDP response message, the flight simulation platform can parse out a third CRC check code from the UDP response message. If the UDP response message is determined to have passed the check based on the third CRC check code, the actual value of the flight data can be parsed out from the UDP response message. If the UDP response message is determined to have failed the check based on the third CRC check code, the UDP response message is discarded.
[0112] In a possible implementation, dual-channel redundant transmission may be enabled for at least one of the UDP control message, the UDP request message, and the UDP response message, thereby realizing a redundant fault-tolerant mechanism. When dual-channel redundant transmission is enabled, a dynamic redundancy check algorithm (DRC) may also be combined.
[0113] In one possible implementation, the simulation platform supports modular design and scalability. For example, the simulation platform supports multi-aircraft collaborative simulation, complex weather conditions simulation, and customized flight mission configuration, and can be widely used in flight training, aircraft design verification, flight control system testing, and other fields. The simulation platform provides data recording and playback functions, which facilitates users to conduct detailed analysis and optimization of the flight process.
[0114] The simulation platform is deeply integrated with the flight simulation platform to verify the correctness and effectiveness of the core control algorithm (i.e., flight control algorithm), and provide a high-standard test environment for the flight control algorithm. For example, simulation verification is performed based on the actual value of flight data and the expected value of flight data to obtain simulation verification results. Based on the simulation verification results, the correctness and effectiveness of the core control algorithm can be verified.
[0115] It can be seen from the above technical solutions that in the embodiment of the present application, the simulation platform and the simulated flight platform jointly simulate to realize the flight simulation method, and the simulation platform and the simulated flight platform interact based on the UDP protocol. By using the simulated flight platform, the simulation platform does not send control instructions to the simulated aircraft, but sends UDP control messages to the simulated flight platform. After sending the UDP control message, the simulation platform does not need to compress the simulation time, but uses real time. After the target interval (such as 1 hour), it continues to send UDP request messages to the simulated flight platform so that the simulated flight platform can obtain the flight data of the simulated aircraft during the flight. Since the simulated flight platform can highly simulate real flight driving and highly restore driving operations, the simulated flight platform can accurately control the simulated aircraft and obtain accurate flight data. The simulation platform can obtain accurate flight data and accurate simulation results. The simulation platform and the simulated flight platform use UDP messages to interact, realizing efficient two-way data interaction between the simulation platform and the simulated flight platform. Through UDP messages, data exchange can be completed within milliseconds, ensuring the real-time and accuracy of data interaction, thereby improving the authenticity and credibility of the simulation, and realizing high-precision and high-fidelity simulation verification. The time synchronization algorithm is used to solve the coupling problem between simulation time and real time, and improve the authenticity and credibility of the simulation. It can achieve high-precision data interaction, low-latency communication, strong scalability and compatibility, as well as detailed recording and playback functions of the flight process. It can achieve efficient verification of flight control algorithms and is suitable for scenarios such as aircraft design, autonomous driving testing, and multi-machine collaborative simulation.
[0116] It can provide a low-latency, high-precision, and scalable joint simulation system. By optimizing the communication architecture and time synchronization mechanism, it can solve the shortcomings of simulation technology in terms of real-time, compatibility, and scalability, and improve the verification efficiency and reliability of flight control algorithms. The UDP protocol is used to achieve low-latency and high-efficiency communication to ensure the real-time and accuracy of data transmission. Through the optimized data packet structure and verification mechanism, packet loss and error accumulation are avoided, data integrity is improved, and data processing efficiency and stability are improved.
[0117] Based on the same application concept as the above method, a flight simulation device is proposed in the embodiment of the present application and applied to a simulation platform, see Figure 6 FIG. 1 is a schematic diagram of the structure of the device, wherein the device comprises: The sending module 61 is used to send a UDP control message to the simulated flight platform, wherein the UDP control message includes a target control parameter, so that the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, and the target control parameter is used to control the simulated aircraft to reach an expected value of flight data; after an interval target time, send a UDP request message to the simulated flight platform, so that the simulated flight platform obtains the actual value of flight data of the simulated aircraft during flight; The receiving module 62 is used to receive the UDP response message sent by the simulated flight platform; wherein the UDP response message includes the actual value of the flight data; The acquisition module 63 is used to acquire the actual value of the flight data from the UDP response message; the actual value of the flight data and the expected value of the flight data are used to determine the simulation verification result.
[0118] Exemplarily, when the simulated flight platform performs flight control on the simulated aircraft based on the target control parameters, the target control parameters are used to control the simulated aircraft to reach the expected value of the flight data after an initial duration; wherein the target duration is determined based on the initial duration and a time offset; for example, the time offset may represent the difference between the local time of the simulation platform and the local time of the simulated flight platform.
[0119] Exemplarily, the acquisition module 63 is also used to obtain the time offset; when the acquisition module 63 obtains the time offset, it is specifically used to: obtain multiple exchange moments; for each exchange moment, send a first timestamp to the simulated flight platform at the exchange moment, and receive a second timestamp sent by the simulated flight platform at the exchange moment, the first timestamp represents the local time of the simulation platform at the exchange moment, and the second timestamp represents the local time of the simulated flight platform at the exchange moment; determine the time difference corresponding to each exchange moment, the time difference is the difference between the first timestamp of the exchange moment and the second timestamp of the exchange moment; obtain the time offset based on the average value of the time differences corresponding to all exchange moments.
[0120] Exemplarily, the UDP request message includes a flight data type, and the flight data type is a target type name, or the flight data type is a target type identifier; wherein the simulation platform and the simulated flight platform both maintain data lists, and the data lists include multiple type names, and the target type identifier represents the index value corresponding to the target type name in the data list; wherein the flight data actual value includes the flight data actual value corresponding to the target type name, and the flight data expected value includes the flight data expected value corresponding to the target type name.
[0121] Exemplarily, the device also includes: a processing module for displaying a graphical interface, the graphical interface including multiple control parameters supported by the simulation platform and multiple type names supported by the simulation platform; wherein each control parameter is a parameter for performing flight control on the simulated aircraft, and each type name is a type of flight data of the simulated aircraft; receiving a first operation instruction, the first operation instruction including a target control parameter, the target control parameter including some or all of the control parameters displayed on the graphical interface; receiving a second operation instruction, the second operation instruction including a target type name, the target type name including some or all of the type names displayed on the graphical interface.
[0122] In a possible implementation, the multiple type names may at least include, but are not limited to, multiple of the following type names: airspeed, ground speed, altitude, vertical speed, pitch angle, roll angle, yaw angle, flight attitude, flight heading, waypoint, flight route, engine rotations per minute, throttle position, fuel quantity, wind speed and direction, temperature, humidity, atmospheric pressure, and visibility.
[0123] Exemplarily, the UDP control message includes a first identifier and a first CRC check code, the first identifier indicates the message type of the UDP control message, and the first CRC check code is obtained by performing a cyclic redundancy operation on the UDP control message; the UDP request message includes a second identifier and a second CRC check code, the second identifier indicates the message type of the UDP request message, and the second CRC check code is obtained by performing a cyclic redundancy operation on the UDP request message.
[0124] In a possible implementation, the UDP response message may include a third identifier and a third CRC check code, and the acquisition module 63 is specifically used to obtain the actual value of the flight data from the UDP response message: if the message type of the UDP response message is determined to be a response type based on the third identifier, and the verification of the UDP response message is determined to be passed based on the third CRC check code, then the actual value of the flight data is obtained from the UDP response message.
[0125] Based on the same application concept as the above method, an electronic device is proposed in the embodiment of the present application (the electronic device is a simulation platform in the above embodiment, i.e., a simulation device), see Figure 7 As shown, the electronic device may include: a processor 71 and a machine-readable storage medium 72, wherein the machine-readable storage medium 72 stores machine-executable instructions that can be executed by the processor 71; the processor 71 is used to execute the machine-executable instructions to implement the flight simulation method disclosed in the above example of this application.
[0126] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the flight simulation method disclosed in the above example of the present application can be implemented.
[0127] The above-mentioned machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device, which may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (Radom Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as optical disk, DVD, etc.), or similar storage medium, or a combination thereof.
[0128] Based on the same application concept as the above method, the embodiment of the present application further provides a computer program product, which may include a computer program. When the computer program is executed by a processor, the flight simulation method disclosed in the above example of the present application can be implemented.
[0129] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0130] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A flight simulation method, characterized in that: Applied to a simulation platform, the method comprises: Sending a User Datagram Protocol (UDP) control message to the flight simulation platform, wherein the UDP control message includes a target control parameter, so that the flight simulation platform performs flight control on the simulated aircraft based on the target control parameter, wherein the target control parameter is used to control the simulated aircraft to reach an expected value of flight data; After the target interval, a UDP request message is sent to the simulated flight platform, so that the simulated flight platform obtains the actual value of the flight data of the simulated aircraft during the flight; Receive a UDP response message sent by the simulated flight platform, wherein the UDP response message includes the actual value of the flight data, and obtain the actual value of the flight data from the UDP response message; wherein the actual value of the flight data and the expected value of the flight data are used to determine a simulation verification result.
2. The method according to claim 1, characterized in that When the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, the target control parameter is used to control the simulated aircraft to reach the expected value of the flight data after an initial interval time; Wherein, the target duration is determined based on the initial duration and a time offset; the time offset represents the difference between the local time of the simulation platform and the local time of the simulated flight platform.
3. The method according to claim 2, characterized in that The process of obtaining the time offset specifically includes: Acquire multiple exchange moments; for each exchange moment, send a first timestamp to the simulated flight platform at the exchange moment, and receive a second timestamp sent by the simulated flight platform at the exchange moment; wherein the first timestamp represents the local time of the simulation platform at the exchange moment, and the second timestamp represents the local time of the simulated flight platform at the exchange moment; Determine a time difference corresponding to each exchange moment; wherein the time difference is a difference between a first timestamp of the exchange moment and a second timestamp of the exchange moment; The time offset is obtained based on an average value of the time differences corresponding to all the exchange moments.
4. The method according to claim 1, characterized in that: The UDP request message includes a flight data type, and the flight data type is a target type name or a target type identifier; wherein the simulation platform and the simulated flight platform maintain a data list, and the data list includes a plurality of type names, and the target type identifier indicates an index value corresponding to the target type name in the data list; The actual value of the flight data includes the actual value of the flight data corresponding to the target type name, and the expected value of the flight data includes the expected value of the flight data corresponding to the target type name.
5. The method according to claim 4, characterized in that Before sending the UDP control message to the simulated flight platform, the method further includes: Displaying a graphical interface, the graphical interface including a plurality of control parameters supported by the simulation platform and a plurality of type names supported by the simulation platform; wherein each control parameter is a parameter for performing flight control on the simulated aircraft, and each type name is a type of flight data of the simulated aircraft; receiving a first operation instruction, wherein the first operation instruction includes a target control parameter, and the target control parameter includes a part of the control parameters or all of the control parameters displayed on the graphical interface; A second operation instruction is received, where the second operation instruction includes a target type name, and the target type name includes a part of the type name or all of the type name displayed on the graphical interface.
6. The method according to claim 4 or 5, characterized in that: The multiple type names include at least multiple of the following type names: airspeed, ground speed, altitude, vertical speed, pitch angle, roll angle, yaw angle, flight attitude, flight heading, waypoint, flight route, number of engine rotations per minute, throttle position, fuel quantity, wind speed and direction, temperature, humidity, atmospheric pressure, and visibility.
7. The method according to claim 1, characterized in that The UDP control message includes a first identifier and a first cyclic redundancy check CRC check code, the first identifier indicates the message type of the UDP control message, and the first CRC check code is obtained by performing a cyclic redundancy operation on the UDP control message; the UDP request message includes a second identifier and a second CRC check code, the second identifier indicates the message type of the UDP request message, and the second CRC check code is obtained by performing a cyclic redundancy operation on the UDP request message; The UDP response message includes a third identifier and a third CRC check code, and the actual value of the flight data is obtained from the UDP response message, including: if it is determined based on the third identifier that the message type of the UDP response message is a response type, and based on the third CRC check code, it is determined that the check of the UDP response message passes, then the actual value of the flight data is obtained from the UDP response message.
8. A flight simulation device, characterized in that: Applied to a simulation platform, the device comprises: A sending module is used to send a User Datagram Protocol UDP control message to a simulated flight platform, wherein the UDP control message includes a target control parameter, so that the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, and the target control parameter is used to control the simulated aircraft to reach an expected value of flight data; after an interval target time, a UDP request message is sent to the simulated flight platform, so that the simulated flight platform obtains an actual value of flight data of the simulated aircraft during flight; A receiving module, used for receiving a UDP response message sent by the simulated flight platform; wherein the UDP response message includes the actual value of the flight data; An acquisition module is used to acquire the actual value of the flight data from the UDP response message; the actual value of the flight data and the expected value of the flight data are used to determine the simulation verification result.
9. The device according to claim 8, characterized in that in, When the simulated flight platform performs flight control on the simulated aircraft based on the target control parameter, the target control parameter is used to control the simulated aircraft to reach the expected value of the flight data after an initial time interval; wherein the target time interval is determined based on the initial time interval and a time offset; and the time offset represents the difference between the local time of the simulation platform and the local time of the simulated flight platform; Wherein, the acquisition module is also used to acquire the time offset; when acquiring the time offset, the acquisition module is specifically used to: acquire multiple exchange moments; for each exchange moment, send a first timestamp to the simulated flight platform at the exchange moment, receive a second timestamp sent by the simulated flight platform at the exchange moment, the first timestamp represents the local time of the simulation platform at the exchange moment, and the second timestamp represents the local time of the simulated flight platform at the exchange moment; determine the time difference corresponding to each exchange moment, the time difference is the difference between the first timestamp of the exchange moment and the second timestamp of the exchange moment; acquire the time offset based on the average value of the time differences corresponding to all exchange moments; Wherein, the UDP request message includes a flight data type, and the flight data type is a target type name, or the flight data type is a target type identifier; wherein the simulation platform and the simulated flight platform both maintain a data list, and the data list includes multiple type names, and the target type identifier indicates an index value corresponding to the target type name in the data list; wherein the flight data actual value includes the flight data actual value corresponding to the target type name, and the flight data expected value includes the flight data expected value corresponding to the target type name; Wherein, the device also includes: a processing module, used to display a graphical interface, the graphical interface includes multiple control parameters supported by the simulation platform and multiple type names supported by the simulation platform; wherein each control parameter is a parameter used to perform flight control on the simulated aircraft, and each type name is a type of flight data of the simulated aircraft; receiving a first operation instruction, the first operation instruction includes a target control parameter, and the target control parameter includes some or all of the control parameters displayed on the graphical interface; receiving a second operation instruction, the second operation instruction includes a target type name, and the target type name includes some or all of the type names displayed on the graphical interface; The multiple type names include at least multiple of the following type names: airspeed, ground speed, altitude, vertical speed, pitch angle, roll angle, yaw angle, flight attitude, flight heading, waypoint, flight route, number of engine revolutions per minute, throttle position, fuel quantity, wind speed and direction, temperature, humidity, atmospheric pressure, visibility; The UDP control message includes a first identifier and a first cyclic redundancy check CRC check code, the first identifier indicates the message type of the UDP control message, and the first CRC check code is obtained by performing a cyclic redundancy operation on the UDP control message; the UDP request message includes a second identifier and a second CRC check code, the second identifier indicates the message type of the UDP request message, and the second CRC check code is obtained by performing a cyclic redundancy operation on the UDP request message; Wherein, the UDP response message includes a third identifier and a third CRC check code, and the acquisition module is specifically used to obtain the actual value of the flight data from the UDP response message: if the message type of the UDP response message is determined to be a response type based on the third identifier, and the verification of the UDP response message is determined to be passed based on the third CRC check code, then the actual value of the flight data is obtained from the UDP response message.
10. An electronic device, characterized in that: include: a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor; The processor is used to execute machine executable instructions to implement the method described in any one of claims 1-7.
Citation Information
Patent Citations
Semi-physical simulation method and system based on PSCAD / EMTDC, computer device and computer readable storage medium
CN108181834A
Flight control system semi-physical simulation platform for large and medium unmanned aerial vehicles
CN113917854A
Data processing method and device, electronic equipment and computer readable storage medium
CN115688494A
Interoperation simulation platform and operation method applied to airplanes of various models
CN117289625A
Vehicle simulation method and device, computer equipment, storage medium and program product
CN117471937A