Joystick simulation input method and device

By designing the joystick simulation input method, using the keyboard instead of the HOTAS rod, converting the keyboard key operation into continuously changing pitch and roll value, solving the problem of expensive, inconvenient and poor compatibility of the HOTAS rod, and realizing the smooth control of the aircraft movement platform and cost savings.

CN119024720BActive Publication Date: 2025-02-18BEIJING FANGZHOU TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the use of the HOTAS pole as the control input device for the aircraft movement platform has problems such as expensive procurement prices, inconvenient portability and poor cross-platform compatibility. In the program debugging stage, the HOTAS pole is unnecessary, resulting in development testing and commercial application costs. Higher.

Method used

By designing a joystick simulation input method, using the keyboard instead of the HOTAS rod, the keyboard is used to convert the keyboard key operation into continuously changing pitch and roll values ​​within the specified range, so as to achieve smooth control of the aircraft motion platform through timer and event status processing, through the processing of timer and event status, the keyboard key operation is converted into continuously changing pitch and roll values ​​within the specified range, thereby realizing the smooth control of the aircraft movement platform .

Benefits of technology

It realizes smooth control of the attitude of the aircraft motion platform using a keyboard, reducing the cost of development and testing and commercial applications, and is simple to calculate, low cost, easy to carry and has good cross-platform support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119024720B_ABST
    Figure CN119024720B_ABST
Patent Text Reader

Abstract

The present invention discloses a joystick simulation input method and device, the method: S1, in response to a start signal input by a user, start a preset timer, and initialize a first calculation value and a second calculation value; S2, judge the current time of the timer; S3, obtain an event state set; S4, process the event state set, the first calculation value and the second calculation value to obtain a first range value and a second range value, and an updated first calculation value and a second calculation value; S5, process the first range value and the second range value, and the updated first calculation value and the second calculation 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. The method of the present invention can replace the HOTAS stick to achieve smooth control of an aircraft motion platform, and has simple calculation, low cost, convenient carrying, and good 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 human-in-the-loop flight simulation systems, HOTAS (Hands On Throttle-And-Stick) controllers are often used as control input devices for aircraft motion platforms to control pitch and roll attitude. However, using specialized HOTAS controllers presents challenges such as high procurement costs, portability issues, and poor cross-platform compatibility. Furthermore, HOTAS controllers are often unnecessary during program debugging.

[0003] As a very common input device, the keyboard has the advantages of low cost, portability, and good cross-platform support. If the keyboard can be used instead of the HOTAS stick as the control input device for 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 lower requirements, it will greatly facilitate development and testing while saving project costs.

[0004] Each key on a single keyboard has only two states: pressed and not pressed. When using the keyboard's arrow keys as pitch and roll control inputs, only two input values ​​can be generated, which makes it difficult to control the attitude of the aircraft 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 smoothly control the posture of an aircraft motion platform using a keyboard, has simple calculation, low cost, easy portability 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, start a preset timer and initialize a first calculated value and a second calculated value; 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. Obtain 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, as well as 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 the first range value and the 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: Process the second priority state, the third event state, and the fourth event state to obtain a second execution state;

[0019] S44: Process 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 the second execution state includes:

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

[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, determining 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 the first execution state and the first calculated value to obtain the first range value and the updated first calculated value includes:

[0040] S441: Preset 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 length of the first step is equal to the length of the second step;

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

[0043] S442: Process the first threshold and the second threshold using a first range value calculation model 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: Determine the first execution status;

[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 size 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 the second execution state and the second calculated value to obtain the second range value and the updated second calculated value includes:

[0055] S451: Preset 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: Determine 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 and the fourth threshold to obtain the second range value;

[0066] The second range value calculation model is:

[0067]

[0068] Wherein, F2 is the second 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 embodiments of the present invention, the processing 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, presetting a third range value;

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

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

[0073] S54. Calculate 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, 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 storing computer instructions. When the computer instructions are called, they are used to execute some or all of the 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 diagram is a structural diagram of a joystick simulation input device disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0085] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 making creative efforts 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," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0087] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediary; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.

[0088] Example 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 is not limited in the embodiments of the present invention. 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 calculated value and a second calculated 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. Determine 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, update the current time to the first time and execute S3;

[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 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. Obtain 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 down, up, left and right keys of the keyboard respectively;

[0100] 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, as well as updated first calculated value and second calculated value;

[0101] S5. Process 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: Process 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 calculated value to obtain a first range value and an updated first calculated 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 above processing of the first priority state, the first event state, and the second event state to obtain the first execution state includes:

[0110] Judging 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] judging the third event state and the fourth event state;

[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, 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 processing of the first execution state and the first calculated value to obtain the first range value and the updated first calculated value includes:

[0130] S441: Preset 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 20ms;

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

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

[0134] The calculation model for the first range value 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 processing of the second execution state and the second calculated value to obtain the second range value and the updated second calculated value includes:

[0145] S451: Preset 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, process the third threshold value and the fourth threshold value to obtain a second range value;

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

[0157]

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

[0159] In yet another optional embodiment, 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:

[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. Calculate 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 converts keyboard key operations into continuously changing pitch 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-cost, easy to carry, and has good cross-platform support.

[0167] Example 2

[0168] See also Figure 2 , Figure 2 : is a structural diagram 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 do not limit this. Figure 2 As shown, the joystick simulation input device may include the following parts:

[0169] A memory 201 storing executable program code;

[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 of the joystick simulation input method described in the first embodiment.

[0172] Example 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 merely illustrative. Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0175] Through the detailed description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus the necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the above technical solution, in essence, or the portion that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, including 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 programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.

[0176] Finally, it should be noted that the joystick simulation input method and device disclosed in the embodiments of the present invention only disclose preferred embodiments of the present invention, and are only used to illustrate the technical solutions of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may 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 various embodiments of the present invention.

Claims

1. A joystick simulation input method, 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 first event state, the second event state, the third event state and the fourth event state are respectively states of the down, up, left and right keys of the keyboard; 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, 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, 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, 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, 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: Wherein, F1 is the first range value, G1 and G2 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, 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, adding the second calculated value 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, F2 is the second range value, G3 and G4 are the third threshold and the fourth threshold respectively.

7. The joystick simulation input method according to claim 1, 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 simulation input device, 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, 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

  • KR20190059564A