CN109976306A - A kind of spacecraft telecommand based on Lua script quickly tests verifying system and method - Google Patents

A kind of spacecraft telecommand based on Lua script quickly tests verifying system and method Download PDF

Info

Publication number
CN109976306A
CN109976306A CN201910148037.1A CN201910148037A CN109976306A CN 109976306 A CN109976306 A CN 109976306A CN 201910148037 A CN201910148037 A CN 201910148037A CN 109976306 A CN109976306 A CN 109976306A
Authority
CN
China
Prior art keywords
lua
module
telecommand
lua script
generates
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910148037.1A
Other languages
Chinese (zh)
Other versions
CN109976306B (en
Inventor
高何
宋宏江
王清泉
罗荣蒸
何晓宇
白少华
刘金山
吴昕凯
张田青
田方
武磊
东卫平
郝志雅
张雪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Institute of Spacecraft System Engineering
Original Assignee
Beijing Institute of Spacecraft System Engineering
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Institute of Spacecraft System Engineering filed Critical Beijing Institute of Spacecraft System Engineering
Priority to CN201910148037.1A priority Critical patent/CN109976306B/en
Publication of CN109976306A publication Critical patent/CN109976306A/en
Application granted granted Critical
Publication of CN109976306B publication Critical patent/CN109976306B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B23/00Testing or monitoring of control systems or parts thereof
    • G05B23/02Electric testing or monitoring
    • G05B23/0205Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults
    • G05B23/0218Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults
    • G05B23/0256Electric testing or monitoring by means of a monitoring system capable of detecting and responding to faults characterised by the fault detection method dealing with either existing or incipient faults injecting test signals and analyzing monitored process response, e.g. injecting the test signal while interrupting the normal operation of the monitored system; superimposing the test signal onto a control signal during normal operation of the monitored system
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/24Pc safety
    • G05B2219/24065Real time diagnostics

Abstract

A kind of spacecraft telecommand based on Lua script quickly tests verifying system and method, comprising: telemetry front end module, remote control front-end module, data subscription module, test console and main test handler;Main test handler includes dynamic instruction generation module, telemetering distribution module and remote control distribution module again;Telemetry front end module receives the telemetry intelligence (TELINT) that satellite passes down and is sent into telemetering distribution module, telemetering distribution module by telemetry intelligence (TELINT) from data source code state processing be data engineering state of value, it is sent into data subscription module, dynamic instruction generation module proposes that subscribing to request realizes distribution;Dynamic instruction generation module completes the registration of Lua script function, generates Lua script file according to the design document of input;Test console receives telecommand order, parameter needed for transmitting telecommand generates gives dynamic instruction generation module, explains execution to Lua script file, generates instruction binary code, it is sent to remote control front-end module by being remotely controlled distribution module, is finally sent to satellite.

Description

A kind of spacecraft telecommand based on Lua script quickly tests verifying system and method
Technical field
The present invention relates to a kind of spacecraft telecommands based on Lua script quickly to test verifying system and method, belongs to satellite Automatic test field.
Technical background
Spacecraft integration test is the important link in satellite development process, needs frequently to infuse on spacecraft during test Telecommand, while the correctness for checking that spacecraft movement executes is fed back by telemetering.Currently, all kinds of spacecrafts devise greatly It measures telecommand (i.e. binary code), needs to carry out instruction establishment at integration test scene, mainly instructed including indirect ON/OFF, Star Service instruction, bus command, data injection instruction and the task level instruction sequence being composed of above-metioned instruction etc., for real The movement execution and task manipulation of existing spacecraft.
Currently, most spacecraft integration tests generate scheme using telecommand below:
1) it using the instruction Core Generator independently of spacecraft comprehensive test platform, to complete the production of telecommand, surveys Examination personnel need to the instruction code word first to spacecraft configure, later according to input design file carry out manual command's establishment, The production for fulfiling instruction ahead of schedule before testing is generally required, and signature confirmation is carried out by design side, is uploaded to spacecraft master one by one Test handler software (MTP), and infused on spacecraft.
2) system of instruction is completed using the plug-in dynamic link libraries (so) of the main test handler software (MTP) of spacecraft Making, tester needs to write dynamic link bank code in advance according to the generating algorithm of all kinds of instructions and stringent interface form, it Compiling generates instruction dynamic link library afterwards, then copies instruction dynamic link library to spacecraft main test handler software (MTP) Instruction catalog is restarted the main test handler software (MTP) of spacecraft, and is infused on spacecraft.
The establishment and generation of these above-mentioned telecommand schemes need 2~3 full-time staff to complete, and need it is overall or Subsystem personnel carry out signature review to instruction according to input design document, and the instruction of production does not need to be generated in real time to space flight yet It is infused on device.For the integration test of conventional aerospace device or the satellite of less demanding to upper note timeliness, these schemes can be fine Meet demand.But for following situations, these traditional schemes there is obvious shortcoming or be unable to satisfy quick survey at all Test card demand.
1) spacecraft telecommand instruction number doubles year by year
The increase of fast development and mission requirements recently as satellite technology, satellite platform, load design become to get over Come more complicated, this directly results in satellite remote command quantity and doubles year by year.By taking certain remote sensing series of satellites as an example, five years ago is compared The series of satellites telecommand quantity increases 10 times or more, and especially derivative parameter instruction and task level instruction sequence are even more nothing Method is enumerated.
Telecommand quantity decides the workload that instruction generates, and a large amount of full-time staff are then required supplementation with traditional scheme, Spacecraft parallel test quantity is equally multiplied at present, and the development progress period is obviously shortened, and traditional scheme is unable to satisfy at all Test verifying demand.
2) exist and verify insufficient and manual manufacture fault risk
Telecommand largely has change ginseng derived demand to need as long as traditional scheme parameter has modification that must remake Duplicate manpower and time are spent, often selected characteristic value is enumerated in spacecraft integration test, and test verifying is not filled Point, testing efficiency is extremely low.
Manual operation fault is equally easily introduced in production or checks risk not in place, is appointed with the imaging of certain satellite complexity For mode instruction sequence of being engaged in, each task (instruction sequence) includes up to a hundred all types of change ginseng instructions, is had between instruction stringent Sequential relationship, and partial parameters are related to the change of timing, code word between instruction if change, heavy then cause to set on spacecraft star Standby damage.
3) generation step is cumbersome and is unable to satisfy the satellite for generating infuse instruction in real time
Traditional scheme instruction, which is generated, to be needed again with spacecraft comprehensive test platform onrelevant if instruction generation is wrong Production or modification program compiling generate dynamic link library.Whole process complex steps, interface requirement is stringent, and time is very long, It is unfavorable for the quick response generated to instruction, while the correctness test of dynamic link library is more difficult, is readily incorporated artificial wind Danger, leads to automatic test course actual effect.
The telemetering generally required with spacecraft is infused in spacecraft instruction at present to be associated, and conventional remote controls instruct generation side Formula is needed manually to pre-estimate parameter and is completed the production there are serious hysteresis quality, is awaited orders transmission according to test mode.
Summary of the invention
Technical problem solved by the present invention is overcome the deficiencies in the prior art, proposes a kind of space flight based on Lua script Quickly system and method is verified in test for device remote control, solves the problems, such as that traditional instruction generation scheme is insurmountable, liberation manpower subtracts Few Production Time reduces human error's raising verifying adequacy, simplifies generation step, final to realize the need infused on real-time generate It asks.
The technical solution of the invention is as follows:
A kind of spacecraft telecommand based on Lua script quickly tests verifying system, comprising: before telemetry front end module, remote control End module, data subscription module, test console and main test handler;
Wherein, main test handler includes dynamic instruction generation module, telemetering distribution module and remote control distribution module again; Telemetry front end module receives the telemetry intelligence (TELINT) that passes down of satellite and is sent into telemetering distribution module, and telemetering distribution module is by telemetry intelligence (TELINT) It is data engineering state of value from data source code state processing, is sent into data subscription module, dynamic instruction generation module is as needed Telemetering engineering value propose subscribe to request, pass through data subscription module distribution realize;
Dynamic instruction generation module completes the registration of Lua script function according to the design document of input, generates Lua script text Part;Test console receives externally input telecommand order, and parameter needed for transmitting telecommand generates is raw to dynamic instruction At module, execution is explained to the Lua script file, generates instruction binary code, will be instructed by remote control distribution module Binary code is sent to remote control front-end module, is finally sent to satellite.
Dynamic instruction generation module includes Lua interpreter module and Lua script module;
When needs, which take remote measurement, to be subscribed to, Lua interpreter module telemetering engineering value as needed proposes to subscribe to request;When It needs to be remotely controlled in instruction when infusing, Lua script module generates Lua script file, transmitting remote control according to the design document of input Parameter needed for instruction generates gives Lua interpreter, and Lua interpreter explains execution to the Lua script file, generates instruction two Ary codes.
Parameter needed for the transmitting telecommand generates gives dynamic instruction generation module, carries out to the Lua script file It explains and executes, generate instruction binary code, specifically:
(2.1) needed for dynamic instruction generation module instructs dynamic generation according to spacecraft telecommand, expansion is write to Lua interpreter Function is opened up, for realizing telemetering subscription, binary storage, verification and calculating;
(2.2) main test handler creates an independent process for loading dynamic instruction generation module;
(2.3) dynamic instruction generation module receives the telecommand order of test console transmission, and creation Lua is explained Device extends Lua heap stack capability, loads general extension library, calls the spread function of Lua;
(2.4) the Lua script module in dynamic instruction generation module completes Lua script letter according to the design document of input Number registration, generates Lua script file;
(2.5) Lua script file is loaded into Lua interpreter by dynamic instruction generation module, carries out language to script file Method and morphology inspection;
(2.6) the telecommand command parameter of transmitting is obtained, and passes to Lua interpreter;
(2.7) Lua interpreter executes the Lua script function and executes spread function, and by the execution of Lua script function As a result main test handler is returned to;
(2.8) the Lua interpreter of (2.3) creation is destroyed;
(2.9) (2.3) to (2.8) are repeated to complete to infuse circulation on next instruction.
The implementing result of the Lua script function is to instruct binary code.
A kind of test verification method for quickly being tested the realization of verifying system based on the spacecraft telecommand stated, including telemetering are subscribed to Injecting method in method and telecommand,
Steps are as follows for telemetering method for subscribing:
(a) telemetry front end module receives the telemetry intelligence (TELINT) that passes down of satellite and is sent into telemetering distribution module;
(b) telemetry intelligence (TELINT) is data engineering state of value from data source code state processing by telemetering distribution module, is sent into data Subscribing module;
(c) Lua interpreter module in dynamic instruction generation module telemetering engineering value as needed proposes to subscribe to request, Distributed by data subscription module and is realized.
Steps are as follows for injecting method in telecommand:
(1) according to the design document of input, the registration of Lua script function is completed, Lua script module generates Lua script file;
(2) test console receives externally input telecommand order, and parameter needed for transmitting telecommand generates is to dynamic Lua interpreter in state directive generation module;
(3) Lua interpreter explains execution to the Lua script file, generates the implementing result of Lua script function;
(4) implementing result of Lua script function is sent to by remote control front-end module by remote control distribution module, be finally sent to Satellite.
Parameter needed for the transmitting telecommand generates gives dynamic instruction generation module, carries out to the Lua script file It explains and executes, generate instruction binary code, specifically:
(3.1) needed for dynamic instruction generation module instructs dynamic generation according to spacecraft telecommand, expansion is write to Lua interpreter Function is opened up, for realizing telemetering subscription, binary storage, verification and calculating;
(3.2) main test handler creates an independent process for loading dynamic instruction generation module;
(3.3) dynamic instruction generation module receives the telecommand order of test console transmission, and creation Lua is explained Device extends Lua heap stack capability, loads general extension library, calls the spread function of Lua;
(3.4) the Lua script module in dynamic instruction generation module completes Lua script letter according to the design document of input Number registration, generates Lua script file;
(3.5) Lua script file is loaded into Lua interpreter by dynamic instruction generation module, carries out language to script file Method and morphology inspection;
(3.6) the telecommand command parameter of transmitting is obtained, and passes to Lua interpreter;
(3.7) Lua interpreter executes the Lua script function and executes spread function, and by the execution of Lua script function As a result main test handler is returned to;
(3.8) the Lua interpreter of (3.3) creation is destroyed;
(3.9) (3.3) to (3.8) are repeated to complete to infuse circulation on next instruction.
The implementing result of the Lua script function is to instruct binary code.
The advantages of the present invention over the prior art are that:
(1) present invention realizes instruction code word and logic control by scripting language, and instruction generation is integrated with upper note, upper Order parameter is inserted when note, it is no longer necessary to production instruction in advance.The generation and verification of instruction are completed by script, and are committed to automatically The main test handler software (MTP) of spacecraft realizes the in-time generatin of spacecraft telecommand instruction.Scripting language has abundant simultaneously Function interface can will not change by verifying with satellite telemetry real time correlation, code word and logical correctness, eliminate artificial system Make and the time of review, is greatly improved spacecraft-testing efficiency, the safety that effective guarantee telecommand executes.
(2) present invention solves the problems, such as that instruction generation encounters according to scripting language feature, realizes at the main test of spacecraft Interactively communicating between reason machine software (MTP) and Lua script.Spacecraft telecommand instruction is registered as into Lua function, needs to infuse and navigate When its device, telecommand parameter is sent by application layer softwares such as test consoles, by the Lua interpreter of MTP by scripting language The functional language that being converted to can parse completes the real-time upper note of generation, verification and progress of instruction code word.
(3) the method for the present invention compared with prior art, considerably reduces spacecraft integration test manpower and time cost, It has changed spacecraft telecommand instruction and has generated and test Validation Mode.Tester is not required to that instruction is made and checked in advance, The registration for only needing to complete telecommand Lua function, injects the relevant parameter needed for instruction generates by tester when test It completes telecommand and passes ginseng-generation-upload-storage-above a series of actions such as note.
(4) compared with prior art, the instruction code word and logical construction of telecommand are by scripting language control for the method for the present invention System, can be obtained safety guarantee by checking proving correctness for the first time, avoids artificial repetition and makes or check not in place Deng wind Danger.
(5) the method for the present invention compared with prior art, greatly simplifies instruction and generates and upper note step, remote control in-time generatin reality Telecommand sending step is reduced to a step by four steps (generate instruction, manual review, upload MTP, send and broadcast TV programs by satellite) by Shi Xinggao (generate and broadcast TV programs by satellite) improves instruction and generates note testing efficiency 75%.
(6) the method for the present invention compared with prior art, realizes scripting language and the main test handler software of spacecraft (MTP) interactively communicate, the core due to MTP as spacecraft comprehensive test platform, the telemetry intelligence (TELINT) of spacecraft Stream is also distributed by it.
Method provided by the invention can obtain real satellite telemetering (such as satellite when being remotely controlled instruction production in real time Time, track profile etc.), and function interface is provided, it is generated as instruction input parameter, greatly improved what instruction generated Timeliness, so that test parameter is more true and reliable.
Detailed description of the invention
Fig. 1 is that the instruction of traditional scheme spacecraft telecommand generates and test Validation Mode figure;
Fig. 2 is spacecraft telecommand of the present invention instruction generation and fast verification pattern diagram;
Fig. 3 is that the present invention explains that execution generates instruction binary code process to Lua script file;
Fig. 4 is that the present invention is based on the instructions of the spacecraft telecommand of Lua script to quickly generate and verify process.
Specific embodiment
The instruction of traditional scheme spacecraft telecommand is generated and is tested shown in Validation Mode Fig. 1, and it is as follows to implement verification step:
1) design document is inputted according to spacecraft before test, completes the configuration of telecommand Core Generator, including each finger Unit code word is enabled, it is the variable derivative parameter enumeration type that includes in instruction, formula translation type (individually carrying out written in code), dynamic The configuration of state chained library;
2) according to test item and test mode, special messenger is notified to complete the generation of telecommand, every finger by each subsystem The derivative parameter including including in timing intervals+instruction between N number of command unit+command unit is enabled, when by being accomplished manually complexity The editing operation of sequence logical relation;
3) since manual manufacture bring uncertainty is higher, it is therefore desirable to be equipped with special messenger and answer instruction production situation Core, and signed one by one confirmation by design of satellites personnel etc.;
4) checked and signed confirm it is errorless after, instruction binary code be manually uploaded to main test handler (MTP) waiting Upper note;
5) when test item needs to infuse certain instruction on spacecraft, passed through by application layer softwares such as test consoles Coded instructions call command adapted thereto code word to MTP, and binary code stream is sent on remote control front end and infuses to spacecraft by MTP.
Spacecraft telecommand proposed by the present invention based on Lua script quickly tests verification method, applies following script language Speech feature:
1) scripting language be in order to shorten it is traditional write-compile-link-operational process and the computer that creates is compiled Cheng Yuyan.Lua is that wherein foremost scripting language, purpose of design are in order to be embedded in application program, almost in all operations It can compile, run in system and platform.Since Lua is the language designed based on Associate array and expansible syntactic structure, With variable without type, dynamic definition type, object-oriented structure, compiling generate intermediate code and memory recycle automatically etc. it is special Point, so being often embedded in other main systems as a kind of script.
2) Lua script module is independently worked at the same time as an independent thread with main program and other threads. Lua script module is located inside the process of main program, can easily access variable and function inside main program.Lua script language Speech provides and the interworkng interface and function of the main program based on C, facilitates the debugging of system.
3) main program can directly use code by the api function that Lua is provided, and reduce the size of code of programming.Dynamically Scripting language Lua module is a subset of main program, is established on the associated component that main program C language is write, and is utilized Itself capacity is small to be connected the relevant functional module of main program and be grouped together with the characteristic being easily understood.
4) Lua shell script can create interface well, and definition data structure codes and decodes every signaling.Due to Lua Itself it is a kind of explanatory language, therefore, there is no need to compilation time, substantially reduce the program language of dynamic link library mode The time write, compile, link and run, allow user run when write application program, in this way, main program becomes cleverer It is living and practical.
The present invention solves the problems, such as that instruction generates according to above-mentioned scripting language feature and encounters, and realizes at the main test of spacecraft Interactively communicating between reason machine software (MTP) and Lua script.Spacecraft telecommand instruction is registered as into Lua function, needs to infuse and navigate When its device, telecommand parameter is sent by application layer softwares such as test consoles, by the Lua interpreter of MTP by scripting language The functional language that being converted to can parse completes the real-time upper note of generation, verification and progress of instruction code word.
It is used to describe the model and generating algorithm of all kinds of instructions using dynamic script language Lua, shields each model instruction life At the diversity of interface protocol and data format, realize a kind of telecommand towards spacecraft integration test quickly generate and Test verification method.
It is generated the present invention is based on the instruction of the spacecraft telecommand of Lua script and fast verification system is as shown in Figure 2.
The verifying system include: telemetry front end module, remote control front-end module, data subscription module, test console and Main test handler;
Wherein, main test handler includes dynamic instruction generation module, telemetering distribution module and remote control distribution module again; Dynamic instruction generation module includes Lua interpreter module and Lua script module;Telemetry front end module reception satellite passes down distant Measurement information is simultaneously sent into telemetering distribution module, telemetering distribution module by telemetry intelligence (TELINT) from data source code state processing be data engineering State of value, is sent into data subscription module, and dynamic instruction generation module telemetering engineering value as needed proposes to subscribe to request, pass through The distribution of data subscription module is realized;
Dynamic instruction generation module completes the registration of Lua script function according to the design document of input, generates Lua script text Part;Test console receives externally input telecommand order, and parameter needed for transmitting telecommand generates is raw to dynamic instruction At module, execution is explained to the Lua script file, generates instruction binary code, will be instructed by remote control distribution module Binary code is sent to remote control front-end module, is finally sent to satellite.
When needs, which take remote measurement, to be subscribed to, Lua interpreter module telemetering engineering value as needed proposes to subscribe to request;When It needs to be remotely controlled in instruction when infusing, Lua script module generates Lua script file, transmitting remote control according to the design document of input Parameter needed for instruction generates gives Lua interpreter, and Lua interpreter explains execution to the Lua script file, generates instruction two Ary codes.
As shown in figure 3, Lua interpreter explains execution to Lua script file, instruction binary code is generated, including such as Lower step:
(1) needed for dynamic instruction generation module instructs dynamic generation according to spacecraft telecommand, extension is write to Lua interpreter Function, for realizing telemetering subscription, binary storage, verification and calculating;
(2) main test handler creates an independent process for loading dynamic instruction generation module;
(3) dynamic instruction generation module receives the telecommand order of test console transmission, creates Lua interpreter, Lua heap stack capability is extended, general extension library is loaded, calls the spread function of Lua;
(4) the Lua script module in dynamic instruction generation module completes Lua script function according to the design document of input Registration generates Lua script file;
(5) Lua script file is loaded into Lua interpreter by dynamic instruction generation module, carries out grammer to script file With morphology inspection;
(6) the telecommand command parameter of transmitting is obtained, and passes to Lua interpreter;
(7) Lua interpreter executes the Lua script function and executes spread function, and by the execution knot of Lua script function Fruit returns to main test handler;The implementing result of Lua script function is to instruct binary code;
(8) the Lua interpreter of (3) creation is destroyed;
(9) (3) to (8) are repeated to complete to infuse circulation on next instruction.
Further, the present invention is based on above-mentioned verifying system, a kind of verification method is also achieved, as shown in figure 4, the verifying Method includes injecting method in telemetering method for subscribing and telecommand;
Steps are as follows for telemetering method for subscribing:
(a) telemetry front end module receives the telemetry intelligence (TELINT) that passes down of satellite and is sent into telemetering distribution module;
(b) telemetry intelligence (TELINT) is data engineering state of value from data source code state processing by telemetering distribution module, is sent into data Subscribing module;
(c) Lua interpreter module in dynamic instruction generation module telemetering engineering value as needed proposes to subscribe to request, Distributed by data subscription module and is realized.
Steps are as follows for injecting method in telecommand:
(1) according to the design document of input, the registration of Lua script function is completed, Lua script module generates Lua script file;
(2) test console receives externally input telecommand order, and parameter needed for transmitting telecommand generates is to dynamic Lua interpreter in state directive generation module;
(3) Lua interpreter explains execution to the Lua script file, generates the implementing result of Lua script function;
(3.1) needed for dynamic instruction generation module instructs dynamic generation according to spacecraft telecommand, expansion is write to Lua interpreter Function is opened up, for realizing telemetering subscription, binary storage, verification and calculating;
(3.2) main test handler creates an independent process for loading dynamic instruction generation module;
(3.3) dynamic instruction generation module receives the telecommand order of test console transmission, and creation Lua is explained Device extends Lua heap stack capability, loads general extension library, calls the spread function of Lua;
(3.4) the Lua script module in dynamic instruction generation module completes Lua script letter according to the design document of input Number registration, generates Lua script file;
(3.5) Lua script file is loaded into Lua interpreter by dynamic instruction generation module, carries out language to script file Method and morphology inspection;
(3.6) the telecommand command parameter of transmitting is obtained, and passes to Lua interpreter;
(3.7) Lua interpreter executes the Lua script function and executes spread function, and by the execution of Lua script function As a result main test handler is returned to;
(3.8) the Lua interpreter of (3.3) creation is destroyed;
(3.9) (3.3) to (3.8) are repeated to complete to infuse circulation on next instruction.
(4) implementing result of Lua script function is sent to by remote control front-end module by remote control distribution module, be finally sent to Satellite.
It is noted that three steps of telemetering method for subscribing independently execute, i.e., executing all the time, etc. It is to be distributed, once there is subscription request to occur, then execute distribution.
It is as follows that the present invention provides embodiment:
It is generated the present invention is based on the instruction of the spacecraft telecommand of Lua script and fast verification mode method is as shown in Figure 2, it is only necessary to 1 part-time staff can be completed, and steps are as follows for real-time verification:
1) design document is inputted according to spacecraft before test, completes the registration based on Lua function, each Lua function is corresponding One instruction or instruction sequence (collection) include command unit code word, can be changed sequential logic between derivative parameter processing function, instruction and close The configuration of Call Condition logical relation between system, instruction is completed by artificial establishment scripting language;
2) when test item needs to infuse certain instruction on spacecraft, instruction generation, each subsystem are carried out without special messenger Tester inputs telecommand variable element by application layer softwares such as test consoles and (instructs derivative parameter, command logic Condition etc.), coded instructions (i.e. Lua function name) and relevant parameter are sent to MTP.It is distant by the spacecraft based on Lua script Control instruction rapid generation, is automatically performed the generation, upload, storage of instruction, specific embodiment is as follows:
Step 1: it is realized and is navigated with C language in the dynamic instruction generation module of the main test handler software (MTP) of spacecraft Spread function used in its device telecommand dynamic generation, determine according to actual needs, quantity is indefinite for spread function here.This Four spread functions for realizing telemetering subscription, binary storage, verification and calculating are provided in embodiment.Including 1) Getparamhex is the function for obtaining MTP real-time parameter, which realizes in MTP, is called for lua, there are two which contains Parameter, first parameter are DATE.A001, and second parameter is the formatted form of parameter, such as %08x;2)Savefile It is to store data to the fixation relative directory of MTP, first parameter is the data to be stored, and second parameter is to store File full path diameter;3) Crccompute is the crc verification of calculating character string, and parameter is to calculate the character string of verification sum, is returned Returning value is that calculative character string adds check code;4) Isocompute is the iso verification of calculating character string, and parameter is to count The character string of verification sum is calculated, return value is that calculative character string adds check code;
Step 2: it is distant for completing spacecraft that the main test handler software (MTP) of spacecraft creates an independent process Control instruction quickly generates task, and dynamic instruction generation module is loaded when the process initiation;
Step 3: after the telecommand that the main test handler software (MTP) of spacecraft receives user's transmission generates order, It parses the command, the luaL_newstate interface function for then calling Lua language to provide in the task of step 2 creation Lua interpreter is created, calls the heap stack capability of lua_checkstack Interface Expanding lua, then for receiving the instruction of user Parameter calls luaL_openlibs interface to load lua general extension library, finally in four times (consistent with the quantity of spread function) The spread function for the lua interpreter registration MTP for calling lua_register interface to create to step 2;
Step 4: including various operation C letters according to Lua grammer and using what is extended in lua interpreter in step 3 The generation logic for the dynamic instruction that spacecraft automatic test needs is programmed into Lua script by several Lua orders, is saved as Klu.lua file, is placed under the config directory of MTP;
Step 5: call luaL_loadfile interface that Lua script file is loaded into the Lua interpreter of step 3 creation In, call lua_pcall to carry out grammer and morphology inspection to lua script file;
Step 6: the parameter that the instruction that user sends generates order, the rule name generated including instruction and parameter are obtained Numerical value, and pass to the Lua interpreter of step 3 creation;
Step 7: it calls lua_pcall to carry out dynamic generation to instruction, and script is obtained by lua_tostring and is generated Instruction character string, character string be then converted into binary data return to the main test handler software (MTP) of spacecraft sentencing Break and handle, indicate to instruct generation script logic wrong when returning the result is 0, processing of not broadcasting TV programs by satellite, other numerical value are then direct It broadcasts TV programs by satellite;
Step 8: the Lua interpreter of step 3 creation is destroyed;
Step 9: step 3 is repeated to step 9.
3) after through the above steps, the correct telecommand of script logic is automatically generated two by main test handler (MTP) System code stream is sent to note on remote control front end, and, to spacecraft, that realizes spacecraft telecommand instruction quickly generates and tests verifying.
The method of the present invention compared with prior art, considerably reduces spacecraft integration test manpower and time cost, becomes It has removed from office spacecraft telecommand instruction and has generated and test Validation Mode.Tester is not required to that instruction is made and checked in advance, only It need to complete the registration of telecommand Lua function, the relevant parameter needed for instruction generates is injected by tester when test, it can be complete Ginseng-generation-upload-storage-above a series of actions such as note are passed at telecommand.This method is widely used to remote sensing, depth at present Empty and navigation field spacecraft integration test eliminates telecommand production full-time staff, with remote sensing satellite complicated order sequence For column production, traditional scheme needs 2 people/January, and using the present invention, only Lua function registration is can be completed in 1 people/1 day, is testing When generated in real time according to test mode.
In addition compared with prior art, the instruction code word and logical construction of telecommand are by scripting language control for the method for the present invention System, can be obtained safety guarantee by checking proving correctness for the first time, avoids artificial repetition and makes or check not in place Deng wind Danger.For during the test of certain remote sensing satellite mode comprising nearly 30 instruction sequencing templates need to derive production more than 300 and refer to Sequence is enabled, the logics such as instruction sequencing template main and standby relation are merged into similar terms using this method, are only abstracted as 4 Lua function feet This, reduces 98% or more for instruction number.Solve the problems, such as that fork instruction generation flexibility is poor, spreadability is insufficient, pole The improving satellite greatly of the task is easily handling.
The content that description in the present invention is not described in detail belongs to the well-known technique of those skilled in the art.

Claims (8)

1. a kind of spacecraft telecommand based on Lua script quickly tests verifying system, characterized by comprising: telemetry front end mould Block, remote control front-end module, data subscription module, test console and main test handler;
Wherein, main test handler includes dynamic instruction generation module, telemetering distribution module and remote control distribution module again;Telemetering Front-end module receives the telemetry intelligence (TELINT) that passes down of satellite and is sent into telemetering distribution module, and telemetering distribution module is by telemetry intelligence (TELINT) from number It is data engineering state of value according to source code state processing, is sent into data subscription module, as needed distant of dynamic instruction generation module It surveys engineering value to propose to subscribe to request, is distributed by data subscription module and realized;
Dynamic instruction generation module completes the registration of Lua script function, generates Lua script file according to the design document of input;It surveys It tries console and receives externally input telecommand order, parameter needed for transmitting telecommand generates generates mould to dynamic instruction Block explains execution to the Lua script file, generates instruction binary code, by remote control distribution module will instruct two into Code processed is sent to remote control front-end module, is finally sent to satellite.
2. a kind of spacecraft telecommand based on Lua script according to claim 1 quickly tests verifying system, feature exists In: dynamic instruction generation module includes Lua interpreter module and Lua script module;
When needs, which take remote measurement, to be subscribed to, Lua interpreter module telemetering engineering value as needed proposes to subscribe to request;Work as needs It is remotely controlled in instruction when infusing, Lua script module generates Lua script file according to the design document of input, transmits telecommand Parameter needed for generating gives Lua interpreter, and Lua interpreter explains execution to the Lua script file, generates instruction binary system Code.
3. a kind of spacecraft telecommand based on Lua script according to claim 1 quickly tests verifying system, feature exists In: parameter needed for the transmitting telecommand generates gives dynamic instruction generation module, explains and holds to the Lua script file Row generates instruction binary code, specifically:
(2.1) needed for dynamic instruction generation module instructs dynamic generation according to spacecraft telecommand, extension letter is write to Lua interpreter Number, for realizing telemetering subscription, binary storage, verification and calculating;
(2.2) main test handler creates an independent process for loading dynamic instruction generation module;
(2.3) dynamic instruction generation module receives the telecommand order of test console transmission, creates Lua interpreter, expands Lua heap stack capability is opened up, general extension library is loaded, calls the spread function of Lua;
(2.4) the Lua script module in dynamic instruction generation module completes Lua script function note according to the design document of input Volume generates Lua script file;
(2.5) Lua script file is loaded into Lua interpreter by dynamic instruction generation module, to script file carry out grammer and Morphology inspection;
(2.6) the telecommand command parameter of transmitting is obtained, and passes to Lua interpreter;
(2.7) Lua interpreter executes the Lua script function and executes spread function, and by the implementing result of Lua script function Return to main test handler;
(2.8) the Lua interpreter of (2.3) creation is destroyed;
(2.9) (2.3) to (2.8) are repeated to complete to infuse circulation on next instruction.
4. a kind of spacecraft telecommand based on Lua script according to claim 3 quickly tests verifying system, feature exists In: the implementing result of the Lua script function is to instruct binary code.
5. a kind of test for quickly testing the realization of verifying system based on spacecraft telecommand according to any one of claims 1 to 4 Verification method, it is characterised in that including injecting method in telemetering method for subscribing and telecommand,
Steps are as follows for telemetering method for subscribing:
(a) telemetry front end module receives the telemetry intelligence (TELINT) that passes down of satellite and is sent into telemetering distribution module;
(b) telemetry intelligence (TELINT) is data engineering state of value from data source code state processing by telemetering distribution module, is sent into data subscription Module;
(c) Lua interpreter module in dynamic instruction generation module telemetering engineering value as needed proposes to subscribe to request, pass through The distribution of data subscription module is realized.
6. test verification method according to claim 5, it is characterised in that: steps are as follows for injecting method in telecommand:
(1) according to the design document of input, the registration of Lua script function is completed, Lua script module generates Lua script file;
(2) test console receives externally input telecommand order, and parameter needed for transmitting telecommand generates is to dynamically referring to Enable the Lua interpreter in generation module;
(3) Lua interpreter explains execution to the Lua script file, generates the implementing result of Lua script function;
(4) implementing result of Lua script function is sent to by remote control front-end module by remote control distribution module, is finally sent to and defends Star.
7. test verification method according to claim 6, it is characterised in that: parameter needed for the transmitting telecommand generates Dynamic instruction generation module is given, execution is explained to the Lua script file, generates instruction binary code, specifically:
(3.1) needed for dynamic instruction generation module instructs dynamic generation according to spacecraft telecommand, extension letter is write to Lua interpreter Number, for realizing telemetering subscription, binary storage, verification and calculating;
(3.2) main test handler creates an independent process for loading dynamic instruction generation module;
(3.3) dynamic instruction generation module receives the telecommand order of test console transmission, creates Lua interpreter, expands Lua heap stack capability is opened up, general extension library is loaded, calls the spread function of Lua;
(3.4) the Lua script module in dynamic instruction generation module completes Lua script function note according to the design document of input Volume generates Lua script file;
(3.5) Lua script file is loaded into Lua interpreter by dynamic instruction generation module, to script file carry out grammer and Morphology inspection;
(3.6) the telecommand command parameter of transmitting is obtained, and passes to Lua interpreter;
(3.7) Lua interpreter executes the Lua script function and executes spread function, and by the implementing result of Lua script function Return to main test handler;
(3.8) the Lua interpreter of (3.3) creation is destroyed;
(3.9) (3.3) to (3.8) are repeated to complete to infuse circulation on next instruction.
8. test verification method according to claim 6 or 7, it is characterised in that: the implementing result of the Lua script function As instruct binary code.
CN201910148037.1A 2019-02-28 2019-02-28 Spacecraft remote control rapid test verification system and method based on Lua script Active CN109976306B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910148037.1A CN109976306B (en) 2019-02-28 2019-02-28 Spacecraft remote control rapid test verification system and method based on Lua script

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910148037.1A CN109976306B (en) 2019-02-28 2019-02-28 Spacecraft remote control rapid test verification system and method based on Lua script

Publications (2)

Publication Number Publication Date
CN109976306A true CN109976306A (en) 2019-07-05
CN109976306B CN109976306B (en) 2020-09-18

Family

ID=67077504

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910148037.1A Active CN109976306B (en) 2019-02-28 2019-02-28 Spacecraft remote control rapid test verification system and method based on Lua script

Country Status (1)

Country Link
CN (1) CN109976306B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111639413A (en) * 2020-04-17 2020-09-08 上海蔚星科技有限公司 Satellite automatic test system and method
CN111782513A (en) * 2020-06-23 2020-10-16 西北工业大学 Satellite ground universal automatic test method based on DLL
CN111858780A (en) * 2020-06-28 2020-10-30 深圳航天东方红海特卫星有限公司 Satellite flight control system and method based on database management system
CN112363906A (en) * 2020-01-04 2021-02-12 成都华微电子科技有限公司 Test data processing device and method
CN112650198A (en) * 2020-12-21 2021-04-13 中国人民解放军63920部队 Multi-spacecraft injection plan automatic generation and control method and device
CN112732358A (en) * 2021-01-13 2021-04-30 中国人民解放军32039部队 Method and device for compiling spacecraft control script
CN113220664A (en) * 2021-05-10 2021-08-06 上海卫星工程研究所 Satellite telemetering intelligent interpretation system and method for quickly generating Lua script rule
CN114510269A (en) * 2021-12-29 2022-05-17 北京空间飞行器总体设计部 Remote control instruction generation method and device based on multi-satellite combined test
CN116737281A (en) * 2023-01-12 2023-09-12 银河航天(北京)通信技术有限公司 File uploading method, device and storage medium
CN117081658A (en) * 2023-09-27 2023-11-17 中国人民解放军32039部队 Automatic generation method and device for remote control operation script of communication satellite payload
CN117081658B (en) * 2023-09-27 2024-05-17 中国人民解放军32039部队 Automatic generation method and device for remote control operation script of communication satellite payload

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1357981A (en) * 2000-12-04 2002-07-10 深圳黎明电脑网络有限公司 Method of testing several kinds of application protocol
CN104021080A (en) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 Automatic testing system based on custom scripts
CN104155130A (en) * 2014-07-21 2014-11-19 航天东方红卫星有限公司 Comprehensive test intelligent interpretation system for small satellite
CN104331035A (en) * 2014-09-30 2015-02-04 航天东方红卫星有限公司 Mini-satellite test remote measurement and remote control monitoring system based on service-oriented architecture and method thereof
US9471344B1 (en) * 2012-03-27 2016-10-18 Marvell International Ltd. Hardware support for processing virtual machine instructions

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1357981A (en) * 2000-12-04 2002-07-10 深圳黎明电脑网络有限公司 Method of testing several kinds of application protocol
US9471344B1 (en) * 2012-03-27 2016-10-18 Marvell International Ltd. Hardware support for processing virtual machine instructions
CN104021080A (en) * 2014-06-13 2014-09-03 中国民航信息网络股份有限公司 Automatic testing system based on custom scripts
CN104155130A (en) * 2014-07-21 2014-11-19 航天东方红卫星有限公司 Comprehensive test intelligent interpretation system for small satellite
CN104331035A (en) * 2014-09-30 2015-02-04 航天东方红卫星有限公司 Mini-satellite test remote measurement and remote control monitoring system based on service-oriented architecture and method thereof

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112363906A (en) * 2020-01-04 2021-02-12 成都华微电子科技有限公司 Test data processing device and method
CN112363906B (en) * 2020-01-04 2023-04-28 成都华微电子科技股份有限公司 Test data processing device and method
CN111639413A (en) * 2020-04-17 2020-09-08 上海蔚星科技有限公司 Satellite automatic test system and method
CN111639413B (en) * 2020-04-17 2023-03-21 上海蔚星科技有限公司 Satellite automatic test system and method
CN111782513B (en) * 2020-06-23 2022-12-02 西北工业大学 Satellite ground universal automatic test method based on DLL
CN111782513A (en) * 2020-06-23 2020-10-16 西北工业大学 Satellite ground universal automatic test method based on DLL
CN111858780A (en) * 2020-06-28 2020-10-30 深圳航天东方红海特卫星有限公司 Satellite flight control system and method based on database management system
CN111858780B (en) * 2020-06-28 2024-04-09 深圳航天东方红海特卫星有限公司 Satellite flight control system and method based on database management system
CN112650198A (en) * 2020-12-21 2021-04-13 中国人民解放军63920部队 Multi-spacecraft injection plan automatic generation and control method and device
CN112732358B (en) * 2021-01-13 2021-10-15 中国人民解放军32039部队 Method and device for compiling spacecraft control script
CN112732358A (en) * 2021-01-13 2021-04-30 中国人民解放军32039部队 Method and device for compiling spacecraft control script
CN113220664B (en) * 2021-05-10 2023-01-24 上海卫星工程研究所 Satellite telemetering intelligent interpretation system and method for rapidly generating Lua script rule
CN113220664A (en) * 2021-05-10 2021-08-06 上海卫星工程研究所 Satellite telemetering intelligent interpretation system and method for quickly generating Lua script rule
CN114510269A (en) * 2021-12-29 2022-05-17 北京空间飞行器总体设计部 Remote control instruction generation method and device based on multi-satellite combined test
CN114510269B (en) * 2021-12-29 2023-08-11 北京空间飞行器总体设计部 Remote control instruction generation method and device based on multi-star joint test
CN116737281A (en) * 2023-01-12 2023-09-12 银河航天(北京)通信技术有限公司 File uploading method, device and storage medium
CN116737281B (en) * 2023-01-12 2024-01-09 银河航天(北京)通信技术有限公司 File uploading method, device and storage medium
CN117081658A (en) * 2023-09-27 2023-11-17 中国人民解放军32039部队 Automatic generation method and device for remote control operation script of communication satellite payload
CN117081658B (en) * 2023-09-27 2024-05-17 中国人民解放军32039部队 Automatic generation method and device for remote control operation script of communication satellite payload

Also Published As

Publication number Publication date
CN109976306B (en) 2020-09-18

Similar Documents

Publication Publication Date Title
CN109976306A (en) A kind of spacecraft telecommand based on Lua script quickly tests verifying system and method
CN101571802B (en) Visualization automatic generation method of embedded software test data and system thereof
CN107273117B (en) Programming-friendly agile code automatic generation system
CN106502723A (en) For realizing the device and method of FPGA programs dynamic update and bootstrap loading
CN107562038B (en) Automatic test system for vehicle-mounted controller
US7895575B2 (en) Apparatus and method for generating test driver
CN104915287B (en) Unit test method and system
CN106951368A (en) Automatic example generation method based on UML timing diagrams
CN111782513B (en) Satellite ground universal automatic test method based on DLL
CN112532299B (en) Satellite test automatic execution system based on module splicing
CN112270149A (en) Verification platform automation integration method and system, electronic equipment and storage medium
US9690888B2 (en) Method and apparatus for system design verification
CN109933521A (en) Automated testing method, device, computer equipment and storage medium based on BDD
CN102486749B (en) Method and system for data driving test
CN106325860A (en) Automatic maintenance method for aerospace embedded software interface data
CN113364515B (en) Satellite remote control method, device, equipment and storage medium based on Xstate
CN109885817A (en) The generation method and system of instruction are infused in a kind of spacecraft payload
CN109298702A (en) ECU automatic test approach and system
Lowry et al. Verification and validation of AI systems that control deep-space spacecraft
CN109144849A (en) A kind of embedded software adjusting, measuring method
CN114647568A (en) Automatic testing method and device, electronic equipment and readable storage medium
Madani et al. Synchronous testing of multimodal systems: An operational profile-based approach
CN117434556A (en) Autonomous task management function closed loop test system
Heinen et al. Simple vs. Complex OBCP: Experience and Solutions for managing On-Board Control Procedures
Siebra et al. The anticipated test design and its use in legacy code refactoring: lessons learned from a real experiment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant