Donated on 9/9/2015

The UJIIndoorLoc-Mag is an indoor localization database to test Indoor Positioning System that rely on Earth's magnetic field variations.

Dataset Characteristics

Multivariate, Sequential, Time-Series

Subject Area

Computer Science

Associated Tasks

Classification, Regression, Clustering

Feature Type

Integer, Real

# Instances


# Features


Dataset Information

Additional Information

Indoor localization is a key topic for mobile computing. However, it is still very difficult for the mobile sensing community to compare state-of-art Indoor Positioning Systems due to the scarcity of publicly available databases. Magnetic field-based methods are becoming an important trend in this research field. Here, we present UJIIndoorLoc-Mag database, which can be used to compare magnetic field-based indoor localization methods. It consists of 270 continuous samples for training and 11 for testing. Each sample comprises a set of discrete captures taken along a corridor (or an intersection) with a period of 0.1 seconds. In total, there are almost 40.000 discrete captures, where each one contains features obtained from the magnetometer, the accelerometer and the orientation sensor of the device. Data has been stored as a simple text file as follows: ts_1 mx_1 my_1 mz_1 ax_1 ay_1 az_1 ox_1 oy_1 oz_1 … ts_n mx_n my_n mz_n ax_n ay_n az_n ox_n oy_n oz_n <m> lat_1 lon_1 lat_2 lon_2 FS_1 LS_1 … lat_m lon_m lat_m+1 lon_m+1 FS_m LS_m Where n is the number of samples collected in the trajectory at a 0.1 seconds frequency and m is the number of segments (corridors) in the trajectory. Each sample contains the timestamp ts and the values from magnetometer, accelerometer and orientation sensors in the three axes, which are denoted with mx, my, mz, ax, ay, az, ox, oy and oz. Finally, lat_i and lon_i corresponds to the coordinates (latitude & longitude in decimal degrees) of the initial, intermediate (intersections) and final points. A trajectory with m corridors has m+1 points. FS_i and LS_i state for the i-th trajectory’s first and last sample respectively in the full sequence of samples collected during the trajectory mapping. According to the previous structure, the text files are composed by two well-differentiated parts separated by the row indicating the number of segments in the trajectory: 1) the sequence of discrete samples taken during the trajectory mapping, and 2) the configuration data. The first part contains the timestamp (the UNIX time format in milliseconds) and the vector data from magnetometer (Android’s TYPE_MAGNETIC_FIELD), accelerometer (TYPE_LINEAR_ACCELERATION) and orientation (TYPE_ORIENTATION) sensors. The accelerometer’s values do not include the gravity force to have a better representation of user’s real movement. The second part contains the information about location of initial, intermediate and ending points Moreover, the samples can be associated to corridor segments and, moreover, information about turnings is also provided in all the samples. The database consists of 281 continuous samples, 270 are for training and 11 for testing. They have been stored as independent text files. The training ones are grouped into two main categories “lines” and “curves”. - The “lines” group has 80 files and they stand for the single corridor case. The format for filename is “lXX_ZZ.txt” where XX stands for the number of corridor & orientation (n or r) and ZZ stands for repetition. Example: l3r_03.txt - The “curves” group has 190 files and they stand for all possible trajectories considering two connected corridors only. The format for that group’s filename is “cXXYY_ZZ.txt” where XX and YY stand for the number of corridor & orientation for the first and second corridors in the two corridors trajectory, and ZZ stands for repetition. Example: c5n1r_05.txt - The testing files’ filename format is “ttPP.txt” where PP stands for the complex testing trajectory number. Example: tt03.txt

Has Missing Values?


Variables Table

Variable NameRoleTypeDemographicDescriptionUnitsMissing Values

0 to 10 of 13

Additional Variable Information

Each discrete sample contains. 1- Timestamp [2,3,4] - Magnetometer values on the x,y,z axes [4,5,6] - Accelerometer values on the x,y,z axes [7,8,9] - Orientation sensor values on the x,y,z axesn your data set.


There are no reviews for this dataset yet.

Login to Write a Review
0 citations


Joaqun Torres-Sospedra

David Rambla

Raul Montoliu

Oscar Belmonte

Joaqun Huerta


By using the UCI Machine Learning Repository, you acknowledge and accept the cookies and privacy practices used by the UCI Machine Learning Repository.

Read Policy