**2.2 Construction of measurement system**

It is difficult to acquire the values of the acceleration sensor and the azimuth sensor of the mobile terminal at equal intervals because both of them are postprocessed when the values are changed. Therefore, it is necessary to store it in a global variable or static variable in the posted process, and it is also necessary to post a message independently by using a timer function, etc., in parallel processing. In addition, among the processes posted by the sensor, the acceleration in the world coordinate system is acquired by performing the attitude control process of the mobile terminal. For attitude control, after acquiring the rotation matrix with the geomagnetic sensor, the inverse matrix is multiplied by the acceleration matrix to convert it into the world coordinate system. At this time, gravity is removed. The post from the timer mainly runs the export process. The flow chart of the measurement process is shown in **Figure 3**.
