# A UWB-Driven Self-Actuated Projector Platform for Interactive Augmented Reality Applications
## 4 Mathematical Basis and Interaction Management
### UIWB-Based Calibration Algorithm and Interaction Detection  
To estimate the projected screen boundaries, the USAP platform needs to be localized within the room by representing Tag 1 (T\({}_{1}\)) with position coordinates as (X\({}_{\text{T1}}\), Y\({}_{\text{T1}}\), Z\({}_{\text{T1}}\)). Where defining the interactive surface ID tells about the USAP yaw angle around its local frame Z-axis. Following the setup in Figure 4, the projector beam source position is (X\({}_{\text{T1}}\), Y\({}_{\text{T1}}\), Z\({}_{\text{T1}}\)-f), and the Y-axis coordinate for the projected screen points P\({}_{3}\), P\({}_{4}\), and P\({}_{5}\) equal to the vertical distance from the ceiling to the beam source, is (e), given that the throw beam offset is 100%. The throw distance (T) on the Z-axis from the USAP platform defining the diagonal distance of the projected screen (D) by using information given by the projector's manual (Table 2). \begin{table}
\begin{tabular}{c c c} \hline \hline  & **Hardware Items** & **Specification** \\ \hline \multirow{4}{*}{USAP platform} & Mobile platform & Turtlebot3 waffle pi [49] \\  & Projector & Samsung Smart Beam SSB-10 DLYN60 projector (720p) \\  & UWB tag & Ciholas DWUSB-KIT [48] \\  & Wireless receiver device & ATEN HDMI Dongle Wireless Extender (1080p@10m) \\  & Power source & 7.4v, 2800 mAh rechargeable lithium battery \\ \hline \multirow{2}{*}{Input device} & On-board processor & ESP8266 Wi-Fi Module \\  & Power source & 7.4v, 360 mAh rechargeable lithium battery \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Hardware specifications of the UWB-driven self-actuated projector (USAP) platform and input device. Figure 3: Robot operating system (ROS)-based navigation pipeline of the USAP platform. We use the curve fitting function to find the best polynomial representation for the relation between T and D, where c\({}_{0}\), c\({}_{1}\), c\({}_{2}\), and c\({}_{3}\) are coefficients of third order polynomial:  
\[\text{D}=(\text{c}_{3}\times\text{T}^{3})+(\text{c}_{2}\times\text{T}^{2})+( \text{c}_{1}\times\text{T})+\text{c}_{0}. \tag{1}\]  
Using the projector aspect ratio 16:9 and from the projection geometry, we can write two equations as follows:  
\[(9\times\text{W})-(16\times\text{H})=0 \tag{2}\]  
\[\text{D}-\surd(\text{W}^{2}+\text{H}^{2})=0 \tag{3}\]  
where W is the projected screen width, and H is its height. By updating the value of D based on the USAP position and solving (2) and (3), we could solve for W and H:  
\[\text{W}=\surd((256/337)\times\text{D}^{2}) \tag{4}\]  
\[\text{H}=(9/16)\times\surd((256/337)\times\text{D}^{2}). \tag{5}\] \begin{table}
\begin{tabular}{c c} \hline
**Throw Distance (T) m** & **Projected Screen Diagonal (D) m** \\ \hline
1.522 & 1.5 \\
1.7781 & 1.75 \\
2.032 & 2 \\
2.286 & 2.25 \\
2.54 & 2.5 \\
2.794 & 2.75 \\
3.048 & 3 \\ \hline \end{tabular}
\end{table} 
Table 2: Relation between throw distance (T) and diagonal distance for the projected screen (D). Figure 4: Proposed projection scheme along with UWB-based calibration concept. Projected screen boundaries can be defined by finding the coordinates of points P1, P2, P3, and P4:  
\[ \begin{array}{l}\text{P}_{1}=[(\text{X}_{\text{T1}}-\text{W}/2),(\text{e}- \text{H})]\\ \text{P}_{2}=[(\text{X}_{\text{T1}}+\text{W}/2),(\text{e}-\text{H})]\\ \text{P}_{3}=[(\text{X}_{\text{T1}}+\text{W}/2),\text{e}]\\ \text{P}_{4}=[(\text{X}_{\text{T1}}-\text{W}/2),\text{e}].\end{array}  \tag{6}\]  
When the user interacts with an augmented image, the user's hand position can be represented as a pixel location in that image to define the interaction spot. Therefore, mapping each point inside the projected screen from UWB coordinate representation to pixel representation is the next step. If a user interacts with the projected screen at UWB coordinates of (XU, YU, ZU), the pixel location corresponding to the user's touch is found by the following:  
* First, find the relative displacement of the user's hand position from point P1.