**5.1 Sensor module selection**

78 Magnetic Sensors – Principles and Applications

This equation is actually the same as equation (10) if the sensor module is not moving. Using

*β*. y-tilt should not be used as roll for orientation calculation and magnetometer

where **m**b = [*m*<sup>x</sup> *m*<sup>y</sup> *m*z]T, **m**l = [*a 0 b*]T (*a* and *b* are the horizontal and vertical components of

 T lT T b 1 23 **R mR R m**

As illustrated in Fig. 6, *h*x, *h*y and *h*z are the projections of magnetic field on the horizontal plane and the *z*-axis (pointing downward) respectively, i.e., **h**b = [*h*<sup>x</sup> *h*<sup>y</sup> *h*z]T =(acos*ψ*, -asin*ψ*]T.

cos sin sin sin cos *xx y <sup>z</sup> hm m m*

*hm m yy z* cos sin 

sin cos sin cos cos *zx y <sup>z</sup> hm m m*

Accordingly, the heading on the horizontal plane, or the Euler angle yaw, can be defined

atan 2 , *h h*

The angle *ψ* calculated in equation (21) is actually a compass reading, i.e., the heading relative to magnetic north. To get the true heading, denoted as*ψ*T here, the magnetic

where *D* is the difference between magnetic north and true north. This difference is caused

To implement the methods introduced in the Section 4,. A commercial sensor module shall be carefully selected And then mounted to on a person rigidly. The result of the on-site

 *<sup>T</sup>* 

by the tilt of the earth's magnetic field generator relative to the earth's spin axis.

y x

 

 

 

are found from acceleration data, the attitude, or yaw*ψ*, can be

b Tl **m Rm** (16)

,z ,y ,x (17)

 

 

T(*ψ*,z)**R**2T(*θ*,y)**R**3T(

gn(cos ) (15)

angle of roll is not the y-tilt angle

,x). Hence we get

(18)

(20)

(19)

(21)

*D* (22)

atan 2 si *g g y z* gn(cos ), si

found from magnetic field data by solving the following simultaneous equation:

equation (13) and (14), we obtain

compensation.

as

After both pitch *θ*and roll

**5. Experimental study** 

pedestrian tracking is promising.

This equation is different from equation (11). Hence the

Then the compensated magnetic field can be obtained as below:

declination *D* must be deduced from the compass reading*ψ*:

the magnetic field of the earth vector) and **R**T=**R**<sup>l</sup>

Many factors, including size, cost, dynamic range, sampling rate and bias, have to be considered in choosing an appropriate sensor module. Firstly, the size of the sensor module should be small enough to be installed unobtrusively on footwear. Consequently, all 3D gyroscopes, 3D accelerometers and 3D magnetometers should be integrated into, actually orthogonally mounted in, this inertial/magnetic sensor module. Secondly, the price of this sensor module should be low enough to meet budget constraints for the targeted applications. Thirdly, the dynamic range of the sensor module should meet the requirements of the applications. Fourthly, the sampling rate should be high enough to avoid sampling errors. The sampling rate of the sensors should be at least 100 Hz. Finally, because of the sensitivity of sensors to temperature, each sensor in a module should be individually compensated for bias, which is a function of temperature.

With all these considerations an inertial measurement unit (IMU) was selected to build the prototype for testing. The IMU provides serial digital outputs of 3D acceleration, 3D angular velocity, and 3D magnetic field.
