## 3 A Prototype System for Pedestrian Positioning
### Electronic Module
#### 3.1.2 GPS Receiver  
The PCB board houses a standard GPS receiver with an integrated ceramic antenna, measuring 15 mm by 15 mm. The receiver is built on the MTK MT3329 chipset and supports WAAS, EGNOS, MSAS, GAGAN corrections. GPS readouts are based on the WGS84 coordinate system aligned in the centre of the Earth, being represented by an ellipsoid. The conversion to a local coordinate system follows in two steps. Firstly, the polar coordinates, _i.e._, latitude, longitude and height above the ground, are transformed to the WGS84 Cartesian coordinates \((x_{\mathrm{WGS84}},y_{\mathrm{WGS84}},z_{\mathrm{WGS84}})\). This step, along with associated errors and corrections, is described in detail in [32]. Secondly, the local coordinates \((x,y,z)\) are obtained by simplified Helmert's transformation (5). \[\left[ \begin{array}{c}x\\ y\\ z\end{array} \right]=\mathbf{R}\left(\left[ \begin{array}{c}x_{\mathrm{WGS84}} \\ y_{\mathrm{WGS84}}\\ z_{\mathrm{WGS84}}\end{array} \right]-\mathbf{T}\right) \tag{5}\]  
The rotation \(\mathbf{R}\) and translation \(\mathbf{T}\) matrices are structured in such a way that the centre of the local coordinate system is on the Earth's surface. Versor \(\mathbf{1_{x}}\) is directed along with longitude, \(\mathbf{1_{y}}\) with latitude (towards the pole), \(\mathbf{1_{z}}\) is determined by \(\mathbf{1_{x}}\) and \(\mathbf{1_{y}}\). The conversion accuracy is in an order of 10 cm for 20 km from the centre of the local coordinate system. A GPS receiver provides the HDOP parameter (Horizontal Dilution of Precision) informing about the accuracy of the estimated coordinates, _i.e._, latitude and longitude (6). Higher values of HDOP should inform a dead reckoning filter to trust to other sources of positioning (e.g., inertial sensors) and disregard GPS readouts. \[\mathrm{HDOP}=\sqrt{\sigma_{x}^{2}+\sigma_{y}^{2}} \tag{6}\]  
The standard deviations of estimating \(x\) and \(y\) on the Earth surface are denoted by \(\sigma_{x}\) and \(\sigma_{y}\) respectively. Providing that \(x\) and \(y\) have the Gaussian distribution and are independent, the probability density function of distance error \(r_{e}\) is given by the Rayleigh distribution [33], which is not a monotone function of its argument. The function has a maximum for \(r_{e}>0\). Tests showed that the function defined by Equations (7), (8) and (9) yields definitively superior results. This can be explained by a poor relationship between the HDOP parameter and the error \(r_{e}\). Since \(r_{e}\) can assume only positive values, the Gaussian function \(p_{\mathrm{GPS}}(r_{e},\sigma_{\mathrm{GPS}})\) is accordingly scaled by a factor of 2. The coefficient \(\beta_{\mathrm{GPS}}\) in Equation (9) is chosen by trial and error. \[p_{\mathrm{GPS}}(r_{e},\sigma_{\mathrm{GPS}}) =\frac{2}{\sqrt{2\pi}\sigma_{\mathrm{GPS}}}\exp\left(-\frac{r_{ e}^{2}}{2\sigma_{\mathrm{GPS}}^{2}}\right) \tag{7}\] \[r_{e} =\sqrt{\tilde{x}^{2}+\tilde{y}^{2}}\] (8) \[\sigma_{\mathrm{GPS}} =\beta_{\mathrm{GPS}}\mathrm{HDOP} \tag{9}\]  
If a GPS receiver loses track of satellites, prediction of its position is based on the previous velocities and position. The first order autocorrelation coefficients for \(\tilde{x}\) and \(\tilde{y}\) were calculated for a 2.6 km path--see Equation (10). They had considerable values of \(a_{x}\approx a_{y}\approx 0.86\). Thus \(\tilde{x}\) and \(\tilde{y}\) can be modelled by Equation (11), which is known as exponentially correlated noise. \[a=\frac{\sum\limits_{t=1}^{n-1}\tilde{x}(t)\tilde{x}(t+1)}{\sum\limits_{t=1}^{n-1 }\tilde{x}(t)^{2}} \tag{10}\]  
\[\left[ \begin{array}{c}\tilde{x}(t)\\ \tilde{y}(t)\end{array} \right]=\left[ \begin{array}{cc}a_{x}&0\\ 0&a_{y}\end{array} \right]\left[ \begin{array}{c}\tilde{x}(t-1)\\ \tilde{y}(t-1)\end{array} \right]+\left[ \begin{array}{c}v_{x}(t)\\ v_{y}(t)\end{array} \right] \tag{11}\]  
where \(v_{x}(t)\) and \(v_{y}(t)\) are random realizations of white noise, whereby \(E[v_{x}^{2}(t)]=(1-a_{x}^{2})\sigma_{x}^{2}\) and \(E[v_{y}^{2}(t)]=(1-a_{y}^{2})\sigma_{y}^{2}\).