A method for automatically generating user requirements of a spacecraft control system based on C code
By using C code encapsulation and graphical modeling technology, user requirements for spacecraft control systems are automatically generated, solving the errors and inconsistencies caused by manual coding and improving coding efficiency and consistency.
Patent Information
- Application Number
- CN202310287689.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-22
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2043-03-22
AI Technical Summary
In existing technologies, user requirements for spacecraft control systems are manually written, which is prone to errors, and the user requirements are inconsistent with the simulation verification code, leading to difficulties in later maintenance.
The sensor interface, actuator interface, normalized algorithm, and custom algorithm are encapsulated in C code to generate an algorithm package. State flow diagrams and program flow diagrams are built, the location of C code input by the user is recorded, and it is encapsulated into a C++ class for compilation, simulation, and error correction, ultimately generating a software requirements document.
It improves the efficiency and consistency of writing user requirements, reduces errors in manual writing, and achieves synchronization between user requirements and simulation verification code.
Smart Images

Figure CN116339700B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for automatically generating user requirements for a spacecraft control system based on C code, belonging to the field of space technology. Background Technology
[0002] The space station comprises several modules, involving dozens of configurations and multiple control modes. Using traditional user requirement writing methods requires the following steps: scheme algorithm design, scheme simulation, user requirement writing, mathematical simulation program writing, and mathematical simulation program verification to complete the user requirement output. This process has two significant drawbacks: 1) User requirement writing relies entirely on manual labor. Writing, checking, and proofreading involve numerous mathematical formulas, making it prone to errors. It requires meticulous proofreading by writers, the compilation of a large number of symbols and data dictionaries, and subsequent maintenance, where each change necessitates checking multiple related items in the software requirements, increasing the risk of errors. 2) The coding process from user requirements to the mathematical simulation program is prone to inconsistencies, potentially leading to numerous test cases in the mathematical simulation verifying something other than the final output software requirements. Summary of the Invention
[0003] The technical problem solved by this invention is to overcome the shortcomings of the prior art and provide an automatic generation method for user requirements of spacecraft control systems based on C code. This method solves the problems of relying on manual writing of user requirements for spacecraft control systems, lack of effective tools for error checking, and easy inconsistency between user requirements and simulation verification code.
[0004] The technical solution of this invention is: a method for automatically generating user requirements for a spacecraft control system based on C code, comprising:
[0005] The sensor interface, actuator interface, normalization algorithm, and custom algorithm are encapsulated using C compilation to generate corresponding algorithm packages;
[0006] The state flow diagram and program flow diagram are built based on the algorithm package, and the controller is designed by simulating C code according to the user's input requirements. At the same time, the position of each part of the C code input by the user is recorded.
[0007] The edited user-defined simulation C code is encapsulated into a C++ class that meets the interface requirements of the mathematical simulation verification platform, and then compiled, simulated, verified, and corrected.
[0008] After the controller simulation verification is completed, the user requirement simulation C code is used to generate a software requirements document according to a preset format.
[0009] Furthermore, the encapsulation of the sensor interface, actuator interface, normalization algorithm, and custom algorithm includes:
[0010] Read the input file and extract information;
[0011] Based on the extracted information, a neutral description file for the algorithm is generated;
[0012] Based on the extracted information, an icon for the algorithm is generated and will be displayed as the icon for the algorithm tree.
[0013] Furthermore, the input file is read and information is extracted, specifically including:
[0014] Code scanning: Using the syntax analysis tool Antlr, lexical and syntactic analysis is performed on the code text in memory to generate an abstract syntax tree. The code text is then parsed by traversing the abstract syntax tree to obtain code information.
[0015] Comment scanning: Scanning comments of a specific format to obtain scanning information; the scanning information includes class information, file information, namespace information, variable information, function information, inheritance relationships, and function call relationships;
[0016] Information integration: Use line number information to bind code scanning and comment scanning information.
[0017] Furthermore, the preset format includes: replacing user-specified C language variables that need to be replaced with mathematical symbols, and replacing mathematical functions existing in the rule table with mathematical calculations expressed by mathematical symbols.
[0018] Furthermore, state flow diagrams and program flow diagrams are constructed, controller design is performed, and C code for user-required simulation is edited, specifically including:
[0019] Step 1: Classify the graphical elements used to construct user requirements and define the operational behavior of each graphical element, including state graphical elements and program flow graph graphical elements; state flow graph graphical elements include nestable state graphical elements, non-nested state graphical elements, and conditional graphical elements; program flow graph graphical elements include start and end graphical elements, internal algorithm graphical elements, if, switch, for, while, break, continue graphical elements, local variable graphical elements, and code graphical elements;
[0020] Step 2: Use the strategy of dragging and dropping child elements and placing them into the parent element to achieve element nesting within the same view; use the strategy of associating elements with views to achieve element nesting in hierarchical views.
[0021] Step 3: Check the correctness of graphic element information;
[0022] Step 4: During the modeling process, by collecting user actions and primitive information, an algorithmic navigation tree is generated synchronously, displaying the hierarchical information of all primitives. The algorithmic navigation tree is then used to locate the primitive.
[0023] Step 5: Access and display server-side data, and provide tools for downloading and dragging / dropping.
[0024] Furthermore, the user requirement simulation C code is encapsulated into a C++ class, specifically including:
[0025] Step 1: Analyze the controller design output data and controller code to establish a mapping relationship between the two;
[0026] Step 2: Use C++ file stream writing technology to generate the controller code file;
[0027] Step 3: Build the controller VC project using the qmake compilation tool;
[0028] Step 4: Compile the controller VC project using the MSBuild tool to generate a dynamic library for the controller model.
[0029] An automatic user requirement generation system for spacecraft control systems based on C code, comprising:
[0030] The algorithm encapsulation module uses C compilation to encapsulate the sensor interface, execution mechanism interface, normalized algorithm, and custom algorithm, generating the corresponding algorithm package;
[0031] The C code editing module builds state flow diagrams and program flow diagrams based on the algorithm package, and simulates C code to design the controller based on user input requirements, while recording the position of each part of the C code input by the user.
[0032] The class encapsulation module encapsulates the edited user-defined simulation C code into a C++ class that meets the interface requirements of the mathematical simulation verification platform, and performs compilation, simulation, verification, and error correction.
[0033] The requirements generation module generates a software requirements document from the user requirements simulation C code according to a preset format after the controller simulation verification is completed.
[0034] Furthermore, the encapsulation of the sensor interface, actuator interface, normalization algorithm, and custom algorithm includes:
[0035] Read the input file and extract information;
[0036] Based on the extracted information, a neutral description file for the algorithm is generated;
[0037] Based on the extracted information, an icon for the algorithm is generated and will be displayed as the icon for the algorithm tree;
[0038] Read the input file and extract information, specifically including:
[0039] Code scanning: Using the syntax analysis tool Antlr, lexical and syntactic analysis is performed on the code text in memory to generate an abstract syntax tree. The code text is then parsed by traversing the abstract syntax tree to obtain code information.
[0040] Comment scanning: Scanning comments of a specific format to obtain scanning information; the scanning information includes class information, file information, namespace information, variable information, function information, inheritance relationships, and function call relationships;
[0041] Information integration: By utilizing line number information, code scanning and comment scanning information are bound together;
[0042] The user requirement simulation C code includes mode settings, mode conversion, mode conversion conditions, call flow for each mode, writing tools for requirement algorithms, numbering tools for requirement algorithms, and management tools for global variables; the requirement algorithms include normalized algorithms, custom algorithms, and common functions;
[0043] The preset format includes: replacing user-specified C language variables that need to be replaced with mathematical symbols, and replacing mathematical functions existing in the rule table with mathematical calculations expressed by mathematical symbols;
[0044] Constructing state flow diagrams and program flow diagrams, designing the controller, and editing the C code for application software user requirements simulation, specifically including:
[0045] Step 1: Classify the graphical elements required for building the controller and define the operational behavior of each element, including state graphical elements and program flow graph elements; state flow graph elements include nestable state graphical elements, non-nested state graphical elements, and conditional graphical elements; program flow graph elements include start and end graphical elements, internal algorithm graphical elements, if, switch, for, while, break, continue graphical elements, local variable graphical elements, and code graphical elements;
[0046] Step 2: Use the strategy of dragging and dropping child elements and placing them into the parent element to achieve element nesting within the same view; use the strategy of associating elements with views to achieve element nesting in hierarchical views.
[0047] Step 3: Check the correctness of graphic element information;
[0048] Step 4: During the modeling process, by collecting user actions and primitive information, an algorithmic navigation tree is generated synchronously, displaying the hierarchical information of all primitives. The algorithmic navigation tree is then used to locate the primitive.
[0049] Step 5: Access and display server-side data, and provide tools for downloading and dragging / dropping.
[0050] The application software user requirement simulation C code is encapsulated into C++ classes, specifically including:
[0051] Step 1: Analyze the controller design output data and controller code to establish a mapping relationship between the two;
[0052] Step 2: Use C++ file stream writing technology to generate the controller code file;
[0053] Step 3: Build the controller VC project using the qmake compilation tool;
[0054] Step 4: Compile the controller VC project using the MSBuild tool to generate a dynamic library for the controller model.
[0055] A computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the method for automatically generating user requirements for a C-code-based spacecraft control system.
[0056] A C-code-based spacecraft control system user requirement automatic generation device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the C-code-based spacecraft control system user requirement automatic generation method.
[0057] The advantages of this invention compared to the prior art are:
[0058] (1) This invention can encapsulate mature and reliable C code and use it as a standard component for software user requirements;
[0059] (2) For new requirements, the present invention provides graphical modeling technology to construct simulation verification models;
[0060] (3) The present invention automatically generates user requirements after the test is correct, which improves the efficiency of writing user requirements;
[0061] (4) The user requirements generated by this invention have good consistency with the simulation verification code, and the user requirements are easy to read; Attached Figure Description
[0062] Figure 1 Run the framework for the C code scanner;
[0063] Figure 2 Example of a neutral description file for encapsulating an algorithm. Detailed Implementation
[0064] To better understand the above technical solutions, the technical solutions of this application will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of this application and the specific features in the embodiments are detailed descriptions of the technical solutions of this application, rather than limitations on the technical solutions of this application. In the absence of conflict, the embodiments of this application and the technical features in the embodiments can be combined with each other.
[0065] The following description, in conjunction with the accompanying drawings, provides a more detailed explanation of a method for automatically generating user requirements for a spacecraft control system based on C code, as provided in the embodiments of this application. Specific implementation methods may include (e.g.) Figures 1-2 As shown):
[0066] (1) The algorithm is encapsulated using C compilation technology. First, the sensor interface, execution mechanism interface, normalization algorithm, and custom algorithm are encapsulated, and key information (including structure type, global variables, function declaration, function body, etc.) is extracted. Then, the encapsulated algorithm package is submitted to the data management module.
[0067] (2) Establish a server-side data management module and submit the packaged algorithm package to the data management module;
[0068] (3) A component-based graphical modeling technique is used to build state flow diagrams and program flow diagrams for controller design. User-required C code is edited, including tools for mode settings, mode transitions, mode transition conditions, mode call flows, and writing various algorithms (normalized algorithms, custom algorithms, and common functions), as well as tools for numbering algorithms and managing global variables. This facilitates users writing C code for their requirements and records the position of each part of the C code within the software requirement template during user input.
[0069] (4) Controller code generation automatically encapsulates the user-edited software simulation C code into a C++ class that meets the interface requirements of the mathematical simulation verification platform, thereby achieving consistency between the software documentation and the controller simulation verification code.
[0070] (5) Based on the controller design results, automatically generate a software requirements Word document from the C code according to the template format. During the conversion process, replace the C language variables specified by the user with mathematical symbols, and replace the mathematical functions existing in the rule table with mathematical calculations expressed by mathematical symbols.
[0071] The solution provided in this application embodiment specifically includes the following steps:
[0072] (I) Algorithm Encapsulation Methods
[0073] The algorithm encapsulation method is mainly divided into three parts: a C / C++ code scanner reads the input file and extracts information; an XML generator generates a neutral description file of the algorithm based on the extracted information; and an icon generator generates an icon for the algorithm based on the extracted information, which will be displayed as the icon of the algorithm tree.
[0074] Step 1: C / C++ Code Scanner
[0075] a. Code scanning. For example... Figure 1 As shown, the syntax analysis tool Antlr is used to perform lexical and syntactic analysis on the code text in memory to generate an abstract syntax tree (AST tree). The code text is then parsed by traversing the abstract syntax tree to obtain code information (mainly the logical relationships of expressions).
[0076] b. Comment scanning. Using the third-party open-source software Doxygen, comments of a specific format are scanned to obtain scanning information (class information, file information, namespace information, variable information, function information, inheritance relationships, function call relationships, etc.).
[0077] c. Integrate information. Use line number information to bind code scanning and comment scanning information.
[0078] Step 2: XML Generator
[0079] Based on the extraction results from the C / C++ code scanner, a neutral description file (XML) of the algorithm is generated, such as... Figure 2 As shown.
[0080] Step 3: Icon Generator.
[0081] The algorithm's icon file is provided by the data management module. After the algorithm is submitted to the server, the data management module will automatically generate the corresponding icon file based on the algorithm's content.
[0082] (II) Component-based graphical modeling technology for controllers
[0083] The system employs component-based graphical modeling technology to build state flow diagrams and program flow diagrams, and designs controllers. It also includes C code for user requirements, tools for setting modes, mode transitions, mode transition conditions, call flows for each mode, writing tools for each algorithm (normalized algorithm, custom algorithm, common function), numbering tools for each algorithm, and management tools for global variables.
[0084] Step 1: Categorize the graphical elements required for building the controller and define the operational behavior of each element. This mainly includes state graphical elements and program flow graph elements. State flow graph elements are further divided into nestable state graphical elements, non-nested state graphical elements, and conditional graphical elements. Program flow graph elements are mainly divided into start / end graphical elements, internal algorithm graphical elements, if, switch, for, while, break, continue graphical elements, local variable graphical elements, and code graphical elements.
[0085] Step 2: Nesting of elements within the same view is achieved using a strategy of "drag and drop child elements into the parent element". For nesting of elements in hierarchical views, a strategy of associating elements with views is used.
[0086] Step 3: Check the correctness of graphic element information. This mainly involves checking whether the graphic element information itself is correct, and checking whether the information of the graphic element association, including nested graphic elements, nested graphic elements, and connecting lines, is correct.
[0087] Step 4: During the modeling process, by collecting user actions and primitive information, an algorithmic navigation tree is generated synchronously, displaying the hierarchical information of all primitives. Furthermore, users can locate primitives using the algorithmic navigation tree.
[0088] Step 5: Access and display the content of the server-side data management module, and provide tools for downloading and dragging / dropping.
[0089] (III) Controller Simulation Code Generation Method
[0090] The user-edited C code for software simulation is automatically encapsulated into a C++ class that meets the interface requirements of the mathematical simulation verification platform.
[0091] Step 1: Analyze the controller design output data (XML file) and controller code to establish a mapping relationship between the two;
[0092] Step 2: Combine C++ file stream writing technology to automatically generate controller code files;
[0093] Step 3: Build the controller VC project using the qmake compilation tool;
[0094] Step 4: Use the MSBuild tool to automatically compile the controller VC project and generate a dynamic library for the controller model.
[0095] Step 5: Run and test the controller simulation code.
[0096] (iv) Controller simulation code reverse modification software user requirements engineering
[0097] Based on the mapping relationship between the controller design output data (XML file) and the controller code, the simulation code is compared with the project when the code was generated, and the project is modified in reverse.
[0098] (III) and (IV) are iterated in two steps until the correct controller is obtained.
[0099] (v) Automatic generation of software demand reports
[0100] After the controller design is completed, the C code is automatically converted into a software requirements Word document according to the template format. During the conversion process, user-specified C language variables that need to be replaced are replaced with mathematical symbols, and mathematical functions existing in the rule table are replaced with mathematical calculations expressed by mathematical symbols. Based on the Word document template, functions such as generating a cover page, table of contents, setting styles, inserting text and symbols, inserting mathematical formulas, inserting images, and inserting hyperlinks are implemented.
[0101] This application provides a computer-readable storage medium storing computer instructions that, when executed on a computer, cause the computer to perform... Figure 1 The method described.
[0102] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage and optical storage) containing computer-usable program code.
[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0106] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
[0107] The contents not described in detail in this specification are common knowledge to those skilled in the art.
Claims
1. A method for automatically generating user requirements for a spacecraft control system based on C code, characterized in that, include: The sensor interface, actuator interface, normalization algorithm, and custom algorithm are encapsulated using C compilation to generate corresponding algorithm packages; The state flow diagram and program flow diagram are built based on the algorithm package, and the controller is designed by simulating C code according to the user's input requirements. At the same time, the position of each part of the C code input by the user is recorded. The edited user-defined simulation C code is encapsulated into a C++ class that meets the interface requirements of the mathematical simulation verification platform, and then compiled, simulated, verified, and corrected. After the controller simulation verification is completed, the user requirement simulation C code is used to generate a software requirements document according to a preset format; The encapsulation of the sensor interface, actuator interface, normalized algorithm, and custom algorithm includes: Read the input file and extract information; Based on the extracted information, a neutral description file for the algorithm is generated; Based on the extracted information, an icon for the algorithm is generated and will be displayed as the icon for the algorithm tree; The preset format includes: replacing user-specified C language variables that need to be replaced with mathematical symbols, and replacing mathematical functions existing in the rule table with mathematical calculations expressed by mathematical symbols; Constructing state flow diagrams and program flow diagrams, designing the controller, and editing the C code for user-required simulation, specifically including: Step 1: Classify the graphical elements used to construct user requirements and define the operational behavior of each graphical element, including state graphical elements and program flow graph graphical elements; state flow graph graphical elements include nestable state graphical elements, non-nested state graphical elements, and conditional graphical elements; program flow graph graphical elements include start and end graphical elements, internal algorithm graphical elements, if, switch, for, while, break, continue graphical elements, local variable graphical elements, and code graphical elements; Step 2: Use the strategy of dragging and dropping child elements and placing them into the parent element to achieve element nesting within the same view; use the strategy of associating elements with views to achieve element nesting in hierarchical views; Step 3: Check the correctness of graphic element information; Step 4: During the modeling process, by collecting user operations and primitive information, an algorithm navigation tree is generated synchronously to display the hierarchical information of all primitives and to locate the primitives through the algorithm navigation tree; Step 5: Access and display server-side data, and provide tools for downloading and dragging / dropping.
2. The method for automatically generating user requirements for a spacecraft control system based on C code according to claim 1, characterized in that, Read the input file and extract information, specifically including: Code scanning: Using the syntax analysis tool Antlr, lexical and syntactic analysis is performed on the code text in memory to generate an abstract syntax tree. The code text is then parsed by traversing the abstract syntax tree to obtain code information. Comment scanning: Scanning comments of a specific format to obtain scanning information; the scanning information includes class information, file information, namespace information, variable information, function information, inheritance relationships, and function call relationships; Information integration: Use line number information to bind code scanning and comment scanning information.
3. The method for automatically generating user requirements for a spacecraft control system based on C code according to claim 1, characterized in that, The user requirement simulation C code is encapsulated into a C++ class, specifically including: Step 1: Analyze the controller design output data and controller code to establish a mapping relationship between the two; Step 2: Use C++ file stream writing technology to generate the controller code file; Step 3: Build the controller VC project using the qmake compilation tool; Step 4: Compile the controller VC project using the MSBuild tool to generate a dynamic library for the controller model.
4. A C-code-based automatic user requirement generation system for spacecraft control systems, characterized in that, include: The algorithm encapsulation module uses C compilation to encapsulate the sensor interface, execution mechanism interface, normalized algorithm, and custom algorithm, generating the corresponding algorithm package; The C code editing module builds state flow diagrams and program flow diagrams based on the algorithm package, and simulates C code to design the controller based on user input requirements, while recording the position of each part of the C code input by the user. The class encapsulation module encapsulates the edited user-defined simulation C code into a C++ class that meets the interface requirements of the mathematical simulation verification platform, and performs compilation, simulation, verification, and error correction. The requirements generation module generates a software requirements document from the user requirements simulation C code according to a preset format after the controller simulation verification is completed. The encapsulation of the sensor interface, actuator interface, normalized algorithm, and custom algorithm includes: Read the input file and extract information; Based on the extracted information, a neutral description file for the algorithm is generated; Based on the extracted information, an icon for the algorithm is generated and will be displayed as the icon for the algorithm tree; The preset format includes: replacing user-specified C language variables that need to be replaced with mathematical symbols, and replacing mathematical functions existing in the rule table with mathematical calculations expressed by mathematical symbols; Constructing state flow diagrams and program flow diagrams, designing the controller, and editing the C code for user-required simulation, specifically including: Step 1: Classify the graphical elements used to construct user requirements and define the operational behavior of each graphical element, including state graphical elements and program flow graph graphical elements; state flow graph graphical elements include nestable state graphical elements, non-nested state graphical elements, and conditional graphical elements; program flow graph graphical elements include start and end graphical elements, internal algorithm graphical elements, if, switch, for, while, break, continue graphical elements, local variable graphical elements, and code graphical elements; Step 2: Use the strategy of dragging and dropping child elements and placing them into the parent element to achieve element nesting within the same view; use the strategy of associating elements with views to achieve element nesting in hierarchical views; Step 3: Check the correctness of graphic element information; Step 4: During the modeling process, by collecting user operations and primitive information, an algorithm navigation tree is generated synchronously to display the hierarchical information of all primitives and to locate the primitives through the algorithm navigation tree; Step 5: Access and display server-side data, and provide tools for downloading and dragging / dropping.
5. The automatic user requirement generation system for a spacecraft control system based on C code according to claim 4, characterized in that: Read the input file and extract information, specifically including: Code scanning: Using the syntax analysis tool Antlr, lexical and syntactic analysis is performed on the code text in memory to generate an abstract syntax tree. The code text is then parsed by traversing the abstract syntax tree to obtain code information. Comment scanning: Scanning comments of a specific format to obtain scanning information; the scanning information includes class information, file information, namespace information, variable information, function information, inheritance relationships, and function call relationships; Information integration: By utilizing line number information, code scanning and comment scanning information are bound together; The user requirement simulation C code includes mode settings, mode conversion, mode conversion conditions, call flow for each mode, writing tools for requirement algorithms, numbering tools for requirement algorithms, and management tools for global variables; the requirement algorithms include normalized algorithms, custom algorithms, and common functions; The application software user requirement simulation C code is encapsulated into C++ classes, specifically including: Step 1: Analyze the controller design output data and controller code to establish a mapping relationship between the two; Step 2: Use C++ file stream writing technology to generate the controller code file; Step 3: Build the controller VC project using the qmake compilation tool; Step 4: Compile the controller VC project using the MSBuild tool to generate a dynamic library for the controller model.
6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 3.
7. A C-code-based automatic user requirement generation device for spacecraft control systems, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Software architecture development system for aerospace embedded system
CN112416337A
Systems and methods for describing, simulating and optimizing spaceborne systems and missions
US20210110502A1