Formula

    \[   \bar{\theta} = 0 \rightarrow (\bar{cos({\theta_i})},\bar{sin({\theta_i})}) \]

Variables

\theta_i= all bearings of a GPS track

\bar\theta= average bearing of a GPS track

Explanation

To determine the average bearing of a GPS track u: 1

1. Get the bearings \theta_i of all coordinates

On the page “Bearing of 2 GPS coordinates” I explain how you can determine the bearings.

2. Convert the bearings \theta_i to unit vectors \hat{u}_i

    \[ \hat{u}_i = \begin{bmatrix} x_i \\ y_i \end{bmatrix} = \begin{bmatrix} sin({\theta_i}) \\ cos({\theta_i}) \end{bmatrix} \]

3. Take the average of the unit vector \bar{\hat{u}}

    \[ \bar{\hat{u}} = \begin{bmatrix} \bar{x} \\ \bar{y} \end{bmatrix} \]

4. convert the average unit vector back to a bearing \bar{{b}}

To convert the average unit vector \bar{\hat{u}} back to a bearing \bar{\theta} you can use atan2.

\hat{\theta} = atan2(\hat{x},\hat{y})

Examples

Mathmatical example

b_i = (45^{\circ}, -23^{\circ},15^{\circ})

\hat{u}_i = ( \begin{bmatrix} \sin(45^{\circ}) \\ \cos(45^{\circ}) \end{bmatrix}, \begin{bmatrix} \sin(-23^{\circ}) \\ \cos(-23^{\circ}) \end{bmatrix}, \begin{bmatrix} \sin(15^{\circ}) \\ \cos(15^{\circ}) \end{bmatrix} ) = ( \begin{bmatrix} 0.707 \\ 0.707 \end{bmatrix}, \begin{bmatrix} -0.390 \\ 0.920 \end{bmatrix}, \begin{bmatrix} 0.258 \\ 0.965 \end{bmatrix} )

\bar{\hat{u}} = \begin{bmatrix} 0.191 \\ 0.864 \end{bmatrix}

\hat{\theta} = atan2(0.192, 0.865) = 12.505


Leave a Reply

Your email address will not be published. Required fields are marked *