## 3 Motion Dynamics Input Search Algorithm
### Determining Search Directions Based on the Received User Input  
Even though a system has been developed that allows users to try the MDIS algorithm in real time, the tests for this research were made using pre-recorded footage and accompanying log files which include user input. The input received from the user has the following format:  
\[Right\ Stick\ Vertical-[3.319998]\rightarrow-0.3877063\]  
In this example, Right Stick Vertical, which corresponds to the forward motion, was pushed with the intensity of \(-0.3877063\) at the second 3.319998. Generally, the received input follows the following format:  
\[STICK-[TIMESTAMP]\rightarrow INTENSITY\]  
The timestamp can easily be converted into the frame number, and the intensities range from \(-1\) to \(1\). The idea is to use the received input to generate a textual file that contains numbers from '0' to '8', which correspond to all the possible movements, starting with '0', which means undefined (perform a normal DS), '1' for forward motion, '2' for backward motion, '3' for moving to the left, and so on (Table 1). The MDIS algorithm then reads those numbers and uses a specific search model depending on the read number. The accuracy of the utilized motion dynamics estimation is ensured by relying on the same joystick input data already used for controlling the drone, which is handled and secured by the drone's manufacturers. Since this information is integral to the drone's \begin{table}
\begin{tabular}{c l} \hline
**Movement Code** & **Description** \\ \hline
0 & Undefined (Normal Diamond Search) \\
1 & Forward motion \\
2 & Backward motion \\
3 & Moving to the left \\
4 & Moving to the right \\
5 & Upward motion \\
6 & Downward motion \\
7 & Rotating to the left \\
8 & Rotating to the right \\ \hline \end{tabular}
\end{table} 
Table 1: Mapping of movement codes to descriptions. Figure 14: Set of probability functions determining search locations in left motion, based on block position within the image. operation, it is inherently accurate and reliable. Even if an error occurs, it would not cause a significant issue because such errors are rare and because ME uses the AMVP scheme described earlier in this section, which is robust to rare disturbances. For example, we tested this by intentionally inserting a random value in the generated textual file at every 20 th character location, and the impact on ME quality was negligible. Transforming the received user input data into the desired formatted output presents a complex challenge. It is not sufficient to merely identify the joystick with the greatest push intensity at a given frame and assume that it determines the final search model. This approach would not yield optimal results. Consider the following scenario: a drone is stationary and begins to accelerate forward. Naturally, the highest intensity would be for the Right Stick Vertical. It might seem intuitive to immediately start using the forward motion search model. However, it is important to note that due to physical forces, the drone initially leans downward (pitch) as it starts to accelerate. This downward tilt can be leveraged by employing a combination of the downward and forward motion search models. Relying solely on the standard forward motion model during the several initial frames of drone acceleration would not yield optimal results. Similarly, when the drone starts moving left or right, it first slightly tilts to the side (roll). While integrating additional sensor data such as radar or laser data could potentially enhance the precision of motion dynamics estimation, our primary focus is on leveraging joystick input data. This decision is based on the following factors:  
* Data availability and reliability: joystick input data are readily available and reliably processed by the drone's control system. These data are directly tied to the user's commands and provide immediate feedback on the intended movements. * Integration complexity: incorporating radar or laser data would introduce additional complexity into the system.