## 3 LANDMARC Methodology  
The implementation of the LANDMARC algorithm mainly starts from creating a mathematical model to classify the antenna and tag relationships, thus creating an array of antenna number rows and RSSI value columns. With each RFID, a successful read tag event contains the corresponding EPC code and the RSSI value. Thus, the needed inputs and parameters for determining the location of the target tag are shown below:  
\(n\)--number of RF readers;  
\(m\)--tag to be used as reference tag;  
\(u\)--the target tags that will be tracked;  
\(S\)--\((S_{1},\ S_{2},\ \ldots,\ S_{n})\ S_{i}\) denotes the RSSI of each target tag highlighted by each reader \(i\);  
\(\theta\)'\((\theta_{1},\ \theta_{2},\ \ldots,\theta_{n})\ \theta_{i}\) denotes the signal strength.  
With these values and parameters, we can then calculate the Euclidian distance vector per RFID tag and antenna, and the resultant vector would be the Euclidian distance for reference tags and target tags. Suppose that in an indoor room, there are evenly spaced reference tags and readers, and the tags to be tested are randomly distributed indoors. The matrix of signal strength values measured by the reader for each reference tag [4] is:  
\[\begin{array}{cccc}S_{11}&S_{12}&\cdots&S_{1n}\\ S_{21}&S_{22}&\cdots&S_{2n}\\ \vdots&&&\vdots\\ \vdots&&&\vdots\\ S_{m1}&\cdots&\cdots&S_{mn}\end{array} \tag{1}\]  
where \(S_{mn}\) represents the signal strength of the \(n\)-th reference tag measured by the \(m\)-th reader [4]. The reader measures the signal strength matrix of the tag under test, where \(T_{mu}\) represents the signal strength of the \(u\)-th tag to be detected by the \(m\)-th reader [18].  
\[\begin{array}{cccc}T_{11}&T_{12}&\cdots&T_{1u}\\ T_{21}&T_{22}&\cdots&T_{2u}\\ T=&\vdots&&&\vdots\\ \vdots&&&\vdots\\ T_{m1}&\cdots&\cdots&T_{mu}\end{array} \tag{2}\]  
The magnitude of the spacing between the label is to be tested, and also the LANDMARC is used as our reference point, which will be determined by the Euclidian distances of the vector. The Euclidian distance of the vector is calculated as \(E_{ij}\). This is the distance between the \(i\)-th reference label and also the \(j\)-th label to be located [18].  
\[E_{ij}=\sqrt{\sum_{k=1}^{n}\Bigl{(}T_{ik}-S_{jk}\Bigr{)}^{2}(i=1,2\cdots u;j= 1,2\cdots n)} \tag{3}\]  
For each target to be measured, we need find the \(k\) nearest reference labels. According to the distance between the \(k\) reference labels and the label to be tested, the weight coefficient occupied by each reference label is as shown below:  
\[w_{i}=\frac{\frac{1}{E_{i}^{2}}}{\sum_{i=1}^{k}\biggl{(}\frac{1}{E_{i}^{2}} \biggr{)}} \tag{4}\]where \(w_{i}\) represents the weight coefficient of the \(k\) nearest reference labels of the label to be tested. In order to find the nearest reference tag to the tracking tag, we can use the coordinate of the reference tag with the smallest \(E\) value as the unknown tag's coordinate. It can be called the 1-nearest neighbor algorithm [18]. Unlike conventional LANDMARC approaches, when using antenna beams, the accuracy can vary because of differences when switching between antenna beams, and its positioning is an independent value; hence, finding the equilibrium point between the number of reference points and also the accuracy and range relationship is the key problem.