## 5 Feasibility Study Through System Simulations
### Generation of Datasets of Fingerprints
#### 5.2.4 Generation of Moving Tiles  
Pseudocode 3 shows the function \(FMovingTiles()\), in charge of generating the datasets with moving tiles, MTV and MTT. This function takes as input the center position coordinates of the fixed tiles to determine the area in which the moving tiles can be generated (details on the allowed positioning area are provided below in Section 5.3). This function also takes as input \(NumberOf\,MovingTiles\), which determines how many moving tiles are generated. The position of the moving tiles is determined randomly, with the outcome of pseudo-random numbers generated from a uniform distribution in the interval \([0,1)\), \(\sim\mathcal{U}(0,1)\), scaled and shifted to the dimensions of the positioning area. Each moving tile has a set of radio channel realizations (vector of fingerprints) in each sub-tile, resulting from the path losses from the base stations and the randomness introduced by the shadow fading in the radio channel model (Section 5.4). Thus, each channel realization most likely determines a different set of fingerprints at each tile position. In the simulations, we use \(NumberOf\,MovingTiles=5000\). The function \(FMovingTiles()\) 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. This function also takes as input \(N_{SS}\) and \(S_{S}\), with the purpose of passing these as input to the function \(FTile()\). ```
Input:\(vCenterTilesPositionX,vCenterTilesPositionY,NumberOf\,MovingTiles,N_{SS},S_{S}\) \(MinTileCenterPositionX\leftarrow min(vCenterTilesPositionX)\) MaxTileCenterPositionX\(\leftarrow max(vCenterTilesPositionX)\) MinTileCenterPositionY\(\leftarrow min(vCenterTilesPositionY)\) MaxTileCenterPositionY\(\leftarrow max(vCenterTilesPositionY)\) IntervalPositionX\(\leftarrow MaxTileCenterPositionX-MinTileCenterPositionX\) IntervalPositionY\(\leftarrow MaxTileCenterPositionY-MinTileCenterPositionY\) vMovingTiles\(\leftarrow[\,]\) vVector/array/list to store tile data structures vSubTilesCenterPosit\(\leftarrow[\,]\)\(\triangleright\)Vector/array/list to store sub-tile center positions indexTiles\(\leftarrow\) 0 whileindexTiles\(<NumberOf\,MovingTiles\)do \(iX\leftarrow\)\(\sim\mathcal{U}(0,1)\times IntervalPositionX+MinTileCenterPositionX\)\(\triangleright\)Random coord. \(iY\leftarrow\)\(\sim\mathcal{U}(0,1)\times IntervalPositionY+MinTileCenterPositionY\)\(\triangleright\)Random coord. \(Y\) \(TileDataStructure,SubTilesCenterPositStruct\gets FTile(iX,iY,N_{SS},S_{S})\)\(\triangleright\)Tile \(vMovingTiles\gets vMovingTiles+[TileDataStructure]\)\(\triangleright\)Append tile data struct. \(vSubTilesCenterPosit\gets vSubTilesCenterPosit+[SubTilesCenterPositStruct]\) indexTiles\(\leftarrow\) indexTiles\(+\) 1 \(\triangleright\)Next tile index endwhile Return \(vMovingTiles,vSubTilesCenterPosit\)
```  
**Pseudocode 3** Function for generating moving tiles - \(FMovingTiles()\)  
```
Input:\(vCenterTilesPositionX,vCenterTilesPositionY,NumberOf\,MovingTiles,N_{SS},S_{S}\) \(MinTileCenterPositionX\leftarrow min(vCenterTilesPositionX)\) MaxTileCenterPositionX\(\leftarrow max(vCenterTilesPositionX)\) MaxTileCenterPositionY\(\leftarrow max(vCenterTilesPositionX)



A data structure \(vMovingTiles\) in the form of a vector, array, or list is returned as the 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 its elements the vectors of fingerprints for each sub-tile in the tile. This 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 \(vMovingTiles\). This data structure contains the reference center position coordinates for each generated sub-tile in the tile.