Journal Pre-proof Assessment of the accuracy of several methods for measuring the spatial attitude of geological bodies using an Android smartphone
Jue Wang, Nengpan Ju, Chaoyang He, Junchao Cai, Da Zheng PII:
S0098-3004(19)30399-1
DOI:
https://doi.org/10.1016/j.cageo.2019.104393
Reference:
CAGEO 104393
To appear in:
Computers and Geosciences
Received Date:
28 April 2019
Accepted Date:
28 November 2019
Please cite this article as: Jue Wang, Nengpan Ju, Chaoyang He, Junchao Cai, Da Zheng, Assessment of the accuracy of several methods for measuring the spatial attitude of geological bodies using an Android smartphone, Computers and Geosciences (2019), https://doi.org/10.1016/j. cageo.2019.104393
This is a PDF file of an article that has undergone enhancements after acceptance, such as the addition of a cover page and metadata, and formatting for readability, but it is not yet the definitive version of record. This version will undergo additional copyediting, typesetting and review before it is published in its final form, but we are providing this version to give early visibility of the article. Please note that, during the production process, errors may be discovered which could affect the content, and all legal disclaimers that apply to the journal pertain. © 2019 Published by Elsevier.
Journal Pre-proof
Assessment of the accuracy of several methods for measuring the spatial attitude of geological bodies using an Android smartphone
Jue Wang, Nengpan Ju, Chaoyang He, Junchao Cai, Da Zheng1 State Key Laboratory of Geological Hazard Prevention and Geological Environment Protection, Chengdu University of Technology, Chengdu 610059, Sichuan, China
Abstract: Spatial attitudes are widely used in geological field investigations, to describe the geometry of geological structural surfaces. Smartphones have a variety of sensors that can be used to obtain these measurements. This paper examines several methods for measuring attitudes using smartphones and analyzes the principles and calculation formulas of these methods. We programmed an Android application to test and analyze the accuracy of different calculation methods. We propose the use of an orientation angle to quantitatively describe the position of the smartphone during measurement. We designed and manufactured a test platform that can change three angles separately, thereby greatly increasing the convenience of the test. The results show that the trigonometric function method can deliver an accurate measurement regardless of the orientation of the phone, and this method is convenient and quick to use.
1
Jue Wang, mainly responsible for the writing of the article and most of the experiments and analysis work;
Nengpan Ju, gave guidance on experiments and ideas; Chaoyang He, gave guidance on the programming of Android applications; Junchao Cai, helped in the process of testing and analysis; Da Zheng, helped in the design and manufacture of the test platform.
1
Journal Pre-proof
1 Introduction Smartphones are employed not only to surf the internet, watch videos, and play games but also to find locations and get directions. To perform these functions, smartphones have an array of sensors to determine device orientation and position. These sensors include GPS receivers, accelerometers, gyroscopes, magnetometers, and even barometers. With the aid of these sensors, it is possible to determine device orientation, position, velocity, and both linear and rotational acceleration (Allmendinger et al., 2017). Smartphones can be utilized in the field of geosciences for various purposes due to their multifaceted abilities that combine both hard- and software features (Lee et al., 2018). Many geologists have taken advantage of smartphones in geological work, such as taking photos, positioning, recording, and slope stability analysis (He et al., 2018; Marcai et al., 2015; Tien Bui et al., 2015; Wang et al., 2016; Wolniewicz, 2014). Some researchers have realized that smartphone sensors can also be used to determine the spatial attitude of the phone, and thus, the smartphone can be placed on a geological surface to directly measure its orientation. These researchers have conducted analyses and proposed different algorithms to describe the spatial information provided by smartphone. At present, there are many smartphone apps that can measure spatial attitudes, such as eGEO Compass, Field compass, FieldMove Clino, GeoClino, Structural Compass, et al. Smartphone apps for spatial attitudes measurement currently available on the Android and iOS platform are incompletely summarized in Table 1. Table 1
Name 3D Geocompass Clinometer compass eGEO Compass FieldMove Clino FieldMove Clino GeoClino for Android GeoClino for iPhone Geocompass
List of smartphone apps for spatial attitudes measurement
Developer Edison Wang Yu Saito Marco Foi Midland Vally Exploration Ltd Midland Vally GSI CO., LTD Geological Survey of Japan, AIST Luca Innocentu 2
Platform Android iOS Android Android iOS Android iOS android
Accessibility Free Pay for download Free, pay for full features Free Free Free, pay for full features Free Free
Journal Pre-proof GeoCompass 2 - Geologist’s Compass GeoID Geological Compass Geostation Lambert PocketTransit Rockd Rocklogger Sterenet Mobile Strike and Dip Structural Compass
HUNG HSUN LIN Engineering Geology & GIS Lab., SNU. THSoft Co., Ltd. Geomecanica Apps Peter Apple Thomas Redfield University of Wisconsin-Madison Shared Apps RockGecko Richard Allmendinger Hunt Mountain Software Apps Medion
iOS
Pay for download
iOS
Pay for download
Android Android iOS iOS
Free, pay for full features Free, pay for full features Pay for download Free, pay for full features
iOS
Free
Android iOS iOS Android
Free, pay for full features Free Pay for download Free
Novakova and Pavlis (2017) compared and analyzed the results of different geological compass applications available for the Android platform. They showed that although it is fast and convenient to use the smartphone for field measurements, the accuracy of the different software and hardware is variable. The shortcoming of this study is that tested outcrops are insufficient in number to find a regular error pattern of the measurements at different orientations. Furthermore, we do not know the algorithms of each application, so we cannot optimize and improve algorithms. Many researchers have described how they use their smartphones to measure spatial attitudes. Weng et al. (2012) rotated the phone to a specific angle and then read the values of the orientation sensor as dip direction and dip angle. Lee et al. (2013) calculated the orientation by analyzing the relationship between sensor value vectors and the surface being measured. Hama et al. (2014) use the device attitude class called CMAttitude which is unique to the iOS system to calculate dip direction and dip angle. Allmendinger et al. (2017) developed an iOS software Stereonet Mobile which uses the rotation matrix to calculate the orientation of the phone. Cheng et al. (2017) calculated the rotation matrix of the phone from the initial attitude to measure attitude and further calculate the orientation. In this research, we analyzed the relationship between the values of the orientation sensor and the geological body, using trigonometric functions to calculate the spatial parameters. To compare and analyze the applicability and accuracy of different calculation methods, we programed a test application and designed and manufactured a test 3
Journal Pre-proof platform. We tested these methods under different conditions and analyzed the calculation results.
2 Background Theory Since Android is the most widely used smartphone system in the world, we chose Android for research. In terms of coordinate systems and sensors, iOS and Android systems have similar definitions.
2.1 Android platform coordinate system
Fig. 1. Three-dimensional coordinate system
To accurately describe the values of different sensors, the Android system establishes a three-dimensional coordinate system based on the direction of the phone itself. As in Fig. 1, the 3 axes are orthogonal to each other with the center of the phone as the origin point. The X-axis is parallel to the short side of the smartphone screen and is positive to the right; the Y-axis is parallel to the long side of the smartphone screen, and the direction of the earphone is positive; and the Z-axis is perpendicular to the screen of the smartphone and is positive outward the screen. 4
Journal Pre-proof When the phone rotates, the coordinate system rotates with the phone, and the relationship between the axis and the screen remains unchanged.
2.2 Android platform sensors For Android smartphones, there are 3 sensors can be used to determine device orientation: the acceleration sensor, magnetic field sensor, and orientation sensor. The acceleration sensor and magnetic field sensor are real, physical sensors, while the orientation sensor is a virtual sensor calculated by the previous 2 sensors. Each sensor can obtain 3 values, and the values describe the x, y, and z axes of the device coordinates. The acceleration sensor is a sensor that can obtain the acceleration of the 3 axes, represented as a 3-numbered array containing the acceleration values (unit: m/s2) of the x, y, and z axes. The magnetic field sensor obtains the magnetic field intensity of the 3 axes, represented as a 3-numbered array, which describes the magnetic field intensity (unit: μT) of the x, y, and z axes. The orientation sensor is a sensor that provides the angles of the 3 rotational angles of the phone, namely: the azimuth, the angle between the positive direction of the Y-axis and the north direction; pitch, the angle of the phone rotates around the X-axis; and roll, the angle of the phone rotates around the Y-axis.
3 Acquisition of dip direction and dip data Many researchers have introduced their methods of using smartphones to obtain spatial attitudes. The following are four calculation methods that can be implemented on the Android platform, including: 1. Direct reading method, proposed by Weng et al. (2012); 2. Vector method, proposed by Lee et al. (2013); 3. Rotation matrix method, proposed by Cheng (2017); 4. Trigonometric function method, proposed by the author. 5
Journal Pre-proof The following are the specific calculation processes for these methods.
3.1 Direct Reading Method Weng et al. (2012) introduced an Android phone application, GeoTools, that is adapted to measure strike and dip of any planar feature. When measuring a surface, users need to place the phone in a readable portrait fashion onto the surface so that the lengthwise dimension conforms to the dip direction of the surface, and the short ends of the phone represent the strike direction of the surface if the phone is adjusted to the level of X-Y plane as sensed by the accelerometer. The attainment of such an alignment is indicated when the ‘‘level’’ recorded by the app reads zero. In the meantime, it measures the inclination along the lengthwise dimension of the surface, that is the dip angle. This method is advantageous because it makes direct use of the output from the orientation sensor, eliminating potential ambiguities like sign errors or inverse trigonometric function errors in computer codes.
3.2 Vector Method Lee et al. (2013) calculates the strike and dip by analyze the relationship between the sensor data vectors and the orientation of the smartphone. They use a 3-dimensional vector G (Gx, Gy, Gz) to record the data acquired by the acceleration sensor, and another vector M (Mx, My, Mz) for the magnetic field sensor. The vector normal to the screen is equal to N (0, 0, ±1).
6
Journal Pre-proof
Fig. 2 Schematic diagram of the vector method (modified after Lee et al., 2013)
The spatial relationship of each vector is shown in Fig. 2, different colors represent different planes. M is toward the magnetic north, usually not on the horizontal plane. G is facing downwards, N is normal to the screen plane, G and N are on the vertical plane. When the screen of the smartphone is facing up, the vector N = (0, 0, -1), and the direction of the N vector is as illustrated in Fig. 2, otherwise, N = (0, 0, 1). The cross product of these vectors, G×M, is a vector directed to the east (90 degrees) on the horizontal plane, G× N, is parallel to the smartphone screen and normal to the direction of gravity, thus equal to the strike of the screen plane, both on the screen plane and the horizontal plane. The calculation of the dip angle is relatively simple, the dip angle d is equal to the angle between the N vector and the G vector (Fig. 2). The relationship between the d, N and G is as follows: 𝑁 ∙ 𝐺 = |𝑁||𝐺|cos 𝑑
(1)
After substitute N= (0, 0, ±1) and rearranging, the formula for calculating the dip angle is as follows: 7
Journal Pre-proof 𝑑 = cos ―1
𝐺𝑧
| | |𝐺|
(2)
Lee et al. (2013) do not have a specific description of the dip direction calculation method. From our perspective, the detailed calculation steps are as follows: As M vector is usually not on the horizontal plane, the direction of strike is not equal to the angle between G × N vector and M vector. We need two vectors both on the horizontal plane to calculate the direction of strike. The two vectors are the strike vector S = G × N, and the east vector E = G × M. The angle between these vectors is therefore the angle between the strike line and magnetic east. We define θ as the angle between the S vector and the E vector, we can get the relationship between θ, S and E as follows: 𝑆 ∙ 𝐸 = |𝑆||𝐸|cos 𝜃
(3)
After rearranging, θ can be calculated by using the following equation. 𝑆∙𝐸
𝜃 = cos ―1 |𝑆||𝐸|
(4)
Since 0° ≤ θ ≤ 180°, the azimuth of the strike (vector S) cannot be directly obtained by the angle value (90°) of the E vector. It is also necessary to determine the positional relationship between the S vector and the E vector. The positional relationship between two two-dimensional vectors can be simply judged by the positive or negative of the result of the cross-multiplication. We found that if the E vector is projected to the screen plane, the positional relationship between the S'= (Sx, Sy) and the E' = (Ex, Ey) is similar to the positional relationship between S and E. At this time, both the S' and E' vectors are in the smartphone coordinate system, eliminating the complicated coordinate system conversion process. Therefore, the positional relationship between the S vector and the E vector can be obtained by calculating the positional relationship between the S' vector and the E' vector.
8
Journal Pre-proof
Fig. 3 Relationship between the Strike and the East
Specifically, we first calculate the cross-multiplication of the S' vector and the E' vector, 𝑆' × 𝐸' = 𝑆𝑥𝐸𝑦 ― 𝑆𝑦𝐸𝑥. If the result is positive, the direction is in the clockwise direction from east, otherwise it is in the counterclockwise direction. If S is in the clockwise direction of E, as Fig. 3 (c) and (d), then S = 90° + θ. If S is in the counterclockwise direction of E, as Fig. 3 (a) and (b), then S = 90° - θ. When the screen of the smartphone is facing up, dip direction = strike +90°, else, dip direction = strike -90°.
3.3 Rotation Matrix Method According to the measurement principle of the acceleration sensor and the magnetic field sensor, Cheng (2017) lists the linear equations required to solve the three rotation angles φ, θ, and ψ of the smartphone rotating along the three axes when the smartphone is moved from the initial state to the measurement state, thereby obtaining the rotation matrix R. The solved rotation matrix is used to find the geological surface normal vector, and bring it into the corresponding formulas to 9
Journal Pre-proof calculate the geological body orientation. Values of Acceleration Sensor Gx , Gy , Gz
Values of Magnetic Field Sensor Mx , My , Mz
Rotation Angles φ, θ
Rotation Angle
ψ Rotation Matrix R Normal Vector V
Dip Direction
Dip Angle
Fig. 4 Rotational matrix method calculation step
Fig. 5 Transformation of coordinate systems
Using the Android platform coordinate system as the smartphone coordinate system, when the attitude of the smartphone changes, the coordinate system changes from X0, Y0, Z0 to X', Y', Z'. The change of the coordinate system can be regarded as the result of the smartphone rotating the φ, θ, ψ along the X0, Y0 and Z0 axes. These 10
Journal Pre-proof three rotation angles correspond to the following three rotation matrices, which can convert any vector to a new coordinate system.
[
1 𝑅𝑥(𝜑) = 0 0
𝑅𝑦(𝜃) =
[
0 cos 𝜑 ― sin 𝜑
cos 𝜃 0 sin 𝜃
0 1 0
]
(5)
]
(6)
]
(7)
0 sin 𝜑 cos 𝜑 ―sin 𝜃 0 cos 𝜃
[
cos 𝜓 sin 𝜓 0 𝑅𝑧(𝜓) = ― sin 𝜓 cos 𝜓 0 0 0 1
When the smartphone keeps horizontal, the Y0 axis towards the north and the location is in the northern hemisphere. The readings of the acceleration sensor and magnetic field sensor are:
[]
0 𝐺= 0 𝑔
[
(8)
]
0 M = 𝐵 cos 𝛿 ― sin 𝛿
(9)
Where g is the acceleration of gravity and B is the strength of the magnetic field, δ is the angle between the sensor axis and the direction of the earth's magnetic field. After the smartphone attitude changes, the readings of acceleration sensor and magnetic field sensor are:
[] []
𝐺𝑥 0 𝐺 = 𝐺𝑦 = 𝑅𝑥(𝜑)𝑅𝑦(𝜃)𝑅𝑧(𝜓) 0 𝑔 𝐺𝑧
[]
(10)
𝑀𝑥 0 M = 𝑀𝑦 = 𝑅𝑥(𝜑)𝑅𝑦(𝜃)𝑅𝑧(𝜓)𝐵 cos 𝛿 ― sin 𝛿 𝑀𝑧
[
]
(11)
Solve the equations (10) and (11), the three rotation angles can be calculated as follows: tan 𝜑 = tan 𝜃 =
𝐺y 𝐺𝑧 ― 𝐺𝑥
𝐺2𝑦 + 𝐺2𝑧
11
(12) (13)
Journal Pre-proof
tan 𝜓 =
𝑀xcos 𝜃 + 𝑀𝑦sin 𝜃sin 𝜑 + 𝑀𝑧sin 𝜃cos 𝜑
(14)
𝑀𝑦cos 𝜑 ― M𝑧sin 𝜑
It should be noted that when calculating the rotation angle, the result range of the function atan(y/x) is (-π/2, π/2], and the result range of the function atan2(y, x) is (-π, π] , here we need to use the function atan2(y, x) for calculation. After the phone is rotated, in the new coordinate system, the normal vector of the screen is (0, 0, 1), and the following equations can be listed:
[]
0 𝑅𝑥(𝜑)𝑅𝑦(𝜃)𝑅𝑧(𝜓)V = 0 1
(15)
[]
0 Solve the equation 𝑅𝑥(𝜑)𝑅𝑦(𝜃)𝑅𝑧(𝜓)V = 0 (15), the normal vector can be 1 further obtained as follows.
[
sin 𝜑sin 𝜓 + cos 𝜑cos 𝜓sin 𝜃 V = cos 𝜑sin 𝜃sin 𝜓 ― cos 𝜓sin 𝜑 cos 𝜑cos 𝜃
]
(16)
Cheng calculated the angles between the vector V and the Y-axis and Z-axis separately, which are the dip direction and dip angle of the structural plane. The calculation formulas are as follows. Table 2 dip direction calculation formula
𝑉𝑧 ≥ 0
𝑉𝑧 < 0
𝑉𝑥 > 0
𝑉𝑥 < 0
𝑉𝑥 > 0
𝑉𝑥 < 0
𝑉𝑦 𝜋 ― tan ―1 𝑉𝑥 2
𝑉𝑦 3𝜋 ― tan ―1 𝑉𝑥 2
𝑉𝑦 3𝜋 ― tan ―1 𝑉𝑥 2
𝑉𝑦 𝜋 ― tan ―1 𝑉𝑥 2
Specifically, when 𝑉𝑥 = 0, the dip direction calculation is as follows: Table 3 Special cases of dip direction
𝑉𝑥 = 0 𝑉y > 0
𝑉y = 0
𝑉y < 0
0
Horizontal Plane
π
Table 4 dip angle calculation formula
𝑉𝑧 > 0
𝑉𝑧 < 0 12
𝑉𝑧 = 0
Journal Pre-proof
tan ―1
𝑉2𝑥 + 𝑉2𝑦 𝑉𝑧
tan ―1
𝑉2𝑥 + 𝑉2𝑦 ― 𝑉𝑧
𝜋 2
3.4 Trigonometric Function Method We propose a method that can quickly measure the spatial attitude no matter the direction of the phone using the orientation sensor. In theory, the three values azimuth, pitch and roll acquired by orientation sensor should be the angles which the smartphone rotates around three axes. But under this assumption, the calculated result of dip direction and dip angle is always unsatisfactory. Until we designed and manufactured the test platform in Section 5.1, we found that, in our test data, pitch and roll represented in Fig. 4 as γ and β, respectively. Azimuth shows the sum of the angle which the smartphone rotates in the horizontal plane and the angle which the smartphone rotates around the Z axis, that is azimuth = θ + δ. The dip direction of the plane is θ , and the dip angle is α .
Fig. 6. Trigonometric function method schematic
Dip angle can be calculated easily, according to geometric relationship, 13
Journal Pre-proof 𝑂𝐴
(17)
𝑂𝐴
(18)
𝐴𝐵 ∙ 𝐴𝐶
(19)
AB = sin 𝛽 AC = sin 𝛾 AD =
𝐴𝐵2 + 𝐴𝐶2 𝑂𝐴
(20)
sin 𝛼 = 𝐴𝐷
Substituting equations (17), (18), and (19) into equation (20), and then rearranging, we can calculate the dip angle α according to the following equations: (21)
sin 𝛼 = sin2 𝛽 + sin2 𝛾
The dip direction can be obtained by calculating the angle δ which is the angle that the smartphone rotates on the plane. When the smartphone is placed as shown in Fig. 4, we can get: (22)
δ + ε = 180° AC =
OA sin 𝛾
(23)
AD =
OA sin 𝛼
(24)
cos 𝜀 =
AD 𝐴𝐶
sin 𝛾
(25)
= sin 𝛼
Since the roll and pitch angles may be negative when the phone changes direction, it is necessary to adjust the calculation formula according to the position of the phone. When the smartphone is placed in different directions, the relationship between these angles is as shown in Table 5. Different calculation formulas can be selected according to the positive or negative of β (roll): Table 5 Relationship between different angles
δ
β
γ
δ
0~90
>0
>0
ε
90~180
>0
<0
180 - ε
180~270
<0
<0
180 + ε
ε sin 𝛾 sin 𝛼 sin 𝛾 180 ― cos ―1 sin 𝛼 sin 𝛾 180 ― cos ―1 sin 𝛼 cos ―1
14
θ sin 𝛾 sin 𝛼 sin 𝛾 𝜃 = azimuth ― cos ―1 sin 𝛼 sin 𝛾 𝜃 = azimuth + cos ―1 sin 𝛼 𝜃 = azimuth ― cos ―1
Journal Pre-proof 270~360
<0
>0
360 - ε
cos ―1
sin 𝛾 sin 𝛼
𝜃 = azimuth + cos ―1
sin 𝛾 sin 𝛼
4 Development of a smartphone-based Application 4.1 Development environment Currently, there are two popular smartphone operating systems, Android and iOS. Because the Android system is the world’s most widely used system, we decided to develop an Android application to perform the functions above. To develop an Android application, there are many languages and tools to choose from. For most developers, the preferred language is JAVA or Kotlin while the main IDE software programs are eclipse, IntelliJ IDEA, and Android Studio. In recent years, with the popularity of cross-platform development, some new IDE software allows developers to use other languages to develop cross-platform applications. Xamarin is one of the cross-platform IDE programs and is included in the Visual Studio 2017, which offers free use for students and individual developers. Based on the experience of developing small tools using the C# language, we chose Xamarin as the development tool. By opening the Visual Studio installer, we selected Visual Studio Community 2017, which is a full-featured IDE that is free to students, open-source and individual developers.
4.2 Data acquisition To obtain data from different sensors, we need to instantiate a SensorManager and register the listeners for each sensor. After they have been registered, we can access the sensors and obtain the data from each sensor service. We created a corresponding textview widget for each sensor's value, to show the value of the sensors. These sensors receive and process data through the interface function
ISensorEventListener.OnSensorChanged,
which
is
used
to
receive
notifications from the sensor manager when sensor values have changed. The 15
Journal Pre-proof RunOnUiThread function is used to update the values shown in the textview widget, so that changes could be displayed on the screen in real time. When saving, we create and open a csv file, read the value of each textview, and write the values into the csv file at 0.1 second intervals. When suspending the operation, we close the csv file, so as to copy the file to the computer and process the data by Excel or other software.
5 Test and analysis 5.1 Test conditions 5.1.1
Test Platform
Natural exposures typically have a limited range of surface orientations available for measurement, and typically surface roughness generates an error in repeat measurements of the same surface. Thus, we rejected the use of natural exposures to test smartphone precision and accuracy. Instead, we developed a test platform system that can change the dip direction and dip angle independently. With this system, a large number of combinations can be obtained for data analysis. We also consider whether the orientations in which the smartphone is placed on the plane may also affect the measurement results. We propose the concept of orientation angle to indicate the orientation of the smartphone when placed on the plane. The orientation angle ranges from 0 to 360 degrees. We define the positive direction of the Y-axis of the phone at 0° when it is the same as the dip direction, and then increase the degrees in the clockwise direction. When designing the test platform, an orientation angle turntable and dial are added to measure the orientation angle.
16
Journal Pre-proof
Fig. 7 The test platform
To reduce the influence of the magnetic properties of the test platform itself on the test results, the test platform is mainly made from plastic, and the brackets and supports made from aluminum; all the screws are made of nylon plastic. This test platform is made up by following parts: a foundation, a dip direction turntable, 2 brackets and supports, a test platform and a dip dial. The test platform edge has been cut at an angle to read the value number on the dip dial, and it contains an orientation angle turntable. Before testing, we need to adjust the level of the test platform and align the north direction. There is a square groove in the middle of the dip direction turntable, the same size as the traditional compass, and the test platform is adjusted by the bubble and pointer of the compass. After the adjustment is completed, the compass is removed to avoid the influence of the compass's magnet on the measurement of the smartphone. 17
Journal Pre-proof 5.1.2
Test Device
We chose a Xiaomi Mi6 smartphone for testing. This phone is used daily by the author and comes with MIUI 10, Android 8.0.0, and Qualcomm Snapdragon 835. According to AIDA64, the phone’s acceleration sensor is an ICM20690, and its magnetic field sensor is an AK09916C. Details of the sensors are in the table below. Table 6
Details of the sensors (“AK09916C | AKM - Asahi Kasei Microdevices,” 2016, “ICM-20690 | TDK,” 2016)
Acceleration sensor
Magnetic field sensor
Name
ICM20690
AK09916C
Vendor
InvenSense
Asahi Kasei
Range
±16 g
± 4900 μT
Sensitivity
±1%
0.15 μT
5.2 Stability test First, we tested the feasibility of obtaining sensor data by using the application we developed. We tried to get the data from the acceleration sensor, magnetic field sensor, and the orientation sensor every 0.1 seconds. We placed the Mi 6 smartphone on the test platform to continuously record data for more than 500s and obtained more than 5000 data, then plotted the data as a curve (Fig. 8).
Acceleration (m/s2)
(a)
A[x]
10
A[y]
A[z]
8 6 4 2 0 0
1000
2000
Sequence
18
3000
4000
5000
Journal Pre-proof (b)
M[x]
15
M[y]
M[z]
Magnetic Field (μT)
10 5 0 -5 -10 -15 -20 -25 -30 -35 0
1000
2000
Sequence
3000
(c)
4000
O[x]
O[y]
5000
O[z]
Orientation (°)
30 20 10 0 -10 -20 0
1000
2000
Sequence
3000
4000
5000
Fig. 8 Data obtained from (a) acceleration, (b) magnetic field, (c) orientation sensor
These test results illustrate points made in previous studies that sensors vary strongly among devices. In the test by Novakova and Pavlis (2017), they found that the sensor data of Android devices are not stable enough and have some notable transients that may cause an undetectable error. Different devices use different sensor hardware. In our test, the data obtained from the Mi 6 is stable, just like the performance of iOS device in Allmendinger’s test (Allmendinger et al., 2017). It can be seen from Fig. 8 that although the data acquired by each sensor has a certain degree of fluctuation, the amplitude is limited to a relatively small range, and the overall trend is stable. Among the sensors, the magnetic field sensor has the largest fluctuation, the acceleration sensor is the second most variable, and the orientation sensor has the smallest fluctuations. The value of the sensor can be represented by an average number over a period of time to reduce the errors caused by fluctuation. 19
Journal Pre-proof To determine the quantity of data needed to calculate the average, the first 100 datasets acquired by the sensor are analyzed. It can be seen that the values of the acceleration sensor and the magnetic sensor are discrete and distributed within a certain range, and an average value is needed to indicate the value of the sensor. The value of the orientation sensor is relatively stable and shows little change. In the beginning, due to fluctuations in the data, the average value will also change significantly. When a certain amount of data is reached, the curve of the average tends to stabilize and decreases as the data fluctuates. As seen in Fig. 9, the average curve is relatively stable after 20 repetitions. Therefore, in the subsequent tests, the average of the more than 20 data was used as the value of sensors. (a)
(b)
Acceleration Sensor X Value
9.36
A[z]
1.27
9.35
9.35
2.63
1.26
9.34 20
40
60
80
100
(e) 0
Magnetic Field Sensor X Value
12.0
-13.5
M[y]
-14.0
20
40
60
80
(f) 0
100
Magnetic Field Sensor Y Value
-28.0
11.5
-28.5
11.0
-29.0
20
40
60
80
100
Magnetic Field Sensor Z Value
M[z]
(d) 0
M[x]
Acceleration Sensor Z Value
9.36
2.64
A[y]
A[x]
1.28
(c)
Acceleration Sensor Y Value
10.5
-29.5
-14.5 10.0 -15.0
-30.0
9.5
(g) 0
20
40
60
80
30.0
Orientation Sensor X Value
100
-30.5
(h) 0
20
40
60
80
100
(i) 0
20
7.7
Orientation Sensor Z Value
Orientation Sensor Y Value
-15.6
-15.5
40
60
80
100
7.6
O[z]
O[y]
O[x]
29.9 -15.4
7.5
29.8 7.4
-15.3
29.7
-15.2 0
20
40
60
Sequence
80
100
7.3 0
20
40
60
80
100
Sequence Single Data
0
20
40
60
80
100
Sequence Average Value
Fig. 9 First 100 values of each sensor (a), (b), (c) data from acceleration sensor. (d), (e), (f) data from magnetic field sensor. (g), (h), (i) data from orientation sensor.
20
Journal Pre-proof
5.3 Accuracy test To measure accuracy, the phone was placed on the test platform and different spatial attitudes were simulated by rotating different parts. The value of the sensors through the smartphone was recorded and exported, using different calculation methods to calculate the dip angle and dip direction. In addition, comparing that with the settings of the test platform, the accuracy of the different calculation methods was analyzed.
5.3.1
Test 1 dip direction
To test the accuracy of the smartphone under different dip directions, we fixed the dip angle at 45° and orientation angle at 0°, and rotated the dip direction turntable to make the dip direction vary through the range of 0° ~ 360°. When the orientation angle is 0°, the roll of the orientation sensor is 0°, and the azimuth and pitch angle readings from the orientation sensor are coincident with the dip direction and dip angle of the geological body, which is the method adopted by Weng (2012). More than 20 data were acquired every 30°, and the average value was calculated. The dip direction and dip angle were calculated following the methods listed in Section 3, and the results are shown in the table below. Usually, geological spatial data values should contain 2 integers. Here, in order to better compare the accuracy of the calculation results of different methods, one decimal place is retained. Table 7 Spatial attitude calculated by different methods when dip direction changes Spatial settings
Vector Method
Rotation Matrix
Trigonometric
Direct Reading
Method
Function Method
Method
Index
DD
DA
OA
DD
DA
DD
DA
DD
DA
DD
DA
1
0
45
0
1.0
45.3
1.0
45.3
0.3
45.6
0.2
45.6
2
30
45
0
32.0
45.3
32.0
45.3
30.2
45.5
30.2
45.5
3
60
45
0
63.0
45.2
63.0
45.2
59.9
45.5
60.0
45.5
4
90
45
0
93.4
45.3
93.4
45.3
89.7
45.6
89.8
45.6
5
120
45
0
122.3
45.3
122.3
45.3
121.5
45.3
121.2
45.3
21
Journal Pre-proof 6
150
45
0
151.8
45.4
151.8
45.4
150.9
45.4
150.5
45.4
7
180
45
0
181.0
45.4
181.0
45.4
181.3
45.4
180.9
45.4
8
210
45
0
210.2
45.4
210.2
45.4
211.4
45.6
211.0
45.6
9
240
45
0
239.4
45.5
239.4
45.5
241.6
45.7
241.4
45.7
10
270
45
0
268.6
45.5
268.6
45.5
268.9
45.9
268.4
45.9
11
300
45
0
298.4
45.5
298.4
45.5
299.2
45.5
299.4
45.5
12
330
45
0
329.1
45.4
329.1
45.4
329.5
45.4
329.6
45.4
Note: Due to the width limit, the angle names in the table are abbreviated, where DD means Dip Direction, DA means Dip Angle, and OA means Orientation Angle.
2
2
2
2
0
-2
0
-2
-4 60 120 180 240 300 Dip Direction (°)
0
-2
-4 0
Difference (°)
(d) 4
Difference (°)
(c) 4
Difference (°)
(b) 4
Difference (°)
(a) 4
60 120 180 240 300 Dip Direction (°)
0
-2
-4 0
Dip Direction Dip Angle
-4 0
60 120 180 240 300 Dip Direction (°)
0
60 120 180 240 300 Dip Direction (°)
Fig. 10. Difference of dip direction and dip angle calculated by (a): Vector Method, (b): Rotation Matrix Method, (c): Trigonometric Function Method, (d): Direct Reading Method
Since the range of dip direction changes is large and the errors are small, it is difficult to directly view the error from the scatter diagram. We find the difference between the results calculated by different calculation methods and the test platform settings, and plot the residuals of different calculation methods. The vector method and the rotation matrix method are calculated using the data of the acceleration sensor and the magnetic field sensor, and the same result is obtained. The trigonometric function method and the direct reading method are using the data of the orientation sensor, and the same result is obtained. As we can see from Fig. 10, the dip angle calculated by different methods is relatively accurate, and the error is within 1°. For dip direction, the deviations of the vector method and rotation matrix method are relatively significant, up to 3°. The errors of other methods are within 2°. For the dip direction calculated by the vector method and rotation matrix method, the error changes with the dip direction to a sinusoidal-like pattern. We speculate that this change may be caused by the calculation of the trigonometric function when 22
Journal Pre-proof calculating the component of the geomagnetic field on each axis of the smartphone.
5.3.2
Test 2 dip angle
To test the measurement accuracy of the smartphone with different dip angles, we fixed the dip direction at 0° and orientation angle at 0°, and rotated the dip angle turntable to make the dip direction vary in the range of 0 ~ 90°. This test was carried out at 10° intervals, and the results obtained by various calculation methods are shown in the following table. As above, the following results are calculated using an average of 20 or more datasets. Similarly, when the orientation is 0°, the data of the orientation sensor can be directly read as dip direction and dip angle. Table 8 Spatial attitude calculated by different methods when dip angle changes Spatial Settings
Vector Method
Rotation Matrix
Trigonometric
Direct Reading
Method
Function Method
Method
Index
DD
DA
OA
DD
DA
DD
DA
DD
DA
DD
DA
1
0
0
0
294.0
0.1
294.0
0.1
57.8
0.0
0.5
0.0
2
0
10
0
0.2
10.1
0.2
10.1
0.6
10.2
0.6
10.2
3
0
20
0
0.5
20.3
0.5
20.3
0.3
20.3
0.6
20.3
4
0
30
0
0.8
30.0
0.8
30.0
0.1
30.0
0.0
30.0
5
0
40
0
1.0
40.4
1.0
40.4
0.1
40.4
0.1
40.4
6
0
50
0
1.0
50.4
1.0
50.4
0.0
50.4
0.0
50.4
7
0
60
0
1.0
60.1
1.0
60.1
0.1
60.8
0.0
60.8
8
0
70
0
1.0
70.0
1.0
70.0
0.1
71.7
0.1
71.7
9
0
80
0
0.7
79.9
0.7
79.9
1.5
79.9
1.6
79.9
10
0
90
0
359.4
89.4
180.6
89.4
0.4
89.4
0.2
90.6
Note: Due to the width limit, the angle names in the table are abbreviated, where DD means Dip Direction, DA means Dip Angle, and OA means Orientation Angle.
2
2
2
2
0
-2
0
-2
-4 30 60 Dip Angle (°)
90
0
-2
-4 0
Difference (°)
(d) 4
Difference (°)
(c) 4
Difference (°)
(b) 4
Difference (°)
(a) 4
30 60 Dip Angle (°)
90
0
-2
-4 0
Dip Direction Dip Angle
-4 0
30 60 Dip Angle (°)
90
0
30 60 Dip Angle (°)
90
Fig. 11 Difference of dip direction and dip angle calculated by (a) Vector Method, (b) Rotation 23
Journal Pre-proof Matrix Method, (c) Trigonometric Function Method, (d) Direct Reading Method. Dip direction difference of Rotation Matrix Method is excessive when dip angle at 90°, data point is not shown in the figure.
Since the dip direction adopts the range of 0 to 360°, when the measurement error is negative, the measurement result of 0° dip direction may in fact be 359.9°. To make the error calculation accurate, we change the data to a negative number manually, that is, -0.1 ° prior to calculation. When the dip angle is 0°, the plane is horizontal, and there is no dip direction. If we continue to use the previous calculation methods, we will get results with no reference value Therefore, when the dip angle is 0°, the data will not be added to calculate the dip direction error. When the dip angle is not 0°, all the methods can obtain relatively accurate results in general. The calculation results of the vector method and rotation matrix method have the smallest error, all within 1°. The calculation results of the other 2 methods are similar, most of the errors are within 1°, and the overall error is within 2°. For dip direction, when the dip angle is 90°, the strike is usually used to describe the direction of the geological structure. The dip direction here is the orientation of the smartphone screen, that is, the orientation of the free face. Except for the rotation matrix method, the result is reversed when the dip angle is 90°, and the dip direction obtained by other methods is relatively accurate, with an error of 1~2°. We also noticed that the pitch angle of the smartphone is 90.6° at this time, and the theoretical dip direction is indeed 180°. From this point of view, it can also be said that the dip direction calculated by rotation matrix method is the only correct one. In terms of dip angle, the results obtained by the vector method and rotation matrix method are relatively more accurate, and the accuracy of results from other methods is slightly worse.
24
Journal Pre-proof 5.3.3
Test 3 orientation angle
The orientation in which the smartphone is placed is not explained when other researchers use a smartphone to make measurements. Therefore, the impact of different orientations of smartphones on the accuracy of measurement results is unknown. In this study, we quantify the orientation angle to test the accuracy of the smartphone's measurement in different directions. We fixed the dip direction at 0° and dip angle at 45° and rotated the orientation angle turntable to make the orientation angle vary between 0 ~ 360°. When the orientation angle changes, the Y-axis direction of the smartphone is no longer the same as the dip direction. Hence, the values of the orientation sensor cannot be directly read as the spatial attitude, and the result of the direct reading method is no longer counted. Table 9 Spatial attitude calculated by different methods when orientation angle changes Spatial Settings
Vector Method
Rotation Matrix
Trigonometric
Method
Function Method
Index
DD
DA
OA
DD
DA
DD
DA
DD
DA
1
0
45
0
0.7
45.2
0.7
45.2
0.8
45.2
2
0
45
30
1.3
45.1
1.3
45.1
359.8
45.1
3
0
45
60
2.2
45.2
2.2
45.2
358.9
45.3
4
0
45
90
2.7
45.3
2.7
45.3
0.1
45.3
5
0
45
120
2.5
45.6
2.5
45.6
1.1
45.6
6
0
45
150
2.5
45.6
2.5
45.6
2.0
45.5
7
0
45
180
1.7
45.6
1.7
45.6
1.2
45.6
8
0
45
210
1.0
45.6
1.0
45.6
2.4
45.6
9
0
45
240
0.2
45.6
0.2
45.6
2.3
45.6
10
0
45
270
359.9
45.5
359.9
45.5
1.6
45.4
11
0
45
300
0.8
45.4
0.8
45.4
1.2
45.4
12
0
45
330
0.4
45.2
0.4
45.2
0.4
45.2
Note: Due to the width limit, the angle names in the table are abbreviated, where DD means Dip Direction, DA means Dip Angle, and OA means Orientation Angle.
25
Journal Pre-proof
2 0 -2 -4
(c)
4 2
Difference (°)
(b)
4
Difference (°)
Difference (°)
(a)
0 -2 -4
0
60 120 180 240 300 Orientation Angle (°)
Dip Direction Dip Angle
4 2 0 -2 -4
0
60 120 180 240 300 Orientation Angle (°)
0
60 120 180 240 300 Orientation Angle (°)
Fig. 12 Difference of dip direction and dip angle calculated by (a): Vector Method, (b): Rotation Matrix Method, (c): Trigonometric Function Method
The dip angle calculations of these methods are relatively accurate, all the errors are within 1°. In terms of dip direction, all the methods maintain good accuracy with an error of 0~3°. This result shows that all 3 methods can calculate the dip direction and dip angle when the smartphone is placed in any direction.
5.3.4
Test 4 multi-angle combination
The dip direction turntable, the dip angle turntable and the orientation angle turntable are rotated to test the accuracy of the measurement results of these calculation methods under different conditions. To cover as many orientations as possible while reducing the number of test groups, the tendency and orientation were tested by rotating the turntable at 45° intervals, and the dip angle was tested at intervals of 30°. Since the dip direction measurement does not make sense when the dip angle is 0°, the dip angle change does not start from 0°, but 15°, 45°, and 75° are selected to represent a gentle tilt, medium tilt, and steep slope. The test obtained a total of 192 sets of data, the specific data of which are shown in Table 11.
26
Journal Pre-proof (c)
(b) 10
8
8
8
6
6
6
4
4
4
2
2
2
0
0
0
-2
-2
-2
-4
-4
-4
-6
-6
-6
-8
-8
-8
Difference
(a) 10
-10
10
-10 0
90
180
270
Orientation Angle
Dip Angle 15° 45° 75°
Dip Direction 0° 45° 90° 135° 180° 225° 270° 315°
-10 0
90
180
270
Orientation Angle
0
90
180
270
Orientation Angle
Fig. 13 Difference of dip direction calculated by (a): Vector Method, (b): Rotation Matrix Method, (c): Trigonometric Function Method
The errors in dip direction are as shown in
Fig. 13. It can be seen that the dip
direction errors obtained by the vector method and the trigonometric function method are concentrated approximately 0°, and the error of the rotation matrix method is concentrated in different regions depending on the orientation angle. For the vector method and rotation matrix method, the error of dip direction calculation result is up to 8°. In general, when the dip angle is shallow, the error is small, and the error is large when the dip angle is steep. Under the same dip direction, the change of the difference of the dip direction does not show a correlation with the change of the orientation angle, so it is unable to reduce the error of the dip direction measurement by rotating the smartphone. The regulation of the trigonometric function method error has not been found to be obvious, and the error is mainly within 4°, which is more stable and concentrated than other methods.
27
Journal Pre-proof (b) 2
(c) 2
1
1
1
0
0
0
-1
-1
-1
Difference
(a) 2
-2
-2 0
90
180
270
Dip Direction 0° 45° 90° 135° 180° 225° 270° 315°
-2 0
Orientation Angle
Dip Angle 15° 45° 75°
90
180
270
0
Orientation Angle
90
180
270
Orientation Angle
Fig. 14 Difference of dip angle calculated by (a): Vector Method, (b): Rotation Matrix Method, (c): Trigonometric Function Method
The errors of the dip angle are shown in Fig. 14. It can be seen that all 3 methods can get accurate results, the errors of vector method and rotation matrix method are within 1°, the errors of trigonometric function method are mostly less than 1°, and the individual results are slightly larger than 1°. In general, for these 3 methods, when the orientation angle is 0°, the error of the dip angle is the smallest, and when the orientation angle is 180°, the error of the dip angle is the largest. Relatively speaking, the error of the vector method is relatively stable, and the trigonometric function method is slightly larger.
5.3.5
Correlation analysis
The resulting data from the above tests are selected for correlation analysis, and the Spearman correlation coefficient is selected for statistical analysis. The Spearman correlation and significance level (P-value) of the data obtained by different calculation methods are shown in the following table. It should be noted that since the 28
Journal Pre-proof dip direction used in geological work is in the range of 0 to 360°, the actual dip direction may be 0°, but the smartphone may obtain 359°. In fact, the deviation is only 1°, but the deviation of 359° is calculated in the correlation analysis. Therefore, for similar data, we changed the 359° to -1° manually before performing the correlation analysis. Table 10 Correlation analysis of spatial attitude Dip Direction Spearman
P
correlation
Dip Angle Spearman
P
correlation
Vector Method
0.99123
5.25297×10-198
0.94749
6.93952×10-113
Rotation Matrix Method
0.98452
1.1739×10-170
0.94749
6.93952×10-113
0.99126
3.53039×10-198
0.94716
1.37068×10-112
Trigonometric Function Method
It can be seen from the above table that all the 3 methods can obtain the dip direction and dip angle data well, and the correlation coefficients are quite high. In our test data, the results obtained by the rotation matrix method is basically the same as the results obtained by the vector method. When the dip angle is 90°, the dip direction calculated by the rotation matrix method is reversed. Therefore, the two methods have the same correlation coefficient of the dip angle, and the dip direction correlation of the rotation matrix method is lower than the vector method. Among the three methods, the dip directions obtained by the trigonometric function method are slightly better, and the dip angles obtained by vector method and rotation matrix method are slightly better. Although the calculation results of the dip direction have comparatively larger fluctuation than the dip angle, the correlation coefficient is higher because the error is the same as the positive and negative deviation. The dip angle calculation results are smaller, but in general, the positive error is more than the negative value, so the correlation coefficient is slightly lower. This error in the dip angle may be caused by test platform errors and further research is needed.
29
Journal Pre-proof
6 Conclusion Different Android smartphones have different hardware and software systems. For some Android smartphones (in our test, that is Xiaomi Mi 6), the stability of sensor readings has increased, and the fluctuations are no longer as great as Novakova's tests (Novakova and Pavlis, 2017, 2019). However, the magnetic field sensor and the acceleration sensor still have a certain degree of fluctuation, and it is necessary to continuously record multiple sets of data to calculate a stable average. Android smartphones can be used to quickly acquire geological spatial attitude information from outcrops. Different researchers analyzed from different perspectives and proposed different methods for calculating geological spatial attitude using the sensors of a smartphone. This paper introduces and tests these methods, supplementing some of the details that need to be noted during the calculation process. This paper proposes the use of an orientation angle to describe the orientation of the smartphone placed on the plane. These methods can obtain a relatively accurate dip direction and dip angle when the smartphone is placed at any orientation angle. Specifically, for the dip direction, the change of the error is not obvious with the change of the orientation angle, and the error is quite different from the change of dip direction. For the dip angle, the overall trend is that the error is minimal when the orientation angle is 0°, and the error is greatest when the orientation angle is 180°. On the whole, we recommend using the trigonometric function method to obtain geological spatial data for outcrops. The smartphone can be placed at any angle to obtain a relatively accurate dip direction and dip angle. At the same time, the orientation sensor data are relatively stable, and it is not necessary to obtain 20 sets of data for averaging, making this method most efficient and convenient.
30
Journal Pre-proof
Acknowledgments Funding: This work was supported by the National Key R&D Program of China [2018YFC1504905]; and the National Natural Science Foundation of China [41772317]. The authors are also grateful to the anonymous referees for their useful comments and careful review of the manuscript.
Computer Code Availability Code name: SensorDataGetter. Developer: Jue Wang. Address: State Key Laboratory of Geological Hazard Prevention and Geological Environment Protection, Chengdu University of Technology, Chengdu 610059, Sichuan, China. Telephone: +86 15882143472. E-mail:
[email protected]. Year first available: 2019. Hardware required: The phone should contain an acceleration sensor and a magnetic field sensor. Software required: Android 8.0. Program language: C#. Program size: 6.62MB. Access to the source code: https://github.com/Kingjue2/SensorDataGetter.
References AK09916C | AKM - Asahi Kasei Microdevices [WWW Document], 2016. URL https://www.akm.com/akm/en/aboutus/news/20160318AK09916_001/ 31
Journal Pre-proof (accessed 3.4.19). Allmendinger, R.W., Siron, C.R., Scott, C.P., 2017. Structural data collection with mobile devices: Accuracy, redundancy, and best practices. J. Struct. Geol. 102, 98–112. https://doi.org/10.1016/j.jsg.2017.07.011 Cheng, L., 2017. Algorithms Study on Strike and Dip of Structural Planes Using Three- dimensional Electronic Compass. Chinese J. Undergr. Sp. Eng. 13, 592–597. Hama, L., Ruddle, R.A., Paton, D., 2014. Geological Orientation Measurements using an iPad : Method Comparison. EG UK Comput. Graph. Vis. Comput. https://doi.org/10.2312/cgvc.20141207 He, C., Ju, N., Xu, Q., Li, Y., Zhao, J., 2018. Designing an Android-Based Application for Geohazard Reduction Using Citizen-Based Crowdsourcing Data. Mob. Inf. Syst. 2018, 1–11. https://doi.org/10.1155/2018/1328098 ICM-20690 | TDK [WWW Document], 2016. URL https://www.invensense.com/products/motion-tracking/6-axis/icm-20690/ (accessed 3.4.19). Lee, S., Suh, J., Choi, Y., 2018. Review of smartphone applications for geoscience: current status, limitations, and future perspectives. Earth Sci. Informatics 11, 463–486. https://doi.org/10.1007/s12145-018-0343-9 Lee, S., Suh, J., Park, H. dong, 2013. Smart Compass-Clinometer: A smartphone application for easy and rapid geological site investigation. Comput. Geosci. 61, 32–42. https://doi.org/10.1016/j.cageo.2013.07.014 Marcai, E., Viana, W., Andrade, R.M.C., Rodrigues, D., 2015. A mobile learning system to enhance field trips in geology. Proc. - Front. Educ. Conf. FIE 2015–February. https://doi.org/10.1109/FIE.2014.7044030 Novakova, L., Pavlis, T.L., 2017. Assessment of the precision of smart phones and tablets for measurement of planar orientations: A case study. J. Struct. Geol. 97, 93–103. https://doi.org/10.1016/j.jsg.2017.02.015 32
Journal Pre-proof Novakova, L., Pavlis, T.L., 2019. Modern methods in structural geology of twenty-first century: Digital mapping and digital devices for the field geology, Springer Geology. Springer Singapore. https://doi.org/10.1007/978-981-13-2781-0_3 Tien Bui, D., Tran, C.T., Pradhan, B., Revhaug, I., Seidu, R., 2015. iGeoTrans – a novel iOS application for GPS positioning in geosciences. Geocarto Int. 30, 202–217. https://doi.org/10.1080/10106049.2014.902114 Wang, J., Ju, N., Huang, J., He, C., Fan, Q., 2016. Smart Phone-based Method of Rapid Rock Slope Stability Analysis. Geol. Sci. Technol. Inf. 35, 172–176. Weng, Y.H., Sun, F.S., Grigsby, J.D., 2012. GeoTools: An android phone application in geology. Comput. Geosci. 44, 24–30. https://doi.org/10.1016/j.cageo.2012.02.027 Wolniewicz, P., 2014. SedMob: A mobile application for creating sedimentary logs in the field. Comput. Geosci. 66, 211–218. https://doi.org/10.1016/j.cageo.2014.02.004
Attached Table Table 11 Spatial attitude calculated by different methods Spatial Settings
Vector Method
Rotation Matrix
Trigonometric
Method
Function Method
Index
DD
DA
OA
DD
DA
DD
DA
DD
DA
1
0
15
0
2.8
15.2
2.8
15.2
0.5
15.3
2
45
15
0
46.8
15.2
46.8
15.2
45.4
15.7
3
90
15
0
89.6
15.2
89.6
15.2
89.6
15.6
4
135
15
0
132.5
15.3
132.5
15.3
134.3
15.3
5
180
15
0
177.3
15.3
177.3
15.3
180.3
15.3
6
225
15
0
225.0
15.3
225.0
15.3
226.2
15.3
33
Journal Pre-proof 7
270
15
0
271.4
15.3
271.4
15.3
270.1
15.2
8
315
15
0
318.3
15.3
318.3
15.3
315.6
15.2
9
0
45
0
3.8
45.1
3.8
45.1
0.7
45.1
10
45
45
0
48.1
45.1
48.1
45.1
46.2
45.1
11
90
45
0
90.6
45.2
90.6
45.2
91.1
45.2
12
135
45
0
132.6
45.3
132.6
45.3
135.0
45.4
13
180
45
0
176.6
45.4
176.6
45.4
179.7
45.4
14
225
45
0
223.4
45.3
223.4
45.3
225.8
45.4
15
270
45
0
270.6
45.3
270.6
45.3
270.8
45.3
16
315
45
0
318.0
45.2
318.0
45.2
315.1
45.2
17
0
75
0
3.4
75.0
3.4
75.0
0.4
75.0
18
45
75
0
51.3
75.0
51.3
75.0
45.4
75.2
19
90
75
0
95.3
75.1
95.3
75.1
90.5
75.3
20
135
75
0
136.6
75.2
136.6
75.2
135.1
75.4
21
180
75
0
177.7
75.3
177.7
75.3
180.1
75.3
22
225
75
0
220.4
75.2
220.4
75.2
224.6
75.3
23
270
75
0
263.8
75.2
263.8
75.2
269.2
75.3
24
315
75
0
313.0
75.1
313.0
75.1
314.6
75.1
25
0
15
45
1.4
15.1
1.4
15.1
359.8
15.0
26
45
15
45
44.6
15.1
44.6
15.1
45.8
14.8
27
90
15
45
87.8
15.2
87.8
15.2
90.5
15.0
28
135
15
45
132.5
15.3
132.5
15.3
135.8
14.9
29
180
15
45
178.7
15.3
178.7
15.3
175.7
15.2
30
225
15
45
226.6
15.4
226.6
15.4
225.4
15.2
31
270
15
45
273.5
15.3
273.5
15.3
269.8
15.1
32
315
15
45
317.6
15.2
317.6
15.2
314.5
15.0
33
0
45
45
1.2
45.1
1.2
45.1
0.2
45.1
34
45
45
45
45.7
45.0
45.7
45.0
45.0
45.0
34
Journal Pre-proof 35
90
45
45
89.5
45.2
89.5
45.2
90.3
45.0
36
135
45
45
133.7
45.3
133.7
45.3
135.2
45.0
37
180
45
45
179.7
45.3
179.7
45.3
180.6
45.3
38
225
45
45
225.7
45.4
225.7
45.4
226.3
45.4
39
270
45
45
271.6
45.3
271.6
45.3
270.0
45.3
40
315
45
45
316.7
45.2
316.7
45.2
314.3
45.3
41
0
75
45
1.5
75.0
1.5
75.0
0.6
74.8
42
45
75
45
50.2
75.0
50.2
75.0
45.7
74.8
43
90
75
45
94.7
75.1
94.7
75.1
90.6
75.1
44
135
75
45
137.4
75.2
137.4
75.2
134.8
75.2
45
180
75
45
179.0
75.3
179.0
75.3
181.2
75.2
46
225
75
45
221.7
75.2
221.7
75.2
225.6
75.4
47
270
75
45
264.8
75.2
264.8
75.2
270.4
75.1
48
315
75
45
311.8
75.1
311.8
75.1
315.4
74.9
49
0
15
90
358.5
15.0
358.5
15.0
0.1
15.0
50
45
15
90
48.6
15.1
48.6
15.1
45.4
14.9
51
90
15
90
87.4
15.1
87.4
15.1
92.9
15.0
52
135
15
90
135.3
15.2
135.3
15.2
135.7
15.1
53
180
15
90
182.9
15.2
182.9
15.2
181.5
15.2
54
225
15
90
228.5
15.3
228.5
15.3
225.6
15.3
55
270
15
90
272.1
15.2
272.1
15.2
269.2
15.3
56
315
15
90
315.0
15.1
315.0
15.1
314.8
15.2
57
0
45
90
358.6
45.2
358.6
45.2
0.4
44.8
58
45
45
90
43.1
45.2
43.1
45.2
46.0
45.0
59
90
45
90
89.5
45.3
89.5
45.3
90.6
45.3
60
135
45
90
136.4
45.4
136.4
45.4
136.1
45.5
61
180
45
90
182.6
45.8
182.6
45.8
181.9
45.8
62
225
45
90
227.1
45.5
227.1
45.5
225.7
45.5
35
Journal Pre-proof 63
270
45
90
270.8
45.5
270.8
45.5
270.9
45.3
64
315
45
90
314.4
45.3
314.4
45.3
315.4
45.8
65
0
75
90
359.3
75.2
359.3
75.2
0.7
75.4
66
45
75
90
48.6
75.3
48.6
75.3
44.7
74.6
67
90
75
90
94.9
75.4
94.9
75.4
90.8
74.7
68
135
75
90
138.5
75.5
138.5
75.5
135.4
75.5
69
180
75
90
180.8
75.4
180.8
75.4
179.8
75.5
70
225
75
90
221.9
75.4
221.9
75.4
225.1
75.8
71
270
75
90
263.7
75.3
263.7
75.3
269.7
75.3
72
315
75
90
309.8
75.2
309.8
75.2
314.9
75.2
73
0
15
135
356.7
15.3
356.7
15.3
359.1
15.3
74
45
15
135
42.1
15.3
42.1
15.3
43.5
15.1
75
90
15
135
90.3
15.3
90.3
15.3
91.1
15.3
76
135
15
135
138.1
15.4
138.1
15.4
135.3
15.3
77
180
15
135
183.6
15.5
183.6
15.5
179.9
15.1
78
225
15
135
227.3
15.5
227.3
15.5
225.0
15.4
79
270
15
135
269.8
15.4
269.8
15.4
270.4
15.4
80
315
15
135
312.6
15.4
312.6
15.4
314.6
15.4
81
0
45
135
356.6
45.5
356.6
45.5
0.1
45.5
82
45
45
135
43.1
45.5
43.1
45.5
45.4
46.0
83
90
45
135
91.6
45.6
91.6
45.6
90.8
45.4
84
135
45
135
138.8
45.7
138.8
45.7
135.3
45.4
85
180
45
135
183.3
45.8
183.3
45.8
180.3
45.5
86
225
45
135
226.3
45.8
226.3
45.8
224.5
45.7
87
270
45
135
269.2
45.7
269.2
45.7
268.4
45.7
88
315
45
135
312.0
45.7
312.0
45.7
315.6
45.4
89
0
75
135
356.9
75.5
356.9
75.5
0.8
75.5
90
45
75
135
48.1
75.5
48.1
75.5
45.2
76.1
36
Journal Pre-proof 91
90
75
135
97.0
75.6
97.0
75.6
90.6
75.5
92
135
75
135
140.6
75.7
140.6
75.7
135.2
75.5
93
180
75
135
181.3
75.8
181.3
75.8
180.8
75.8
94
225
75
135
222.4
75.8
222.4
75.8
225.2
75.7
95
270
75
135
264.3
75.7
264.3
75.7
269.9
75.8
96
315
75
135
308.7
75.6
308.7
75.6
314.8
75.6
97
0
15
180
356.7
15.3
356.7
15.3
2.8
15.4
98
45
15
180
45.5
15.3
45.5
15.3
45.5
15.3
99
90
15
180
94.0
15.3
94.0
15.3
91.1
15.3
100
135
15
180
139.8
15.6
139.8
15.6
135.0
15.3
101
180
15
180
182.6
15.7
182.6
15.7
180.4
15.5
102
225
15
180
225.5
15.5
225.5
15.5
224.8
15.4
103
270
15
180
267.5
15.5
267.5
15.5
269.0
15.5
104
315
15
180
311.1
15.4
311.1
15.4
313.8
15.3
105
0
45
180
358.0
45.6
358.0
45.6
0.4
45.6
106
45
45
180
48.9
45.6
48.9
45.6
46.2
45.8
107
90
45
180
97.2
45.6
97.2
45.6
91.5
45.6
108
135
45
180
140.6
45.7
140.6
45.7
135.5
45.8
109
180
45
180
181.5
45.8
181.5
45.8
180.0
45.8
110
225
45
180
222.9
45.9
222.9
45.9
225.3
45.8
111
270
45
180
264.8
45.8
264.8
45.8
270.2
45.7
112
315
45
180
309.6
45.7
309.6
45.7
315.4
45.4
113
0
75
180
357.8
75.6
357.8
75.6
359.8
75.4
114
45
75
180
49.3
75.6
49.3
75.6
46.0
75.5
115
90
75
180
97.2
75.7
97.2
75.7
91.0
75.7
116
135
75
180
140.1
75.9
140.1
75.9
133.5
75.9
117
180
75
180
180.9
75.9
180.9
75.9
179.5
75.9
118
225
75
180
221.8
75.9
221.8
75.9
225.3
75.6
37
Journal Pre-proof 119
270
75
180
263.3
75.9
263.3
75.9
271.0
75.9
120
315
75
180
308.7
75.8
308.7
75.8
316.3
75.8
121
0
15
225
359.5
15.2
359.5
15.2
359.6
15.2
122
45
15
225
48.6
15.3
48.6
15.3
46.3
15.2
123
90
15
225
95.4
15.3
95.4
15.3
91.8
15.2
124
135
15
225
138.5
15.4
138.5
15.4
136.0
15.3
125
180
15
225
180.9
15.5
180.9
15.5
180.8
15.5
126
225
15
225
222.9
15.5
222.9
15.5
224.5
15.5
127
270
15
225
265.9
15.5
265.9
15.5
268.7
15.3
128
315
15
225
311.3
15.3
311.3
15.3
314.2
15.2
129
0
45
225
0.3
45.1
0.3
45.1
1.2
44.8
130
45
45
225
49.7
45.1
49.7
45.1
44.7
45.3
131
90
45
225
95.8
45.1
95.8
45.1
89.2
44.7
132
135
45
225
138.7
45.2
138.7
45.2
134.3
45.1
133
180
45
225
180.2
45.3
180.2
45.3
177.6
45.3
134
225
45
225
222.5
45.2
222.5
45.2
225.8
45.9
135
270
45
225
265.4
45.2
265.4
45.2
270.1
45.5
136
315
45
225
310.8
45.1
310.8
45.1
315.8
45.1
137
0
75
225
359.7
75.6
359.7
75.6
0.7
75.8
138
45
75
225
50.6
75.6
50.6
75.6
45.8
75.6
139
90
75
225
97.7
75.7
97.7
75.7
91.1
75.8
140
135
75
225
139.5
75.9
139.5
75.9
135.4
75.9
141
180
75
225
179.7
75.9
179.7
75.9
180.1
75.8
142
225
75
225
221.2
75.9
221.2
75.9
223.9
75.9
143
270
75
225
263.7
75.8
263.7
75.8
269.8
75.6
144
315
75
225
309.8
75.8
309.8
75.8
315.5
75.8
145
0
15
270
3.7
15.2
3.7
15.2
359.5
15.8
146
45
15
270
50.6
15.1
50.6
15.1
45.9
15.2
38
Journal Pre-proof 147
90
15
270
94.6
15.2
94.6
15.2
92.1
15.1
148
135
15
270
136.8
15.4
136.8
15.4
136.3
15.4
149
180
15
270
178.8
15.4
178.8
15.4
181.1
15.4
150
225
15
270
221.3
15.4
221.3
15.4
224.4
15.4
151
270
15
270
267.0
15.4
267.0
15.4
268.4
15.4
152
315
15
270
314.3
15.2
314.3
15.2
314.3
15.2
153
0
45
270
2.3
44.8
2.3
44.8
0.7
44.6
154
45
45
270
50.8
44.8
50.8
44.8
46.7
44.1
155
90
45
270
96.0
44.9
96.0
44.9
89.9
45.0
156
135
45
270
138.0
45.2
138.0
45.2
135.5
44.9
157
180
45
270
179.1
45.2
179.1
45.2
179.6
45.4
158
225
45
270
221.1
45.2
221.1
45.2
225.2
45.2
159
270
45
270
264.9
45.1
264.9
45.1
270.6
45.3
160
315
45
270
311.6
45.0
311.6
45.0
315.5
45.0
161
0
75
270
2.7
75.5
2.7
75.5
0.5
75.5
162
45
75
270
52.6
75.5
52.6
75.5
45.6
75.6
163
90
75
270
97.0
75.6
97.0
75.6
90.3
75.7
164
135
75
270
138.0
75.8
138.0
75.8
135.5
75.9
165
180
75
270
178.2
75.8
178.2
75.8
180.5
75.9
166
225
75
270
220.0
75.8
220.0
75.8
226.2
75.8
167
270
75
270
263.6
75.6
263.6
75.6
269.8
75.7
168
315
75
270
311.3
75.5
311.3
75.5
314.4
75.6
169
0
15
315
5.0
15.1
5.0
15.1
1.2
15.4
170
45
15
315
49.3
15.1
49.3
15.1
45.9
15.0
171
90
15
315
92.3
15.2
92.3
15.2
93.0
15.3
172
135
15
315
134.8
15.3
134.8
15.3
136.8
15.3
173
180
15
315
176.9
15.3
176.9
15.3
180.2
15.4
174
225
15
315
221.9
15.3
221.9
15.3
224.6
15.3
39
Journal Pre-proof 175
270
15
315
269.2
15.2
269.2
15.2
270.0
15.3
176
315
15
315
317.7
15.1
317.7
15.1
316.2
15.1
177
0
45
315
3.2
44.7
3.2
44.7
0.2
45.0
178
45
45
315
50.9
44.7
50.9
44.7
45.6
44.7
179
90
45
315
95.0
44.8
95.0
44.8
90.7
44.9
180
135
45
315
137.5
44.9
137.5
44.9
135.8
44.8
181
180
45
315
178.5
44.9
178.5
44.9
180.6
45.2
182
225
45
315
221.2
44.9
221.2
44.9
226.2
44.8
183
270
45
315
265.8
45.2
265.8
45.2
270.8
45.1
184
315
45
315
313.8
45.1
313.8
45.1
315.1
44.1
185
0
75
315
4.7
75.1
4.7
75.1
0.2
74.7
186
45
75
315
53.3
75.1
53.3
75.1
45.2
74.8
187
90
75
315
96.5
75.2
96.5
75.2
89.9
75.2
188
135
75
315
136.7
75.3
136.7
75.3
136.1
75.3
189
180
75
315
177.4
75.4
177.4
75.4
181.8
75.4
190
225
75
315
218.5
75.4
218.5
75.4
225.4
75.3
191
270
75
315
263.4
75.3
263.4
75.3
269.4
75.1
192
315
75
315
312.6
75.2
312.6
75.2
315.2
75.2
Note: Due to the width limit, the angle names in the table are abbreviated, where DD means Dip Direction, DA means Dip Angle, and OA means Orientation Angle.
40
Journal Pre-proof Highlights
1. Introduced a variety of complete calculation methods of measuring the spatial attitude; 2. A trigonometric function method using the orientation sensor is proposed, and the results are relatively accurate; 3. Proposed the orientation angle to quantitatively describe the posture of the mobile phone during measurement; 4. Designed and manufactured a test bench to simulate multiple angle combinations.