## 5 Feasibility Study Through System Simulations
### Generation of Datasets of Fingerprints
#### 5.2.3 Generation of Fixed Tiles  
Pseudocode 2 shows the function \(FFixedTiles()\), which is in charge of generating the datasets with fixed tiles, FTT and FTV. This function takes as its input the center position coordinates of the fixed tiles and generates fixed tiles at the specified positions. The function also takes as input the number of fixed tile batches \(N_{FTB}\), which determines how many batches of tiles are generated. Each batch covers the entire positioning area in the scenario. Thus, there are \(N_{FTB}\) instances of tiles at each tile position, each with a different set of radio channel realizations (vector of fingerprints) in each sub-tile. The radio channel realizations result from the path losses from the base stations and the randomness introduced by the shadow fading in the radio channel model (Section 5.4). Each channel realization most likely determines a different set of fingerprints at each tile position. In our simulations, we use the same number of batches, \(N_{FTB}=50\), for the FTT and FTV datasets. The function \(FFixedTiles()\) makes calls to the function \(FTile()\), which is the one in charge of generating the actual tile (one per call), with the corresponding fingerprints at the given tile coordinates. The function also takes \(N_{SS}\) and \(S_{S}\) as input with the purpose of passing these as input to the function \(FTile()\). ```
Input: \(vCenterTilesPositionX,vCenterTilesPositionY,N_{FTB},N_{SS},S_{S}\) \(vFixedTiles\leftarrow[\;]\)\(\triangleright\) Vector/array/list to store tile data structures \(vSubTilesCenterPosit\leftarrow[\;]\)\(\triangleright\) Vector/array/list to store sub-tile center positions \(indexBatch\gets 0\) whileindexBatch\(<N_{FTB}\)do for\(iY\in vCenterTilesPositionY\)do for\(iX\in vCenterTilesPositionX\)do \(TileDataStructure,SubTilesCenterPositStruct\gets FTile(iX,iY,N_{SS},S_{S})\)\(\triangleright\) Tile \(vFixedTiles\gets vFixedTiles+[TileDataStructure]\)\(\triangleright\) Append tile data struct. \(vSubTilesCenterPosit\gets vSubTilesCenterPosit+[SubTilesCenterPositStruct]\) endfor endfor \(indexBatch\gets indexBatch+1\)\(\triangleright\) Next batch index endwhile Return\(vFixedTiles,vSubTilesCenterPosit\)
```  
**Pseudocode 2** Function for generating fixed tiles - \(FFixedTiles()\)  
A data structure \(vFixedTiles\) in the form of a vector, array, or list is returned as output, in which each element is a tensor, or another suitable data structure, associated with a tile for storing the fingerprints. This tensor or data structure contains as elements the vectors of fingerprints for each sub-tile in the tile. The function also returns as output a data structure \(vSubTilesCenterPosit\) in the form of a vector, array, or list, in which each element contains a data structure associated with a tile and consistent in indexing order with a tile in \(vFixedTiles\). This data structure contains the reference center position coordinates for each generated sub-tile in the tile. For simplicity, the pseudocode for the function \(FFixedTiles()\) does not show that each fixed tile needs to have a _tile-class_ label associated with it. The tile-class label is any distinctive indicator, which ultimately is vectorized using one-hot encoding. It is assumed that this or another function creates such a label and that a suitable data structure, for example, in the form of a look-up table, is created to map each tile-class label to the center position of the corresponding fixed tile. The tile-class label, and the data structure mapping the tile-class to the center position of the fixed tile, are used by pattern-matching method 4-MultFingIn-ClassOut, which is a classification-based method. Two function calls to \(FFixedTiles()\) are performed, one to generate the FTT dataset and one to generate the FTV dataset (as will be explained in steps 4 and 5 of the main execution flow of the simulator presented in Section 5.6.1).