the aim of the present invention is to provide a method to solve the common drift problems and 3d orientation errors related to the use of orientation data of a mobile or wearable device and target system and for using mobile or wearable device as a human - machine interface using inertial measurement units and potentially other sensors as input data to convert user &# 39 ; s motion into an interaction , a pointer on the screen or a gesture . the contribution of this invention is a solution for well - known problems related to the use of imus and motion sensors as input devices for user interaction in general , as well as specific embodiments and application scenarios of these methods where wearable and / or mobile devices are used to control specific interfaces .