## Abstract

The spatial orientation of a geological feature is commonly specified by the dip angle and azimuth of the fall line. Both angles are measured using a geological compass (GC). A conventional GC needs to be levelled before the magnetic azimuth can be read. We have developed a digital geological compass (DiGC) that does not require levelling; it can be manufactured small and lightweight, and yields accurate dip angle and azimuth measures within less than a second. We introduce the concept of such a DiGC, based on an assembly of three accelerometers and three magnetometers, discuss the computation of dip angle and azimuth, and present results from a series of test measurements confirming that a precision of better than 1° (1σ) can be obtained.

The study of 3D structures and regions is essential for estimating the tectonic history and geological environment, and for assessing deformation processes. The key data for studies in structural geology as well as in engineering geology are the strike/dip azimuth (*α*) and the dip angle (*θ*) of geological features (Carlson *et al.* 2006). Numerical values of these measures are derived from field measurements using a geological compass (GC), which is still the fundamental instrument used in geological field work.

To determine the 3D orientation of a geological feature, the small swivelling test plate of the GC needs to be attached to the feature while at the same time the magnetic compass needs to be levelled (see Fig. 1). Accurate levelling is crucial but can render it very difficult to handle a GC properly in certain situations, and taking measurements usually requires both hands of the geologist.

The precision of the measurements is determined by the reading devices. A conventional GC has graduation lines every 2° for the horizontal circle and every 5° for the dip angle. The standard deviation of the raw readings can be estimated as about one-third of the respective graduation interval. Because of the limited accuracy of representing a geological feature by locally attaching a rather small test plate, the attainable precision of *α* and *θ* is typically no better than 2°. Further sources of possibly much larger errors are inadequate levelling as a result of difficult GC handling, visual observation of the spot level, visual reading of the graduation, and the subsequent manual recording of the compass data.

We have investigated a digital geological compass (DiGC; patent pending), which overcomes most of the problems associated with a conventional GC. A DiGC still uses a small test plate to represent the surface of the feature. However, the DiGC does not require levelling and the test plate is fixed, not swivelling. The levelling is performed mathematically as part of the evaluation algorithm. Such a digital geological compass may thus be called a mathematically self-levelling geological compass (GC-MSL; patent pending). Measurements are taken electronically and can be recorded internally in the device. The dip angle is referenced to the local vertical using accelerometer measurements of the local gravity vector. The azimuth (strike/dip direction) is derived from magnetometer measurements of the local magnetic field vector. The combination of a magnetic compass with inclinometers and possibly other sensors has already been applied to navigation (e.g. Caruso 1997). However, the adaptation of such a sensor assembly for geological measurements and the derivation of the required data-processing algorithms represent a novel approach. The principal innovative features of a DiGC are as follows: (1) the compulsory levelling of the geological compass becomes obsolete; (2) there are no restrictions on the 3D orientation of the DiGC while taking readings (e.g. the DiGC can even be used vertically or upside down); (3) all data are readily available in digital form.

First, we summarize the theoretical background of measuring and processing accelerometer and magnetometer data to derive the dip angle and the magnetic azimuth of strike/dip. We then describe the instruments used for feasibility tests, and give the results from the first field tests. These confirm the feasibility and benefits of a DiGC, which provides significant improvements in handling, precision and data reliability. Further processing of the digital data obtained from a DiGC can easily be achieved (e.g. to derive statistical information or automatically create pole diagrams); however, this is not the subject of the present paper.

## Theoretical background

An assembly of three accelerometers and three magnetometers can be used to determine the local gravity vector and the local Earth magnetic field vector in a body-fixed coordinate system. We assume that this coordinate system is orthogonal, with its *xy*-plane being plane of the test plate of the DiGC (e.g. one face of the housing). For simplified data processing and for optimum accuracy over all possible dip angles and dip directions, the individual sensors are aligned with the axes of the body-fixed coordinate system, thus forming perfectly orthogonal and mutually aligned accelerometer and magnetometer triads.

In the introduction, we stated that the DiGC can, without levelling, be held against the geological surface and will yield accurate measures of the azimuth *α* and the dip angle *θ*. In fact, *α* and *θ* can be computed from the sensor output by exploiting the relation between the body-fixed coordinate system (*x*^{b}*y*^{b}*z*^{b}) and the local-level coordinate system. Here, we assume that the latter is defined by the local vertical (‘up’; i.e. opposite to the gravity vector), and by the local magnetic North direction (see Fig. 2).

### Dip angle

For the mathematical derivations we start with the sensor being attached to the geological feature (see Fig. 2). Therefore, the fall line of the geological feature is contained in the *x*^{b}*y*^{b} plane, but not generally aligned with either axis. To achieve this alignment, we rotate the body-fixed coordinate system about its *z*^{b}-axis by an angle *ω* such that the resulting *x*-axis (*x*^{1}) points along the fall line (see Fig. 3a): $$mathtex$$\[\left[\begin{array}{l}x^{1}\\y^{1}\\z^{1}\end{array}\right]{\,}{=}{\,}\left[\begin{array}{lll}cos{\omega}&sin{\omega}&0\\{\,}{-}{\,}sin{\omega}&cos{\omega}&0\\0&0&1\end{array}\right]\left[\begin{array}{l}x^{b}\\y^{b}\\z^{b}\end{array}\right].\]$$mathtex$$(1) The angle between the *x*^{1}-axis and the local horizon is exactly the required dip angle *θ*, and the *y*^{1}-axis is horizontal. Therefore, we obtain a coordinate system whose *z*-axis points upward (along the local vertical) and whose *x*-axis is horizontal and points along the azimuth *α* when rotating the (*x*^{1}*y*^{1}*z*^{1}) coordinate system by −*θ* about the *y*^{1}-axis (see Fig. 3b): $$mathtex$$\[\left[\begin{array}{l}x^{2}\\y^{2}\\z^{2}\end{array}\right]{\,}{=}{\,}\left[\begin{array}{lll}cos{\theta}&0&sin{\theta}\\0&1&0\\{\,}{-}{\,}sin{\theta}&0&cos{\theta}\end{array}\right]\left[\begin{array}{l}x^{1}\\y^{1}\\z^{1}\end{array}\right].\]$$mathtex$$(2) Combining both rotations (1) and (2) gives $$mathtex$$\[\left[\begin{array}{l}x^{2}\\y^{2}\\z^{2}\end{array}\right]{\,}{=}{\,}\begin{array}{l}\ \\R\\{\_}\end{array}({\theta},{\omega})\left[\begin{array}{l}x^{b}\\y^{b}\\z^{b}\end{array}\right]{\,}{=}{\,}\left[\begin{array}{lll}cos{\theta}cos{\omega}&cos{\theta}sin{\omega}&sin{\theta}\\{\,}{-}{\,}sin{\omega}&cos{\omega}&0\\{\,}{-}{\,}sin{\theta}cos{\omega}&{\,}{-}{\,}sin{\theta}sin{\omega}&cos{\theta}\end{array}\right]{\cdot}\left[\begin{array}{l}x^{b}\\y^{b}\\z^{b}\end{array}\right].\]$$mathtex$$(3) Considering the original acceleration measurements ($$mathtex$$\({\mathit{a_{\mathit{x}}^{b}},{\mathit{a_{\mathit{y}}^{b}},{\mathit{a_{\mathit{z}}^{b}}\)$$mathtex$$) in the body-fixed coordinate system, we realize that their transformation into the (*x*^{2}*y*^{2}*z*^{2}) system must yield the components of the local gravity vector: $$mathtex$$\[\left[\begin{array}{l}{a_{x}^{2}}\\{a_{y}^{2}}\\{a_{z}^{2}}\end{array}\right]{\,}{=}{\,}\left[\begin{array}{l}0\\0\\{\,}{-}{\,}g\end{array}\right]{\,}{=}{\,}\begin{array}{l}\ \\R\\{\_}\end{array}({\theta},{\omega})\left[\begin{array}{l}{a_{x}^{b}}\\{a_{y}^{b}}\\{a_{z}^{b}}\end{array}\right].\]$$mathtex$$(4) Thus, equation (4) represents an equation system from which the unknown angles *ω* and *θ* can be computed (knowledge of *g* is not required). Mathematically, there are two solutions to equation (4), one with *x*^{1} pointing downward and one with *x*^{1} pointing upward along the fall line. By including the constraint that the dip shall always point downwards (i.e. sin *θ* >0), this ambiguity can be solved and a unique solution is obtained as follows: $$mathtex$$\[{\omega}{\,}{=}{\,}atan\left(\frac{{a_{y}^{b}}}{{a_{x}^{b}}}\right)\]$$mathtex$$(5) $$mathtex$$\[{\vartheta}{\,}{=}{\,}atan\left(\frac{{a_{x}^{b}}cos{\omega}{\,}{+}{\,}{a_{y}^{b}}sin{\omega}}{{\,}{-}{\,}{a_{z}^{b}}}\right){\,}{=}{\,}atan\frac{\sqrt{\left({a_{x}^{b}}\right)^{2}{\,}{+}{\,}\left({a_{y}^{b}}\right)^{2}}}{{\,}{-}{\,}{a_{z}^{b}}}.\]$$mathtex$$(6) It should be noted that *ω* is undetermined if the dip angle is zero (there is no fall line in this case), but that equation (6) yields the correct value of *θ* even in this case. The signs of the numerator and denominator of the arguments to the atan function determine the quadrant of the respective angles computed using equations (5) and (6). Therefore, these signs should not be changed, and we recommend using the atan2 function supplied with several programming languages for an implementation of the equations. This function takes the numerator and denominator as separate arguments and implicitly handles the quadrant and special cases properly (e.g. denominator zero).

Equation (6) shows that all three original acceleration measurements are required to compute the dip angle. It is not possible to determine it using only two accelerometers, unless restrictions on the 3D orientation of the DiGC are applied and the magnitude of *g* is known.

### Dip azimuth

The projection of the Earth magnetic field vector onto the horizontal (*x*^{2}*y*^{2})-plane defines magnetic north in that plane (see Fig. 3c). The angle *α* counted clockwise from that projection to the *x*^{2}-axis is the dip azimuth that would also be measured with a levelled conventional GC. However, the projection can be computed from the original magnetometer measurements ($$mathtex$$\({\mathit{m_{\mathit{x}}^{b}},{\mathit{m_{\mathit{y}}^{b}},{\mathit{m_{\mathit{z}}^{b}}\)$$mathtex$$) taken in the body-fixed frame by transforming them into the (*x*^{2}*y*^{2}*z*^{2}) system using equation (3), thus replacing physical levelling of the DiGC with mathematical rectification: $$mathtex$$\[\left[\begin{array}{l}{m_{x}^{2}}\\{m_{y}^{2}}\\{m_{z}^{2}}\end{array}\right]{\,}{=}{\,}\begin{array}{l}\ \\R\\{\_}\end{array}({\theta},{\omega})\left[\begin{array}{l}{m_{x}^{b}}\\{m_{y}^{b}}\\{m_{z}^{b}}\end{array}\right].\]$$mathtex$$(7) *α* can then be computed from $$mathtex$$\[tan{\alpha}{\,}{=}{\,}\frac{{m_{y}^{2}}}{{m_{z}^{2}}}.\]$$mathtex$$(8) Substituting equation (8) into equation (7) finally yields (again, we recommend using the atan2 function for an implementation of this equation) $$mathtex$$\[{\alpha}{\,}{=}{\,}atan\left(\frac{{\,}{-}{\,}{m_{x}^{b}}sin{\omega}{\,}{+}{\,}{m_{y}^{b}}cos{\omega}}{{m_{x}^{b}}cos{\theta}cos{\omega}{\,}{+}{\,}{m_{y}^{b}}cos{\theta}sin{\omega}{\,}{+}{\,}{m_{z}^{b}}sin{\theta}}\right).\]$$mathtex$$(9) The strike azimuth, when preferred over the dip azimuth, can be obtained by subtracting 90° from *α*. Strike will not be considered further in this paper.

Equation (9) clearly shows that all three components of the magnetic field vector must be measured in the body-fixed coordinate system to determine the dip azimuth. If the geological feature to be measured is horizontal, then of course its azimuth *α* (like *ω*) is undetermined. This is a fundamental geometric property rather than a weakness of the DiGC, and affects all compasses.

Numerically, equation (6) yields values of *θ* between zero and 180°. To account for the usual definition of dipangles, we finally introduce the computed dip angle *θ*′ and azimuth *α*′ such that always 0 ≤ *θ*′ ≤ 90°: $$mathtex$$\[{\theta}{^\prime}{\,}{=}{\,}\left\{\begin{array}{l}{\theta}\\180{^\circ}{\,}{-}{\,}{\theta}\end{array}{\ }{\ }{\ }\begin{array}{l}...{\ }if{\ }{\theta}{\leq}90{^\circ}\\...{\ }if{\ }{\theta}{>}90{^\circ}{\ }\end{array}\right.\]$$mathtex$$(10)

$$mathtex$$\[{\alpha}{^\prime}{\,}{=}{\,}\left\{\begin{array}{l}{\alpha}\\{\alpha}{\,}{+}{\,}180{^\circ}\end{array}{\ }{\ }{\ }\begin{array}{l}...{\ }if{\ }{\theta}{\leq}90{^\circ}\\...{\ }if{\ }{\theta}{>}90{^\circ}{\ }.\end{array}\right.\]$$mathtex$$(11)

### Sensor calibration

So far, we have assumed that the three acceleration sensors and the three magnetometers are perfectly orthogonal and perfectly aligned with the body fixed coordinate system. Such a sensor assembly cannot be manufactured. Furthermore, we assumed that the individual sensor output equals exactly the projection of the corresponding vector (gravity or magnetic field) onto the sensor axis. In reality, the output of such sensors is affected by biases (non-zero output with zero input), scale factor errors, random noise and higher-order errors (see, e.g. Lawrence 1998).

Most of these errors (alignment errors and sensor errors) can be calibrated beforehand and easily corrected for in real time, such that the corrected measurements represent the values $$mathtex$$\({\mathit{a_{\mathit{x}}^{b}},{\ }...,{\ }{\mathit{m_{\mathit{z}}^{b}}\)$$mathtex$$ used above. Stork (2000) has provided useful information about the calibration of the sensor misalignment, and gave the ‘rule-of-thumb’ that the degree of non-orthogonality will create a similar degree of error in the measured azimuth of an electronic compass. Liu *et al*. (1989) concluded from an experimental analysis of error influences on the calibration of the magnetic compass that calibration improved the azimuth results significantly from about 8° without calibration to about 0.3° when using the calibration results. These findings are applicable to the DiGC; however, a detailed analysis will be needed to investigate how misalignments and sensor errors at extreme dip angles (small or large) affect the accuracy of the computed azimuth.

Furthermore, the errors may additionally vary slowly over time and depend on sensor temperature. Whereas the former effect must be included in the error budget of the DiGC or mitigated by selecting sensors that exhibit low drift, the latter effect can be modelled and corrected for if also a digital temperature sensor is included in the DiGC.

In this paper we shall present experimental results confirming that a precision of 1° for both azimuth and dip angle can easily be achieved with various DiGC 3D orientations.

### Mitigating random errors

Inevitable random noise can be mitigated by averaging raw sensor output over a suitable time interval. This also allows for quality control of the raw data; for example, to detect whether the sensor is sufficiently static during the measurement period. A generally valid optimum averaging time cannot be given; a suitable time needs to be found depending on the noise characteristics of the sensors contained in the DiGC. An indication is given by the feasibility test described below.

## Equipment used for experimental investigation

### Test DiGC

Initially, several commercial 3D magnetometers and accelerometers were considered for assembling a prototype DiGC. However, for the first tests we found it more economical to acquire a low-cost inertial measurement unit (IMU) that incorporates three magnetometers along with its gyros, accelerometers and a temperature sensor, and to use only the sensor output of sensors that would also be needed in a DiGC.

The equipment selected is the XSens Technologies Motion Tracker MT9-A, Xsens (2003) (see Fig. 4). Its size is only 54 mm × 39 mm × 28 mm, and it weighs 35 g. The MT9-A consists of three solid-state accelerometers, three thin-film magnetometers, three rate- of-turn sensors, and one temperature sensor. This multi-sensor system is primarily used for human motion measurement (Veltink *et al*. 2003) and machine motion control or stabilization of lightweight unmanned aerial vehicles and helicopters (Veltink *et al*. 2003).

After calibration of the sensor unit using software that we developed for this purpose, the accelerometer and magnetometer outputs refer to axes aligned with the body-fixed coordinate system within about 0.3°. Raw sensor data (100 Hz) are output by the MT9-A via its serial interface and can be recorded on a laptop computer. We then post-process these raw sensor data using MATLAB, where post-processing typically consists of: (1) conversion from raw data to calibrated sensor output ($$mathtex$$\({\mathit{a_{\mathit{x}}^{b}},{\ }...,{\ }{\mathit{m_{\mathit{z}}^{b}}\)$$mathtex$$); (2) reducing the data rate by averaging consecutive 50 epochs, which yields 2 Hz data; (3) computation of dip angle and azimuth using equations (5), (6), (9) and (10).

Recording and post-processing of the raw data allows for extensive data analysis. However, all the algorithms that we used can be implemented in a DiGC for real-time operation, and post-processing will no longer be necessary.

### Test jig

To allow for extensive testing of a DiGC, we designed a non-magnetic and non-ferrous test jig (see Fig. 4). This jig allows the DiGC to be rigidly attached and thus removes the uncertainty associated with holding the DiGC against a real geological feature. The test results obtained using the jig represent the attainable accuracy of dip angle and azimuth of the DiGC test plate. The additional uncertainty produced by roughness or limited visibility of the geological feature when actually applying the compass for geological field work is identical for the conventional GC and for a DiGC and will thus not be investigated here.

Using the jig, the DiGC can be inclined from 0° to 90° in steps of 15°; it can be rotated 360° in azimuth, and it can also be rotated with respect to the fall line within the inclined plane. The azimuth difference between the jig's zero marker and the fall line of the tilted jig plane can be read from a 1° graduation; the other angles are known from the respective notches and bolts used to fix the jig. The accuracy of these angle increments is better than 0.3°, which was considered sufficient for a targeted DiGC angular resolution of 2°.

## Field test

We have studied the feasibility of a DiGC using several field and laboratory experiments. Here, we report on a field test that demonstrates the overall performance as obtained using the above low-cost sensor once it has been properly calibrated.

The field test was carried out in a quarry that is situated in non-magnetic bedrock. To provide a stable reference, the jig was mounted on a layer of plaster (see Fig. 5) and was carefully levelled using a precision spirit level. A Suunto KB-14 sighting compass and aBreithaupt GEKOM geological compass were used to determine the magnetic azimuth of the jig; the two compasses differed by about 3°, and the average of the Suunto values was selected because of the better consistency (range <1°).

The jig's top plane was then inclined in steps of 15° (*θ* = 15°,30°,45°,60°,75°,90°) and at each step rotated 360° about the vertical axis (in steps of 10–15°). *θ* = 0° was not included because at this dip angle the azimuth is undetermined, as stated above.

At each of the plane's orientations, the sensor was static for about 10–20 s, and raw sensor output was recorded at 100 Hz. The dip angle and azimuth were then computed separately from each consecutive batch of 50 epochs (0.5 s) of raw data. It should be noted that the MT9-A was rigidly attached to the jig's top plane throughout the test, and none of its axes was aligned with the fall line (see Fig. 5).

Figure 6 shows the deviations *δθ* = *θ*′ − *θ*^{jig} and *δα* = *α*′ − *α*^{jig} of the computed dip angle and azimuth from the respective setting (and graduation reading) of the jig. The plot represents more than 5000 pairs of computed values of *θ* and *α* covering the full azimuth range of 360° and an inclination range of 75°.

The non-zero mean values (−0.1° for *δθ*, and 1.3° for *δα*) are probably not biases of the DiGC; rather, they hint at a slight rotation of the jig's inclination notches (nominally 15°, 30°, etc.) with respect to its vertical axis, and at a bias of the Suunto compass readings used to establish the jig's orientation. (When using the Breithaupt compass readings for that purpose, the mean value of *δα* is about −1.8° instead of +1.3°.)

The standard deviation of *δθ* and *δα* is 0.1° and 0.5°, respectively. All dip angle deviations and most of the azimuth deviations are within ±1° about the respective mean value (shaded area in Fig. 6). This indicates remarkably high precision, given the short measurement time of only 0.5 s per sample, and the contribution of the jig (slackness, and standard deviation of graduation reading were estimated within about 0.1–0.2°). Using a few seconds of data, the computed dip angle and azimuth output by the DiGC can later even be statistically controlled.

## Conclusion and outlook

We have shown that a digital geological compass (DiGC) can be developed, which does not require the levelling of the compass. Instead of a swivelling plate, the new DiGC itself is attached to the geological surface in any suitable orientation. The sensors required for the DiGC are a 3D accelerometer and a 3D magnetic field sensor. Experimental results showed that the azimuth and dip angle of the fall line can be obtained with a precision better than 1° using a few seconds of data from these two sensor triads.

The main advantages of the new DiGC in comparison with a conventional GC are: (1) levelling of the GC is no longer required; (2) attaching the test plate of the DiGC to the geological feature is possible in any suitable orientation; (3) there are no movable parts (one face of the housing can be the test plate); (4) it allows for true one-hand operation; (5) it saves time in the measurementprocess; (6) it outputs digital data; (7) it provides high data security.

Obviously, the DiGC could be further developed by (1) using wireless communication with a (pocket) PC in the field, (2) including automatic location tags derived using GPS, (3) optionally converting azimuths from magnetic North to geographical North, (4) detection of magnetic rock and correction of local magnetic field deviations, (5) measuring the components of linear elements in addition to the fall lines of surfaces, (6) analysing the data on-line in the field and providing statistical information (standard errors, confidence intervals) or automatically created pole diagrams in real time.

As mentioned above, for the purpose of a first experimental proof of concept, we used a commercially available low-cost inertial measurement unit. Future work will include the selection of the optimum sensor elements, the realization of wireless data transmission, a study of environmental effects (temperature), the optimization of the calibration procedure, and an error analysis including random and systematic effects.

## Acknowledgements

The Austrian Academy of Sciences supported this research as part of the project ‘GPS monitoring of alpine mass movements’ within the International Natural Disaster Reduction Program. Dr R. Scholger (University of Leoben, Austria) has granted access to the facilities of the Palaeomagnetic Laboratory in Gams. P. Slyke of Xsens Technologies provided many useful hints on using the MT9-A equipment. Discussions with K.-H. Gutjahr were very helpful. R. Presl and R. Lummerstorfer are acknowledged for their invaluable assistance in the laboratory and field work.

- © 2007 The Geological Society of London