A flight simulator database configuration method and system

By analyzing and assigning the database information of the flight simulator board, automatically generating and verifying the variable information file, the problem of mismatch between the software variables and the electrical board information is solved, the efficiency and accuracy of database configuration is improved, and valuable time is saved .

CN114925070BActive Publication Date: 2024-11-01ACCEL (TIANJIN) FLIGHT SIMULATION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210627068.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2024-11-01
Estimated Expiration
2042-05-25

AI Technical Summary

Technical Problem

During the configuration of the flight simulator database, the channel error occurs because the software variable name does not match the electrical board information, and the board information needs to be manually compared in project upgrades or new projects, which is time-consuming and error-prone, which reduces the configuration efficiency.

Method used

By analyzing the database of the flight simulator board, obtaining software variable information, and determining whether it is empty. If not, assigning the value to the preset database table to find the input and output information. If it is empty, generate a variable information file and import the board configuration information. And verify its validity and write to the database according to user selection.

Benefits of technology

It significantly improves the efficiency of the flight simulator database configuration, reduces the steps of manual comparison, ensures the accuracy and consistency of data, and saves the time of integration testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114925070B_ABST
    Figure CN114925070B_ABST
Patent Text Reader

Abstract

The present invention provides a flight simulator database configuration method, comprising: parsing a board card database; determining whether software variable information is empty, if not, assigning software variable information to corresponding fields according to a preset database table, searching for corresponding input and output information of the board card, and obtaining a variable information file; if yes, generating a variable information file according to the preset database table; importing the variable information file into the board card to obtain board card configuration information; verifying whether the board card configuration information is valid, if not, re-parsing the board card database, if yes, writing into the board card according to a user's choice, if the user chooses yes, writing into the board card and storing corresponding information, if the user chooses no, refusing to write. It can be seen that the present invention parses the board card database, uses the database to assign software variable information to corresponding fields and then imports into the board card, eliminating the need to manually compare board card configuration information, thereby significantly improving the configuration efficiency of the flight simulator database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of flight simulator database configuration, and in particular to a flight simulator database configuration method and system. Background Art

[0002] The boards in the flight simulator can be divided into digital input modules, digital output modules, analog input modules, analog output modules and power supply modules according to different input and output interfaces. They are maintained by electrical personnel. Since the software needs to sort out the corresponding software variable names of the above modules according to the definitions of the relevant pins of the boards, the work is cumbersome and error-prone, which will cause errors in the generated board database channels. There are two specific situations:

[0003] Case 1: An existing project is upgraded, and the corresponding software variables already exist in the database to drive the board. Later, when the project is integrated, the board information is updated. Directly modifying the database to match causes a mismatch between the software variable information and the electrical board information, which will cause channel errors when the database is automatically generated.

[0004] Case 2: A brand new project only has the configuration information of the board, and there is no corresponding software variable in the database to drive the board.

[0005] In both cases, the board information needs to be manually compared to generate software driver variable information and finally generate a database, which is time-consuming and prone to errors.

[0006] In summary, how to improve the configuration efficiency of the flight simulator database is a technical problem that technical personnel in this field currently need to solve. Summary of the invention

[0007] In view of this, the purpose of the present invention is to provide a flight simulator database configuration method and system, which can significantly improve the configuration efficiency of the flight simulator database. The specific scheme is as follows:

[0008] A flight simulator database configuration method, comprising:

[0009] Step S1: parsing the database of the flight simulator board to obtain software variable information;

[0010] Step S2: Determine whether the software variable information is empty, if not, proceed to step S3, if yes, proceed to step S5;

[0011] Step S3: assigning the software variable information to corresponding fields according to the preset database table to obtain an association table;

[0012] Step S4: According to the association table, search for the corresponding input and output information of the flight simulator board to obtain a variable information file;

[0013] Step S5: generating the variable information file according to the preset database table;

[0014] Step S6: importing the variable information file into the flight simulator board to obtain board configuration information;

[0015] Step S7: Verify whether the board configuration information is valid, if so, proceed to step S8, if not, return to step S1;

[0016] Step S8: Based on the user's choice, the board configuration information is written into the flight simulator board. If the user chooses yes, the board configuration information is written into the flight simulator board and the corresponding information is stored. If the user chooses no, the board configuration information is refused to be written into the flight simulator board.

[0017] Preferably, the preset fields of the preset data table library include: board name board_name, board digital output interface do_conn, board digital output pin do_pin, board digital output bit do_bit, board digital input interface di_conn, board digital input pin di_pin, board digital input bit di_bit, board analog output / input interface ao_ai_conn, board analog output / input pin ao_ai_pin, board analog output bit ao_bit, board analog input bit ai_bit.

[0018] Preferably, the database for parsing the flight simulator board includes:

[0019] Acquire current configuration information of the flight simulator board, create a parsing data table library according to the current configuration information, and add parsing fields to the parsing data table library, wherein the parsing fields include one or more fields in the preset fields;

[0020] Obtaining the amount of information of the current configuration information, and using the amount of information as the number of collection times in a cycle;

[0021] Acquire the data of the current configuration information according to the parsed field, and generate a corresponding return table each time any data corresponding to the parsed field is successfully acquired, so as to complete the collection of corresponding data of all fields in the parsed field in one cycle and obtain a return total table;

[0022] Obtain the total number of rows of the generated return table, perform cyclic matching on the return total table with the total number of rows as a cycle period, and obtain a parsed list of all cells in the return total table;

[0023] According to the corresponding relationship of the preset fields, the parsing list is assigned to the parsing field to obtain the software variable information.

[0024] Preferably, the association table includes a board output table and a board input table.

[0025] Preferably, the flight simulator database configuration method further includes:

[0026] The standby variable information file imported by the user is obtained, and standby board configuration information is generated.

[0027] The present invention also discloses a flight simulator database configuration system, comprising:

[0028] Database parsing module, used to parse the database of the flight simulator board to obtain software variable information;

[0029] A variable information file generation module is used to determine whether the software variable information is empty. If not, assign the software variable information to the corresponding field according to the preset database table to obtain an association table, and search for the corresponding input and output information of the flight simulator board according to the association table to obtain a variable information file. If yes, generate the variable information file according to the preset database table;

[0030] A board configuration information generating module, used for importing the variable information file into the flight simulator board to obtain board configuration information;

[0031] A board configuration information verification module, used to verify whether the board configuration information is valid. If so, the board configuration information is written into the flight simulator board according to the user's choice. If not, the database parsing module reparses the database of the flight simulator board;

[0032] The user interaction module is used to write the board configuration information into the flight simulator board according to the user's selection. If the user selects yes, the board configuration information is written into the flight simulator board and the corresponding information is stored. If the user selects no, the board configuration information is refused to be written into the flight simulator board.

[0033] The present invention provides a flight simulator database configuration method, comprising: parsing a database of a flight simulator board to obtain software variable information; judging whether the software variable information is empty, if not, assigning the software variable information to a corresponding field according to a preset database table, searching for corresponding input and output information of the flight simulator board to obtain a variable information file; if yes, generating a variable information file according to the preset database table; importing the variable information file into the flight simulator board to obtain board configuration information; verifying whether the board configuration information is valid, if not, re-parsing the database of the flight simulator board, if yes, writing the board configuration information into the flight simulator board according to a user's choice, if the user chooses yes, writing the board configuration information into the flight simulator board and storing the corresponding information, if the user chooses no, refusing to write the board configuration information into the flight simulator board. It can be seen that the present invention parses the database of the flight simulator board, uses the database to assign software variable information to corresponding fields and then imports it into the board, eliminating the need for manual comparison of board configuration information and ensuring data accuracy and consistency, greatly improving the efficiency of recreating the database in the early stage of simulator integration due to frequent changes in board configuration information, saving precious time for the entire integration test of the simulator, thereby significantly improving the configuration efficiency of the flight simulator database. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the implementation scheme of the present invention or the technical scheme in the prior art, the drawings required for use in the implementation scheme or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only the implementation scheme of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0035] Figure 1 A schematic diagram of a flow chart of a flight simulator database configuration method provided by an embodiment of the present invention;

[0036] Figure 2 A schematic diagram of a user selection interface of a specific flight simulator database configuration method provided by an embodiment of the present invention;

[0037] Figure 3 A structural schematic diagram of a flight simulator database configuration system provided for an implementation scheme of the present invention. DETAILED DESCRIPTION

[0038] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0039] A flight simulator database configuration method, referring to Figure 1 As shown, including:

[0040] Step S1: parse the database of the flight simulator board to obtain software variable information.

[0041] The present invention provides a specific implementation scheme, wherein the database for parsing the flight simulator board includes:

[0042] The current configuration information of the flight simulator board is obtained, and a parsing data table library is created according to the current configuration information, and a parsing field is added to the parsing data table library, wherein the parsing field includes one or more fields in the preset fields; the information quantity of the current configuration information is obtained, and the information quantity is used as the number of collection times in a cycle; the data of the current configuration information is obtained according to the parsing field, and the corresponding return table sheet is generated after any data corresponding to the parsing field is successfully obtained each time get_each_sheet is used, so as to complete the collection of the corresponding data of all fields in the parsing field in a cycle, and obtain the return total table sheets; the total number of rows nrows of the generated return table is obtained, and the return total table is cyclically matched with the above total number of rows as the cycle, and the parsing list col_values ​​of all cells in the return total table is obtained; according to the corresponding relationship of the preset fields, the parsing list is assigned to the parsing field to obtain the software variable information.

[0043] In actual applications, you can also directly obtain each returned table sheet of the board configuration information without first obtaining the number of information, and return the total returned table sheets, and loop with the total returned table sheets as a variable. It can be understood that the number corresponding to the total returned table sheets is the same as the number of information in the current configuration information. Looping with the total returned table sheets as a variable is equivalent to collecting the number of information as the number of collections in a loop cycle, and obtaining the data get_each_sheet corresponding to each returned table sheet. You can use the name of the returned table sheet as get_each_sheet, and then obtain the total number of rows of the returned total table sheets according to the total number of rows nrows of the data corresponding to each returned table sheet, and obtain the parsed list col_values ​​of all cells in the returned total table in combination with the corresponding value row_values ​​in the returned table sheet, and assign the value of the field to the corresponding field of the data.

[0044] After the digital output channel DO, digital input channel DI, analog output channel AO, and analog input notification AI of the board are parsed, the parsing results are stored. Next, the table is associated with the tables in the database, involving multi-table association queries, and the required software variable information is found. The obtained DO, DI, AO, and AI software variable information are appended to a global list, and finally the list data is written to the file by writing the file, and finally the software variable information file is generated.

[0045] Step S2: Determine whether the software variable information is empty, if not, proceed to step S3, if yes, proceed to step S5.

[0046] If the software variable information is not empty, that is, there is software variable information, it means that the project is about to be upgraded and the existing software variable information is to be used to drive the board. At this time, step S3 is performed.

[0047] If the software variable information is empty, it is equivalent to a brand new project, which only has the configuration information of the board, and there is no corresponding software variable in the database to drive the board, and step S5 is performed at this time.

[0048] If yes, it means that the software variable information is empty, that is, there is no variable, which means that the board-related information has not changed, and the preset data is written to the board; if no, it means that the software variable information is not empty, that is, there is software variable information, which means that the board information has been updated.

[0049] Step S3: According to the preset database table, assign the software variable information to the corresponding fields to obtain an association table.

[0050] Preferably, the preset fields of the preset data table library include: board name board_name, board digital output interface do_conn, board digital output pin do_pin, board digital output bit do_bit, board digital input interface di_conn, board digital input pin di_pin, board digital input bit di_bit, board analog output / input interface ao_ai_conn, board analog output / input pin ao_ai_pin, board analog output bit ao_bit, board analog input bit ai_bit.

[0051] Step S4: According to the association table, search for the corresponding input and output information of the flight simulator board to obtain the variable information file.

[0052] The associated tables include the board output table io_output_variables_io_channels and the board input table io_input_variables_io_channels.

[0053] Step S5: Generate a variable information file according to the preset database table.

[0054] If there is no corresponding software variable to drive the board, a variable information file is generated according to the preset database table.

[0055] It can be understood that in actual applications, in order to improve the configuration efficiency in some specific occasions, such as configuring multiple flight simulator boards, the present invention also provides a preferred solution, including: obtaining the spare variable information file imported by the user, and generating spare board configuration information.

[0056] Step S6: Import the variable information file into the flight simulator board to obtain the board configuration information.

[0057] In practical applications, the configuration efficiency can be further improved through the board database script. The present invention provides a specific implementation scheme. The variable information file is written into the corresponding program structure. The program assembles a SQL string according to the data in the structure and writes it into the script. Each board will generate a database script file, and then a general script is used to call all board database scripts for automatic execution. Finally, the data is updated and written to the local database file. The SQL file is called by creating a database command to generate a database.

[0058] Step S7: Verify whether the board configuration information is valid. If so, proceed to step S8; if not, return to step S1.

[0059] Step S8: Based on the user's choice, write the board configuration information into the flight simulator board. If the user chooses yes, write the board configuration information into the flight simulator board and store the corresponding information. If the user chooses no, refuse to write the board configuration information into the flight simulator board.

[0060] In actual use, a prompt box pops up to ask the user to confirm whether to accept the change or reject it. If accepted, the change takes effect. If rejected, the change is invalid. Figure 2 As shown, you can use viewlog to preview the changes to determine whether the changes are correct. Of course, you can also use other interfaces according to actual needs.

[0061] The present invention also discloses a flight simulator database configuration system, referring to Figure 3 As shown, including:

[0062] Database parsing module 1, used to parse the database of the flight simulator board to obtain software variable information;

[0063] The variable information file generation module 2 is used to determine whether the software variable information is empty. If not, the software variable information is assigned to the corresponding field according to the preset database table to obtain the association table, and the corresponding input and output information of the flight simulator board is searched according to the association table to obtain the variable information file. If yes, the variable information file is generated according to the preset database table;

[0064] The board configuration information generating module 3 is used to import the variable information file into the flight simulator board to obtain the board configuration information;

[0065] The board configuration information verification module 4 is used to verify whether the board configuration information is valid. If so, the board configuration information is written into the flight simulator board according to the user's choice. If not, the database parsing module reparses the database of the flight simulator board;

[0066] The user interaction module 5 is used to write the board configuration information into the flight simulator board according to the user's selection. If the user selects yes, the board configuration information is written into the flight simulator board and the corresponding information is stored. If the user selects no, the board configuration information is refused to be written into the flight simulator board.

[0067] The flight simulator database configuration system disclosed in the present invention has the same technical effect as the above method, which will not be described in detail here.

[0068] Finally, it should be noted that, in this article, the terms "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, an element defined by the sentence "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0069] The above is a detailed introduction to a flight simulator database configuration method and system provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above implementation plan is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A flight simulator database configuration method, characterized in that: include: Step S1: parsing the database of the flight simulator board to obtain software variable information, wherein parsing the database of the flight simulator board includes: Acquire current configuration information of the flight simulator board, create a parsing database table according to the current configuration information, and add parsing fields to the parsing database table, wherein the parsing fields include one or more fields in the preset fields; Obtaining the amount of information of the current configuration information, and using the amount of information as the number of collection times in a cycle; Acquire the data of the current configuration information according to the parsed field, and generate a corresponding return table each time any data corresponding to the parsed field is successfully acquired, so as to complete the collection of corresponding data of all fields in the parsed field in one cycle and obtain a return total table; Obtain the total number of rows of the generated return table, perform cyclic matching on the return total table with the total number of rows as a cycle period, and obtain a parsed list of all cells in the return total table; According to the correspondence between the preset fields, assigning the parsing list to the parsing field to obtain the software variable information; Step S2: Determine whether the software variable information is empty, if not, proceed to step S3, if yes, proceed to step S5; Step S3: assigning the software variable information to corresponding fields according to the preset database table to obtain an association table; Step S4: According to the association table, search for the corresponding input and output information of the flight simulator board to obtain a variable information file; Step S5: generating the variable information file according to the preset database table; Step S6: importing the variable information file into the flight simulator board to obtain board configuration information; Step S7: Verify whether the board configuration information is valid, if so, proceed to step S8, if not, return to step S1; Step S8: Based on the user's choice, the board configuration information is written into the flight simulator board. If the user chooses yes, the board configuration information is written into the flight simulator board and the corresponding information is stored. If the user chooses no, the board configuration information is refused to be written into the flight simulator board.

2. The flight simulator database configuration method according to claim 1, characterized in that: The preset fields of the preset database table include: board name board_name, board digital output interface do_conn, board digital output pin do_pin, board digital output bit do_bit, board digital input interface di_conn, board digital input pin di_pin, board digital input bit di_bit, board analog output / input interface ao_ai_conn, board analog output / input pin ao_ai_pin, board analog output bit ao_bit, board analog input bit ai_bit.

3. The flight simulator database configuration method according to claim 2, characterized in that: The association table includes a board output table and a board input table.

4. The flight simulator database configuration method according to claim 3, characterized in that: Also includes: The standby variable information file imported by the user is obtained, and standby board configuration information is generated.

5. A flight simulator database configuration system, characterized in that: include: The database parsing module is used to parse the database of the flight simulator board to obtain software variable information, wherein parsing the database of the flight simulator board includes: Acquire current configuration information of the flight simulator board, create a parsing database table according to the current configuration information, and add parsing fields to the parsing database table, wherein the parsing fields include one or more fields in the preset fields; Obtaining the amount of information of the current configuration information, and using the amount of information as the number of collection times in a cycle; Acquire the data of the current configuration information according to the parsed field, and generate a corresponding return table each time any data corresponding to the parsed field is successfully acquired, so as to complete the collection of corresponding data of all fields in the parsed field in one cycle and obtain a return total table; Obtain the total number of rows of the generated return table, perform cyclic matching on the return total table with the total number of rows as a cycle period, and obtain a parsed list of all cells in the return total table; According to the correspondence between the preset fields, assigning the parsing list to the parsing field to obtain the software variable information; A variable information file generation module is used to determine whether the software variable information is empty. If not, assign the software variable information to the corresponding field according to the preset database table to obtain an association table, and search for the corresponding input and output information of the flight simulator board according to the association table to obtain a variable information file. If yes, generate the variable information file according to the preset database table; A board configuration information generating module, used for importing the variable information file into the flight simulator board to obtain board configuration information; A board configuration information verification module, used to verify whether the board configuration information is valid. If so, the board configuration information is written into the flight simulator board according to the user's choice. If not, the database parsing module reparses the database of the flight simulator board; The user interaction module is used to write the board configuration information into the flight simulator board according to the user's selection. If the user selects yes, the board configuration information is written into the flight simulator board and the corresponding information is stored. If the user selects no, the board configuration information is refused to be written into the flight simulator board.