A method of a first device for tracking a position of a second device, the method comprising: capturing, by using a first positional resolution, based on first information from a first sensor, a first position of the second device within an optical tracking zone of the first sensor, wherein the first sensor is included in the first device; determining, based on the first information, that the second device exits the optical tracking zone of the first sensor; and responsive to determining that the second device exits the optical tracking zone of the first sensor, monitoring acceleration information received from a second sensor included in the second device, and capturing, by using a second positional resolution, a second position of the second device based on said acceleration information; characterised by: setting a minimum threshold value for the acceleration information from the second sensor according to an error profile for the second sensor, wherein the error profile for the second sensor is an extent of a measurement error of the second sensor and information on circumstances associated with the measurement error, and the second positional resolution corresponding to the minimum threshold value for the acceleration information from the second sensor, wherein the second positional resolution decreases and a spatial unit expressing the second position of the second device increases, as the minimum threshold value for the acceleration information increases. capturing, by using a first positional resolution, based on first information from a first sensor, a first position of the second device within an optical tracking zone of the first sensor, wherein the first sensor is included in the first device; determining, based on the first information, that the second device exits the optical tracking zone of the first sensor; and responsive to determining that the second device exits the optical tracking zone of the first sensor, monitoring acceleration information received from a second sensor included in the second device, and capturing, by using a second positional resolution, a second position of the second device based on said acceleration information; characterised by: setting a minimum threshold value for the acceleration information from the second sensor according to an error profile for the second sensor, wherein the error profile for the second sensor is an extent of a measurement error of the second sensor and information on circumstances associated with the measurement error, and the second positional resolution corresponding to the minimum threshold value for the acceleration information from the second sensor, wherein the second positional resolution decreases and a spatial unit expressing the second position of the second device increases, as the minimum threshold value for the acceleration information increases. setting a minimum threshold value for the acceleration information from the second sensor according to an error profile for the second sensor, wherein the error profile for the second sensor is an extent of a measurement error of the second sensor and information on circumstances associated with the measurement error, and the second positional resolution corresponding to the minimum threshold value for the acceleration information from the second sensor, wherein the second positional resolution decreases and a spatial unit expressing the second position of the second device increases, as the minimum threshold value for the acceleration information increases.