Operating lever analog input method and device

Through timer and event status processing, the keyboard key state to pitch and roll value is realized, solving the problem of high cost and poor portability in human-in-cycle simulation system, and providing a smooth, portable and cross-platform Supported aircraft motion control methods.

CN119024720AActive Publication Date: 2024-11-26BEIJING FANGZHOU TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411129045.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-11-26
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

In the prior art, HOTAS poles have problems such as expensive procurement, inconvenient portability and poor cross-platform compatibility in human-in-cycle simulation systems, and are unnecessary during the program debugging stage, making it difficult to achieve smooth control of the aircraft motion platform through keyboard replacement.

Method used

Through a joystick simulation input method, the keyboard key state is processed using a collection of timers and event states, and the continuously changing pitch and roll values ​​are calculated to achieve smooth control of the aircraft motion platform. The method includes starting a timer, obtaining event status, processing the calculated value and range value, calculating pitch and roll values ​​until a stop signal is received.

Benefits of technology

It realizes smooth control of the aircraft motion platform using a keyboard, reduces costs, improves portability and cross-platform support, and replaces the HOTAS pole to control the aircraft motion platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119024720A_ABST
    Figure CN119024720A_ABST
Patent Text Reader

Abstract

The invention discloses a joystick analog input method and device, and the method comprises the steps: S1, starting a preset timer in response to a starting signal inputted by a user, and initializing a first calculation value and a second calculation value; s2, judging the current time of the timer; s3, acquiring an event state set; s4, processing the event state set, the first calculation value and the second calculation value to obtain a first range value, a second range value, an updated first calculation value and an updated second calculation value; s5, processing the first range value, the second range value, the updated first calculation value and the updated second calculation value to obtain a pitching value and a rolling value; s6, repeating the steps S2 to S5 until a stop signal input by the user is received; and stopping the timer. The method can replace a HOTAS rod to realize smooth control of an aircraft motion platform, and is simple in calculation, low in cost, convenient to carry and good in cross-platform support.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of flight simulation, and in particular relates to a joystick simulation input method and device. Background Art

[0002] When developing a human-in-the-loop flight simulation system, a HOTAS (Hands On Throttle-And-Stick) stick is generally used as a control input device for the aircraft motion platform to control the pitch and roll attitude of the aircraft platform. However, the use of professional HOTAS sticks has problems such as high purchase price, inconvenience in carrying, and poor cross-platform compatibility of HOTAS stick drivers. In addition, HOTAS sticks are often not necessary during the program debugging stage.

[0003] As a very common input device, the keyboard has the advantages of low cost, easy to carry, and good cross-platform support. If the keyboard can be used instead of the HOTAS stick as the control input device of the aircraft motion platform during the development and testing phase of the human-in-the-loop flight simulation system, or even in the commercial application phase with low requirements, it can provide great convenience for development and testing, while saving project costs.

[0004] Each key on a single keyboard has only two states: pressed and not pressed. When the keyboard's direction keys are used as pitch and roll control inputs, only two input values ​​can be generated, which makes it difficult to control the attitude of the aircraft's motion platform. Summary of the invention

[0005] The technical problem to be solved by the present invention is to provide a joystick simulation input method and device, which can use a keyboard to smoothly control the attitude of an aircraft motion platform, has simple calculation, low cost, easy to carry and good cross-platform support.

[0006] In order to solve the above technical problems, an embodiment of the present invention discloses a joystick simulation input method, the method comprising:

[0007] S1. In response to a start signal input by a user, a preset timer is started, and a first calculation value and a second calculation value are initialized; the current time when the timer is started is the preset first time;

[0008] S2. Determine the current time of the timer;

[0009] When the current time is less than the preset second time, executing S2;

[0010] When the current time is greater than or equal to the second time, updating the current time to the first time, and executing S3;

[0011] S3, obtaining an event state set; the event state set includes a first event state, a second event state, a third event state and a fourth event state; the values ​​of the first event state, the second event state, the third event state and the fourth event state are pressed or released;

[0012] S4. Process the event state set, the first calculated value, and the second calculated value to obtain a first range value and a second range value, and updated first calculated value and second calculated value;

[0013] S5. Process the first range value, the second range value, and the updated first calculated value and the second calculated value to obtain a pitch value and a roll value;

[0014] S6. Repeat S2 to S5 until a stop signal input by the user is received; stop the timer.

[0015] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the event state set, the first calculated value, and the second calculated value to obtain a first range value and a second range value, and the updated first calculated value and the second calculated value includes:

[0016] S41, presetting a first priority state and a second priority state; the values ​​of the first priority state and the second priority state are the first priority, the second priority or the third priority;

[0017] S42: Process the first priority state, the first event state, and the second event state to obtain a first execution state;

[0018] S43, processing the second priority state, the third event state and the fourth event state to obtain a second execution state;

[0019] S44, processing the first execution state and the first calculated value to obtain the first range value and the updated first calculated value;

[0020] S45. Process the second execution state and the second calculated value to obtain the second range value and the updated second calculated value.

[0021] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the first priority state, the first event state, and the second event state to obtain a first execution state includes:

[0022] Determining the first event status and the second event status;

[0023] When the first event state and the second event state are both released, determining that the first execution state is unchanged;

[0024] When the first event state is released and the second event state is pressed, determining that the first execution state is increased;

[0025] When the first event state is pressed and the second event state is released, determining that the first execution state is reduced;

[0026] When both the first event state and the second event state are pressed, determining the first priority state;

[0027] When the first priority state is the first priority, determining that the first execution state is reduced;

[0028] When the first priority state is the second priority state, determining the first execution state is increasing;

[0029] When the first priority state is the third priority state, the first execution state is determined to be unchanged.

[0030] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the second priority state, the third event state, and the fourth event state to obtain a second execution state includes:

[0031] Determining the third event status and the fourth event status;

[0032] When the third event state and the fourth event state are both released, determining that the second execution state is unchanged;

[0033] When the third event state is released and the fourth event state is pressed, determining that the second execution state is increased;

[0034] When the third event state is pressed and the fourth event state is released, determining that the second execution state is reduced;

[0035] When the third event state and the fourth event state are both pressed, judging the second priority state;

[0036] When the second priority state is the first priority state, determining that the second execution state is reduced;

[0037] When the second priority state is the second priority, determining that the second execution state is increasing;

[0038] When the second priority state is the third priority state, the second execution state is determined to be unchanged.

[0039] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the first execution state and the first calculated value to obtain the first range value and the updated first calculated value includes:

[0040] S441, presetting a first threshold, a second threshold, a first step length, and a second step length; the first threshold is smaller than the second threshold;

[0041] Optionally, the first step length is equal to the second step length;

[0042] Preferably, the first step length and the second step length are both 20;

[0043] S442: Using a first range value calculation model, process the first threshold value and the second threshold value to obtain the first range value;

[0044] The first range value calculation model is:

[0045]

[0046] In the formula, F1 is the first range value, G1 and G2 are the first threshold and the second threshold respectively.

[0047] S443, judging the first execution state;

[0048] When the first execution state is decreasing, judging the first calculated value and the first threshold;

[0049] If the first calculated value is less than the first threshold, updating the first calculated value to the first threshold;

[0050] If the first calculated value is greater than or equal to the first threshold, subtract the first calculated value from the first step to obtain an updated first calculated value;

[0051] When the first execution state is increasing, judging the first calculated value and the second threshold;

[0052] If the first calculated value is greater than the second threshold, updating the first calculated value to the second threshold;

[0053] If the first calculated value is less than or equal to the second threshold, the first calculated value is added to the second step length to obtain an updated first calculated value.

[0054] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the second execution state and the second calculated value to obtain the second range value and the updated second calculated value includes:

[0055] S451, presetting a third threshold, a fourth threshold, a third step length, and a fourth step length; the third threshold is smaller than the fourth threshold;

[0056] Optionally, the third step length is equal to the fourth step length;

[0057] Preferably, the third step length and the fourth step length are both 20;

[0058] S452, judging the second execution state;

[0059] When the second execution state is decreasing, judging the second calculated value and the third threshold;

[0060] If the second calculated value is less than the third threshold, updating the second calculated value to the third threshold;

[0061] If the second calculated value is greater than or equal to the third threshold, subtract the second calculated value from the third step length to obtain an updated second calculated value;

[0062] When the second execution state is increasing, judging the second calculated value and the fourth threshold;

[0063] If the second calculated value is greater than the fourth threshold, updating the second calculated value to the fourth threshold;

[0064] If the second calculated value is less than or equal to the fourth threshold, the second calculated value is added to the fourth step length to obtain an updated second calculated value.

[0065] S453: Using a second range value calculation model, process the third threshold value and the fourth threshold value to obtain the second range value;

[0066] The second range value calculation model is:

[0067]

[0068] In the formula, F2 is the first range value, G3 and G4 are the third threshold and the fourth threshold respectively.

[0069] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the processing of the first range value and the second range value, and the updated first calculated value and the second calculated value to obtain the pitch value and the roll value includes:

[0070] S51, preset a third range value;

[0071] S52, calculating a ratio of the first range value to the third range value to obtain a first scaling factor;

[0072] S53, calculating a ratio of the second range value to the third range value to obtain a second scaling factor;

[0073] S54, calculating the product of the first calculated value and the first scaling factor to obtain the pitch value;

[0074] S55. Calculate the product of the second calculated value and the second scaling factor to obtain the roll value.

[0075] A second aspect of an embodiment of the present invention discloses a joystick simulation input device, the device comprising:

[0076] A memory storing executable program code;

[0077] a processor coupled to the memory;

[0078] The processor calls the executable program code stored in the memory to execute part or all of the steps in the joystick simulation input method disclosed in the first aspect of the embodiment of the present invention.

[0079] The third aspect of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute some or all steps in the joystick simulation input method disclosed in the first aspect of the embodiment of the present invention.

[0080] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0081] By converting keyboard key operations into continuously changing pitch and roll values ​​within a specified range, the HOTAS stick can be replaced to achieve smooth control of the aircraft motion platform. It is simple to calculate, low cost, easy to carry and has good cross-platform support. BRIEF DESCRIPTION OF THE DRAWINGS

[0082] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0083] Figure 1 The present invention is a flowchart of a joystick simulation input method disclosed in an embodiment of the present invention.

[0084] Figure 2 The invention is a schematic structural diagram of a joystick simulation input device disclosed in an embodiment of the invention. DETAILED DESCRIPTION

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

[0086] In the description of the present invention, it should be noted that the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inner", "outer", etc., indicating the orientation or positional relationship, are based on the orientation or positional relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as limiting the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance.

[0087] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0088] Embodiment 1

[0089] See also Figure 1 , Figure 1 is a flow chart of a joystick simulation input method disclosed in an embodiment of the present invention. Figure 1 The joystick simulation input method described is applied to the field of flight simulation, such as the control of a UAV motion platform, and the embodiments of the present invention are not limited thereto. Figure 1 As shown, the method includes:

[0090] S1. In response to a start signal input by a user, a preset timer is started, and a first calculation value and a second calculation value are initialized; the current time when the timer is started is the preset first time;

[0091] Preferably, the first calculated value and the second calculated value are both initialized to 0;

[0092] Preferably, the first time is 0;

[0093] S2, judging the current time of the timer;

[0094] When the current time is less than the preset second time, execute S2;

[0095] When the current time is greater than or equal to the second time, the current time is updated to the first time, and S3 is executed;

[0096] The second time is greater than the first time;

[0097] It should be noted that after the above timer is started, the current time continues to increase and is updated at a predetermined period, and the calculation of the pitch value and the roll value is triggered once in each period to avoid frequent occupation of computing resources; the above period is the difference between the second time and the first time;

[0098] S3, obtaining an event state set; the event state set includes a first event state, a second event state, a third event state and a fourth event state; the values ​​of the first event state, the second event state, the third event state and the fourth event state are pressed or released;

[0099] Preferably, the first event state, the second event state, the third event state and the fourth event state are the states of the four keys of the keyboard, namely, down, up, left and right;

[0100] S4, processing the event state set, the first calculated value, and the second calculated value to obtain the first range value and the second range value, and the updated first calculated value and the second calculated value;

[0101] S5, processing the first range value and the second range value, and the updated first calculated value and the second calculated value to obtain a pitch value and a roll value;

[0102] S6. Repeat S2 to S5 until a stop signal input by the user is received; stop the timer.

[0103] In an optional embodiment, the above processing of the event state set, the first calculated value and the second calculated value to obtain the first range value and the second range value, and the updated first calculated value and the second calculated value includes:

[0104] S41, presetting a first priority state and a second priority state; the values ​​of the first priority state and the second priority state are the first priority, the second priority or the third priority;

[0105] S42, processing the first priority state, the first event state, and the second event state to obtain a first execution state;

[0106] S43, processing the second priority state, the third event state and the fourth event state to obtain a second execution state;

[0107] S44, processing the first execution state and the first calculation value to obtain a first range value and an updated first calculation value;

[0108] S45. Process the second execution state and the second calculated value to obtain a second range value and an updated second calculated value.

[0109] In another optional embodiment, the first priority state, the first event state, and the second event state are processed to obtain the first execution state, including:

[0110] Determine the first event status and the second event status;

[0111] When the first event state and the second event state are both released, determining that the first execution state is unchanged;

[0112] When the first event state is released and the second event state is pressed, determining that the first execution state is increased;

[0113] When the first event state is pressed and the second event state is released, determining that the first execution state is reduced;

[0114] When the first event state and the second event state are both pressed, the first priority state is judged;

[0115] When the first priority state is the first priority, determining the first execution state is reduced;

[0116] When the first priority state is the second priority state, determining the first execution state is increasing;

[0117] When the first priority state is the third priority state, the first execution state is determined to be unchanged.

[0118] It can be seen that by judging the first priority state, the first execution state is determined when both the first event state and the second event state are pressed, thereby avoiding the inability to correctly output the pitch value when the corresponding keys (such as the down and up keys on the keyboard) are pressed.

[0119] In yet another optional embodiment, the second priority state, the third event state, and the fourth event state are processed to obtain the second execution state, including:

[0120] Determining the third event status and the fourth event status;

[0121] When the third event state and the fourth event state are both released, determining that the second execution state is unchanged;

[0122] When the third event state is released and the fourth event state is pressed, determining that the second execution state is increased;

[0123] When the third event state is pressed and the fourth event state is released, determining that the second execution state is reduced;

[0124] When the third event state and the fourth event state are both pressed, the second priority state is judged;

[0125] When the second priority state is the first priority, determining the second execution state is reduced;

[0126] When the second priority state is the second priority, determining the second execution state is increasing;

[0127] When the second priority state is the third priority state, the second execution state is determined to be unchanged.

[0128] It can be seen that by judging the second priority state, the second execution state is determined when the third event state and the fourth event state are both pressed, thereby avoiding the inability to correctly output the roll value when the corresponding keys (such as the left and right keys on the keyboard) are both pressed.

[0129] In yet another optional embodiment, the first execution state and the first calculated value are processed to obtain the first range value and the updated first calculated value, including:

[0130] S441, presetting a first threshold, a second threshold, a first step length, and a second step length; the first threshold is smaller than the second threshold;

[0131] Preferably, the first step length and the second step length are both 20 ms;

[0132] Preferably, the first threshold is -5000ms, and the second threshold is 5000ms;

[0133] S442, using the first range value calculation model, processing the first threshold and the second threshold to obtain a first range value;

[0134] The above first range value calculation model is:

[0135]

[0136] Wherein, F1 is the first range value, G1 and G2 are the first threshold and the second threshold respectively.

[0137] S443, judging the first execution state;

[0138] When the first execution state is decreasing, judging the first calculated value and the first threshold;

[0139] If the first calculated value is less than the first threshold, updating the first calculated value to the first threshold;

[0140] If the first calculated value is greater than or equal to the first threshold, subtract the first calculated value from the first step length to obtain an updated first calculated value;

[0141] When the first execution state is increasing, judging the first calculated value and the second threshold value;

[0142] If the first calculated value is greater than the second threshold, updating the first calculated value to the second threshold;

[0143] If the first calculated value is less than or equal to the second threshold, the first calculated value is added to the second step length to obtain an updated first calculated value.

[0144] In yet another optional embodiment, the second execution state and the second calculated value are processed to obtain the second range value and the updated second calculated value, including:

[0145] S451, presetting a third threshold, a fourth threshold, a third step length, and a fourth step length; the third threshold is less than the fourth threshold;

[0146] Preferably, the third step length and the fourth step length are both 20ms;

[0147] Preferably, the third threshold is -5000ms, and the fourth threshold is 5000ms;

[0148] S452, judging the second execution state;

[0149] When the second execution state is decreasing, judging the second calculated value and the third threshold;

[0150] If the second calculated value is less than the third threshold, updating the second calculated value to the third threshold;

[0151] If the second calculated value is greater than or equal to the third threshold, subtract the second calculated value from the third step length to obtain an updated second calculated value;

[0152] When the second execution state is increasing, judging the second calculated value and the fourth threshold;

[0153] If the second calculated value is greater than the fourth threshold, updating the second calculated value to the fourth threshold;

[0154] If the second calculated value is less than or equal to the fourth threshold, the second calculated value is added to the fourth step length to obtain an updated second calculated value.

[0155] S453, using the second range value calculation model, processing the third threshold and the fourth threshold to obtain a second range value;

[0156] The above second range value calculation model is:

[0157]

[0158] Wherein, F2 is the first range value, G3 and G4 are the third threshold and the fourth threshold respectively.

[0159] In yet another optional embodiment, the first range value and the second range value, and the updated first calculated value and the second calculated value are processed to obtain the pitch value and the roll value, including:

[0160] S51, preset a third range value; the third range value is greater than 0;

[0161] Preferably, the third range value is 1;

[0162] S52, calculating the ratio of the first range value to the third range value to obtain a first scaling factor;

[0163] S53, calculating the ratio of the second range value to the third range value to obtain a second scaling factor;

[0164] S54, calculating the product of the first calculated value and the first scaling factor to obtain a pitch value;

[0165] S55. Calculate the product of the second calculated value and the second scaling factor to obtain a roll value.

[0166] It can be seen that the joystick simulation input method described in the embodiment of the present invention is implemented to convert the key operations of the keyboard into continuously changing pitch values ​​and roll values ​​within a specified range, replacing the HOTAS stick to achieve smooth control of the aircraft motion platform. This method is simple to calculate, low in cost, easy to carry and has good cross-platform support.

[0167] Embodiment 2

[0168] See also Figure 2 , Figure 2 is a schematic diagram of the structure of another joystick simulation input device disclosed in an embodiment of the present invention. Figure 2 The joystick simulation input device described can be applied to the field of flight simulation, such as the control of a UAV motion platform, and the embodiments of the present invention are not limited thereto. Figure 2 As shown, the joystick simulation input device may include the following parts:

[0169] A memory 201 storing executable program codes;

[0170] a processor 202 coupled to the memory 201;

[0171] The processor 202 calls the executable program code stored in the memory 201 to execute the steps in the joystick simulation input method described in the first embodiment.

[0172] Embodiment 3

[0173] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the joystick simulation input method described in the first embodiment.

[0174] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0175] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, a magnetic disk storage, a magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0176] Finally, it should be noted that the joystick simulation input method and device disclosed in the embodiments of the present invention disclose only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, it should be understood by those skilled in the art that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features therein can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A joystick simulation input method, It is characterized in that include: S1. In response to a start signal input by a user, a preset timer is started, and a first calculation value and a second calculation value are initialized; the current time when the timer is started is the preset first time; S2. Determine the current time of the timer; When the current time is less than the preset second time, executing S2; When the current time is greater than or equal to the second time, updating the current time to the first time, and executing S3; S3, obtaining an event state set; the event state set includes a first event state, a second event state, a third event state and a fourth event state; the values ​​of the first event state, the second event state, the third event state and the fourth event state are pressed or released; S4. Process the event state set, the first calculated value, and the second calculated value to obtain a first range value and a second range value, and updated first calculated value and second calculated value; S5. Process the first range value, the second range value, and the updated first calculated value and the second calculated value to obtain a pitch value and a roll value; S6. Repeat S2 to S5 until a stop signal input by the user is received; stop the timer.

2. The joystick simulation input method according to claim 1, It is characterized in that The processing of the event state set, the first calculated value, and the second calculated value to obtain a first range value and a second range value, and the updated first calculated value and the second calculated value includes: S41, presetting a first priority state and a second priority state; the values ​​of the first priority state and the second priority state are the first priority, the second priority or the third priority; S42: Process the first priority state, the first event state, and the second event state to obtain a first execution state; S43, processing the second priority state, the third event state and the fourth event state to obtain a second execution state; S44, processing the first execution state and the first calculated value to obtain the first range value and the updated first calculated value; S45. Process the second execution state and the second calculated value to obtain the second range value and the updated second calculated value.

3. The joystick simulation input method according to claim 2, It is characterized in that The processing of the first priority state, the first event state, and the second event state to obtain a first execution state includes: Determining the first event status and the second event status; When the first event state and the second event state are both released, determining that the first execution state is unchanged; When the first event state is released and the second event state is pressed, determining that the first execution state is increased; When the first event state is pressed and the second event state is released, determining that the first execution state is reduced; When both the first event state and the second event state are pressed, determining the first priority state; When the first priority state is the first priority, determining that the first execution state is reduced; When the first priority state is the second priority state, determining the first execution state is increasing; When the first priority state is the third priority state, the first execution state is determined to be unchanged.

4. The joystick simulation input method according to claim 2, It is characterized in that The processing of the second priority state, the third event state, and the fourth event state to obtain a second execution state includes: Determining the third event status and the fourth event status; When the third event state and the fourth event state are both released, determining that the second execution state is unchanged; When the third event state is released and the fourth event state is pressed, determining that the second execution state is increased; When the third event state is pressed and the fourth event state is released, determining that the second execution state is reduced; When the third event state and the fourth event state are both pressed, judging the second priority state; When the second priority state is the first priority state, determining that the second execution state is reduced; When the second priority state is the second priority, determining that the second execution state is increasing; When the second priority state is the third priority state, the second execution state is determined to be unchanged.

5. The joystick simulation input method according to claim 2, It is characterized in that The processing of the first execution state and the first calculated value to obtain the first range value and the updated first calculated value includes: S441, presetting a first threshold, a second threshold, a first step length, and a second step length; the first threshold is smaller than the second threshold; S442: Using a first range value calculation model, process the first threshold value and the second threshold value to obtain the first range value; The first range value calculation model is: In the formula, F 1 is the first range value, G 1 and G 2 are the first threshold and the second threshold respectively. S443, judging the first execution state; When the first execution state is decreasing, judging the first calculated value and the first threshold; If the first calculated value is less than the first threshold, updating the first calculated value to the first threshold; If the first calculated value is greater than or equal to the first threshold, subtract the first calculated value from the first step to obtain an updated first calculated value; When the first execution state is increasing, judging the first calculated value and the second threshold; If the first calculated value is greater than the second threshold, updating the first calculated value to the second threshold; If the first calculated value is less than or equal to the second threshold, the first calculated value is added to the second step length to obtain an updated first calculated value.

6. The joystick simulation input method according to claim 2, It is characterized in that The processing of the second execution state and the second calculated value to obtain the second range value and the updated second calculated value includes: S451, presetting a third threshold, a fourth threshold, a third step length, and a fourth step length; the third threshold is smaller than the fourth threshold; S452, judging the second execution state; When the second execution state is decreasing, judging the second calculated value and the third threshold; If the second calculated value is less than the third threshold, updating the second calculated value to the third threshold; If the second calculated value is greater than or equal to the third threshold, subtract the second calculated value from the third step length to obtain an updated second calculated value; When the second execution state is increasing, judging the second calculated value and the fourth threshold; If the second calculated value is greater than the fourth threshold, updating the second calculated value to the fourth threshold; If the second calculated value is less than or equal to the fourth threshold, the second calculated value is added to the fourth step length to obtain an updated second calculated value. S453: Using a second range value calculation model, process the third threshold value and the fourth threshold value to obtain the second range value; The second range value calculation model is: In the formula, F 2 is the first range value, G 3 and G 4 are the third threshold and the fourth threshold respectively.

7. The joystick simulation input method according to claim 1, It is characterized in that The processing of the first range value and the second range value, and the updated first calculated value and the second calculated value to obtain a pitch value and a roll value includes: S51, presetting a third range value; S52, calculating a ratio of the first range value to the third range value to obtain a first scaling factor; S53, calculating a ratio of the second range value to the third range value to obtain a second scaling factor; S54, calculating the product of the first calculated value and the first scaling factor to obtain the pitch value; S55. Calculate the product of the second calculated value and the second scaling factor to obtain the roll value.

8. A joystick analog input device, It is characterized in that The device comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the joystick simulation input method according to any one of claims 1 to 7.

9. A computer storage medium, It is characterized in that The computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the joystick simulation input method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Proportional control with an automatic centering manual input device for inputting computer variables

    US4824111A

  • Proportional control with a joystick device for inputting computer variables

    US4872672A

  • Computerized flight simulation control sampling and production system and method

    US5689682A

  • KR20190059564A