Journal of Structural 102 (2017) 98e112

Contents lists available at ScienceDirect

Journal of

journal homepage: www.elsevier.com/locate/jsg

Structural data collection with mobile devices: Accuracy, redundancy, and best practices

* Richard W. Allmendinger , Christopher R. Siron, Chelsea P. Scott 1

Dept. of Earth and Atmospheric Sciences, Cornell University, Ithaca, NY, 14850, USA article info abstract

Article history: Smart phones are equipped with numerous sensors that enable orientation data collection for structural Received 12 May 2017 geology at a rate up to an order of magnitude faster than traditional analog . The rapidity of Received in revised form measurement enables field structural , for the first time, to enjoy the benefits of data redun- 19 July 2017 dancy and quantitative uncertainty estimates. Recent work, however, has called into question the reli- Accepted 27 July 2017 ability of sensors on Android devices. We present here our experience with programming a new smart Available online 2 August 2017 phone app from scratch, and using it and commercial apps on iOS devices along with analog compasses in a series of controlled tests and typical field use cases. Additionally, we document the relationships Keywords: Smartphone between iPhone measurements and visible structures in satellite, drawing on a database of 3700 iPhone measurements of coseismic surface cracks we made in northern Chile following the Mw8.1 Pisagua Orientation earthquake in 2014. By comparing phone-collected attitudes to orientations determined independently Accuracy of the magnetic field, we avoid having to assume that the analog compass, which is subject to its own Redundancy uncertainties, is the canonical instrument. Our results suggest that iOS devices are suitable for all but the most demanding applications as long as particular care is taken with respect to metal and electronic objects that could affect the magnetic field. © 2017 Elsevier Ltd. All rights reserved.

1. Introduction without data redundancy, it is impossible to evaluate the signifi- cance and accuracy of a measurement. Thus, the ideal case would Structural geology has always suffered from a relatively small be to make lots of measurements of high accuracy and well number of recorded, quantitative measurements. A field established uncertainty quickly enough that one can still visit many working with a traditional analog compass and paper field note- localities. book typically records a few tens of orientation measurements per Smart phone compass/stereonet programs (“apps”) will very day. Not only are the total measurements small in number, but likely replace traditional analog compasses (Brunton, Freiberg, repeat measurements of sufficient quantity to establish statistical Silva, etc.) because of convenience, cost, and ubiquity but mostly uncertainty are extremely rare in the published literature. Why because of their rapidity. The ability to record orientation along bother to make tens of measurement of a single bedding surface at with location (latitude and longitude or UTM) and date/time with a a single site when doing so would severely limit the number of single tap of an on-screen button reduces the amount of time that it outcrops we could document in a day? As Ramsay and Huber wrote takes to make a measurement. For timed tests on the same outcrop with respect to strain measurements 35 years ago (Ramsay and comparing analog compass and traditional paper note book to Huber, 1983, p. 78), “it is often more rewarding to spend time in smart phone measurement and recording, the latter was about nine the field collecting a lot of data of relatively low degree of accuracy times faster. If many more measurements can be made in the same at many localities, rather than to concentrate on obtaining a few period of time, then field geologists can begin to enjoy the benefits strain data with an extremely high degree of accuracy.” However, of data redundancy that simply are not feasible with analog in- struments. Additionally, in every cash-strapped geology depart- ment, the question will be, or is already being, asked: “why should * Corresponding author. we invest thousands of dollars in analog compasses when many E-mail address: [email protected] (R.W. Allmendinger). students already have a smart phone at their disposal?” 1 Now at: School of Earth and Space Exploration, Arizona State University, Tempe, The enthusiasm for smart phone orientation measurement apps AZ, USA. http://dx.doi.org/10.1016/j.jsg.2017.07.011 0191-8141/© 2017 Elsevier Ltd. All rights reserved. R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 99 was recently dampened somewhat by Novakova and Pavlis (2017) magnetic fields, especially from other components within the de- as well as earlier studies (e.g., Hama et al., 2014; Mookerjee et al., vice such as the power supply, etc., so that the orientation with 2015) that demonstrate considerable variation in quality of device respect to magnetic north can be determined. Dip measurements sensors and accuracy of recorded observation. Most conclude that collected with smart phones are generally much more accurate the least reliable sensor is the device which likewise than strikes because the magnetometer is much more sensitive to, accords with our experience. However, comparisons in previous and local perturbations more common in, the local magnetic field studies tend to be incomplete or misleading in assessment of ac- than in the local gravity field. The dip of the device can be deter- curacy because: only one operating system (i.e., Android or iOS) is mined from the three components of the acceleration due to tested, multiple devices are not used in testing, the details of the gravity alone and does not have to depend on the magnetometer at algorithms used in the apps are seldom well described, the error in all. the dip is assessed separately from the error in the strike (rather Sensors in the iPhone, sampled by the Sensor Kinetics Pro app at than using poles to planes; see section S1 in the Supplementary about 30 Hz, appear to be very stable (Fig. 1) especially in com- Material), single measurements from analog compasses are regar- parison to the Android devices tested by Novakova and Pavlis (2017, ded as canonical rather than comparing multiple analog compass their Fig. 2). Nonetheless, the iPhone magnetometer is easily per- measurements to multiple smart phone apps, and there is no turbed by passing even small metal objects within several centi- assessment of accuracy that does not rely on the magnetic field. meters of the device (Fig. 1b). This behavior has considerable Here, our purpose is three : (1) introduce a new, free iOS implications for best practices in the field when using phones as app, Stereonet Mobile, written by the senior author2 and document data collection devices. the basics of its functioning; (2) compare Stereonet Mobile and a popular smart phone app, Fieldmove Clino, to each other and to analog compass measurements on a datum by datum and group by 2.2. Device coordinate system and determining orientation group basis; and (3) document the accuracy of app measurements independent of analog compass measurements by using a database The iOS device coordinate system and the rotations about the of >3700 measurements of surface crack measurements and three axes are shown in Fig. 2. One “reads” the face of the device 0 comparing those measurements with the same cracks visible on like a right-handed map coordinate system: the first axis, X 1,is Google Earth imagery. parallel to and in the short, or side-to-side, direction of the face ® 0 Our study, using only Apple iPhones (iOS operating system), with positive to the right. The second axis, X 2, is parallel to the face stands in contrast to Novakova and Pavlis (2017) who used only and the long axis of the device with positive toward the top of the 0 Android devices. Together, these two studies tend to suggest that phone, and X 3, the third axis, is perpendicular to the face and the four different iPhones devices used here are significantly su- positive towards the user. The change in orientations of the device perior in accuracy and reliability compared to the two tested is determined by the rotation of this coordinate system with Android devices. This conclusion has also been reached by Midland respect to a reference coordinate system. The iOS operating system Valley, the publisher of Fieldmove Clino who state, “We have provides the programmer with four different potential reference observed much larger variations in the measured data recorded frames. Stereonet Mobile uses the “CMAttitudeReferenceFrameX- using Android devices which we suspect is largely down to the TrueNorthZVertical” reference frame. That is, the rotation matrix is quality of the hardware components inside the device” (Midland equal to the identity matrix when the phone face is horizontal with 0 Valley, 2017). Our data are also consistent with the recent work of the short axis (X 1) aligned NS. To determine true north, the oper- (Cawood et al., 2017) who compared remotely sensed surface data ating system must know the device position on the globe in order (LiDAR, Structure from Motion) to both digital and analog compass to calculate magnetic declination. Thus, reading an orientation readings. However, anyone collecting irreplaceable field data with must also turn on the device GPS receiver. any electronic device will want to conduct their own tests and The change in orientation is supplied to the programmer by iOS continue to carry an analog compass in the field with them. Even in several different ways. Perhaps most common is using the Euler where a device is not reliable for data collection, many apps allow angles (Fig. 2), the pitch, roll, and yaw (sometimes known as the manual data entry, giving the user some of the benefits of the smart Tait-Bryan angles), which are familiar to anyone in aviation or phone (e.g., automatic recording of location, time, and date) boating. Determining device orientation using these angles, without the uncertainty in accuracy. though, can be subject to an artifact known as gimbal lock where one degree of freedom is lost in certain orientations. Thus, iOS also 2. Stereonet mobile provides orientation information via a rotation matrix or via qua- ternions. Stereonet Mobile uses the rotation matrix to calculate the 2.1. Device sensors orientation of the device relative to the reference frame. The rota- tion matrix, r, in terms of the pitch roll and yaw, for iOS is given as: Smart phones have a vast array of sensors to determine device r ¼ cosðrollÞcosðyawÞsinðrollÞsinðpitchÞsinðyawÞ orientation including GPS receivers, accelerometers, gyroscopes, 11 r ¼ cosðyawÞsinðrollÞsinðpitchÞþcosðrollÞsinðyawÞ , and even barometers. From these sensors, it is 12 r ¼sinðrollÞcosðpitchÞ possible to determine device orientation, position, velocity, and 13 r21 ¼cosðpitchÞsinðyawÞ linear and rotational acceleration (Allan, 2011; Section S2 of the r22 ¼ cosðpitchÞcosðyawÞ Supplementary Material). The iOS operating system provides the r23 ¼ sinðpitchÞ programmer with this derived information through its CoreMotion r31 ¼ cosðrollÞsinðpitchÞsinðyawÞþcosðyawÞsinðrollÞ routines that handle the translation of the raw sensor data into the r32 ¼ sinðyawÞsinðrollÞcosðrollÞcosðyawÞsinðpitchÞ needed structural orientations. Foremost among these is magne- r33 ¼ cosðrollÞcosðpitchÞ tometer calibration that attempts to cancel out the effects of local The basic form of these equations will look familiar to anyone who has studied how rotations are accomplished in stereonet 2 Because Stereonet Mobile is available for free from the iOS App Store, the senior programs (e.g., Allmendinger et al., 2012) because they represent a author has no financial conflict of interest. single rotation accomplished by performing, in order, the three Fig. 1. Graphs showing sensitivity of (a) orientation, (b) magnetometer, and (c) accelerometer sensors on one of the iPhones used in this study. The sensors were sampled at ~30 Hz using the Sensor Kinetics Pro app available in the iOS app store. Compare this figure to Figure 2 of Novakova and Pavlis (2017). In each, green corresponds to the X1 axis, blue to the X2 axis, and red to the X3 axis (see Fig. 2 for the coordinate system). The inset diagrams magnify the graph to show the variability of the sensor data. In (b), the device magnetometer was perturbed by passing a metal object ~5 cm from the device at the times indicated. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 101

camera (Fig. 3b). When making a sighting measurement with the plane viewed edge-on, the pole to the device is assumed to be parallel to the strike direction and the long axis of the device par- allel to the true dip direction. For sighting measurements made down-dip, the trend and plunge of the pole to the phone is assumed to be equal to the dip azimuth and dip of the plane. Stereonet Mobile offers the user three planes formats to display planes data: (using right-hand rule), dip azimuth and dip, or as poles. Nonetheless, internally it keeps track of all planes measurements in the first of the three formats.

2.3. Redundant sampling

Novakova and Pavlis (2017) demonstrated that, for Android devices, transients in the sensor data d brief marked excursions from the long term average value of the sensor d are a serious issue. While transients appear to be much less of an issue for iOS devices, Stereonet Mobile nonetheless uses oversampling to avoid any such problems. Before starting sampling, however, the device must be stable. Stereonet Mobile determines device stability using the acceleration and rotation rate data provided by the device. Absolute stability is not necessarily desirable as Stereonet Mobile 0 0 0 Fig. 2. The iOS device coordinate system (X 1,X2,X3) and its relationship to a typical permits the determination of orientation by sighting and, when- structural geology North-East-Down (X1,X2,X3) coordinate system. Device orientation ever the phone is not held against the rock, small motions are is determined by transforming the unit vectors pb and b[ into the unprimed geographic inevitable. Thus, stability in Stereonet Mobile is defined as user ac- coordinate system. Selected direction cosines of the transformation matrix are shown. < 2 < Many programs use the Euler angles pitch, roll, and yaw to determine device orien- celeration rates of 0.04 m/s and rotation rates of 0.09 radians/s, tation but iOS also provides the programmer with access to the rotation matrix and values that were picked by trial and error. Stability constraints help quaternions. Stereonet Mobile uses the former. to avoid inadvertent recording of data while the device is moving. Once the user holds the device stably for 1 s, Stereonet Mobile determines the orientation every 100 ms and displays the mean rotations about the three axes (i.e., three matrix multiplications). and standard deviation of all measurements for as long as stability The matrix, r, is an orthogonal transformation matrix between is maintained. For example, if the user holds the phone on a the device coordinate system and the North-East-Down (NED) co- bedding surface for 5 s, the orientation and error displayed (Fig. 3) ordinate system familiar to structural geologists (because dips and and recorded will reflect the average of 40 measurements ((5 s - 1 s plunges are measured with positive downwards). To translate de- wait time) 10 samples/s). If the error in strike or dip exceeds 3 or vice orientation to geological orientation, we simply calculate the the device is moved above the stability threshold, the values are orientation of a unit vector parallel to X0 (i.e., the pole to the de- 3 deleted and averaging begins anew. The same standards are used vice) for planes and another unit vector parallel to X0 , the long axis 2 for measurements and for measurements of planes by of the device, for lines (Fig. 2). In terms of direction cosines in a NED sighting with the device camera. coordinate system, the pole to the phone and the geological surface This sampling procedure is useful for eliminating random errors against which it is held is given by: including sensor transients, but it does not eliminate systematic errors such as those that arise from the nearby environment. If the : ¼ pole north r31 magnetic field is continuously perturbed by the presence of a : ¼ pole east r32 nearby metal object, data redundancy will not fix the problem. The : ¼ pole down r33 standard way to attempt to reduce such problems is by magne- Likewise, a lineation's direction cosines are: tometer calibration. For iOS devices, this is achieved by waving the phone in a figure-8 pattern or tilting and rotating the phone. In iOS ® 10 and with recent Apple devices, one almost never sees the lineation:north ¼ r 21 calibration screen, reflecting the increasing sophistication of the lineation:east ¼r 22 CoreMotion routines and services provided to the programmer. lineation:down ¼r 23 Nonetheless, in our experience, moving the phone in a figure-8 Because Stereonet Mobile uses the pole to the device, the user before starting measurements at a new outcrop or after making can place the back of the phone flush on the bedding surface in any several measurements still seems to give better results than just orientation to measure the surface of interest. We have not noted assuming the operating system is giving the best possible any significant variation in accuracy when the phone is held in orientations. different positions, including upside-down. To measure a line, the long axis or edge of the phone must be parallel to the lineation on 3. Comparison to analog compass readings the rock but the back of the phone need not be flush against the rock. Stereonet Mobile can simultaneously measure the orientation In this section, we compare both Stereonet Mobile and Fieldmove of a plane and a line it contains by placing the back of the phone Clino to measurements made by traditional analog compasses. An flush on the rock with the long axis parallel to the lineation in the iPhone 6s and an iPhone 7, both running iOS 10.3 were used for the plane (Fig. 3a). digital measurements. Two traditional Brunton compasses, each a In cases where one would not want, or cannot, place the phone few decades old, were used to measure the strike of a plane and on the surface to be measured, Stereonet Mobile is also capable of then the dip as separate measurements. A newer Brunton Geo measuring a plane's orientation by sighting through the device compass was also used to measure dip azimuth and dip of planes in 102 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112

Fig. 3. Screen captures of Stereonet Mobile in data capture mode. (a) Data capture by placing the device directly on the rock surface to be measured. The app is capable of capturing both the plane and a line in the plane in a single measurement. (b) Data capture by sighting parallel to the strike direction using the device camera. The green circle in the lower right shows that the direction of sight (pole to the phone) is within 2 of horizontal. In both cases, once stable the phone measures the orientation of the device every 100 ms and reports the uncertainty to the user. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

a single measurement, as one would do using a Freiberg compass. instead, we wanted to calculate the best average determination of The traditional Brunton provides a more precise measure of dip slab orientation. The actual number of individual measurements than the Geo, simply because of the larger scale of the clinometer. by Stereonet Mobile is much larger because each of the 30 mea- Note that, for analog compasses, strike and dip are commonly in- surements represents the average of many tens of measurements dependent measurements whereas the phone measures the pole to at 100 ms intervals. the plane in a single measurement. Fig. 4 depicts the results of this controlled test on an equal area, lower hemisphere projection. The a95 uncertainty cones for the 3.1. Controlled test mean vector of each individual group of 30 measurements vary from 0.4 to 0.6. The angular difference between the mean vectors The first set of observations were collected in a highly for each of the devices at each of the orientations is 2 . This controlled environment. A thin, heavy, flagstone of Archean Elba difference is, in some cases, large enough that the uncertainty Quartzite from the Raft River Mountains of northwestern Utah cones do not overlap. However, in a real world case, it is highly measuring 96 by 53.5 cm was propped up at different angles in an unlikely that a difference of <2 would make the slightest differ- outdoor setting away from environmental noise (e.g., power lines, ence in all but the most demanding applications, in which case metallic structures). Most of the surface roughness of the Elba is at one would be unlikely to be using either an analog or digital a scale smaller than the area of the back of the compass or phone. compass! The person making the measurements removed all metallic ob- The rose diagram (Fig. 4) shows the difference in strike between jects (keys, pocket knives, metallic wristwatches, writing in- the different devices for the 72 -dipping data set. Although the struments, etc.). The quartzite slab was tilted at 72,45 and 30 measurements are not identical, the maximum of the strikes for the and, for each dip orientation, we made 30 measurements each two iPhone apps and the analog compass measurements overlap. with Stereonet Mobile, with Fieldmove Clino, and with two types of As shown in the Supplementary Material, as the dip decreases from Brunton compasses at different places on the slab (Fig. 4). Because 90 , the difference in strike becomes increasingly larger than the there was no significant difference between the two types of angular difference between the planes. Thus, the angular difference analog compasses, those results were combined. No attempt was between poles should always be used for comparisons of made to link individual measurements by different devices; measurements. R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 103

Fig. 4. Controlled experiment using a flagstone of Elba Quartzite propped up at different angles. Thirty measurement each were made using the two smart phone apps, Stereonet Mobile and Fieldmove Clino, and two different analog compasses, a traditional Brunton and a Brunton Geo. The difference in mean vector (large circles show error cones) of the poles to the plane (small dots) for the three different dips are shown graphically and numerically. Zoomed in views in lower right show the a95 confidence cones for each of the three instruments at each of the three dips. Petals in all rose diagrams in this and subsequent figures are filled with alpha channel transparency so that the reader can see where more than one petal overlaps. Additional apparent colors are due to overlapping primary colors and partial transparency. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

3.2. Field test at Bear Valley, Pennsylvania Two different types of studies were conducted. In the first, the same spot on the rock was measured both with Stereonet Mobile The Bear Valley strip mine (Fig. 5) in the Anthracite District of and with a Brunton compass, a plane-by-plane comparison. In the the Pennsylvania Valley and Ridge province is a classic locality second, at three different sites, we measured ten strikes and dips (Nickelsen, 1979) visited by many generations of Northeastern U.S. using both the phone and the compass and, in one case, also using geology students. The spectacular three-dimensional exposures of the sighting capability of Stereonet Mobile. Both experiments tightly folded Carboniferous strata are removed from power lines sampled rocks on both limbs of the folds, though not in the same and metallic structures that might perturb the local magnetic field. place. We visited the site and collected comparative data using both In the plane-by-plane comparison (Fig. 6), most measurements Stereonet Mobile and traditional analog compasses in a typical field are close to each other but certainly not exactly the same. The situation where no special attempt was made to remove metal median mismatch is 2.7 and average is 3.2 ± 2.25 with the dis- objects from pockets, belts, etc. Because the site was stripped to a tribution significantly skewed towards smaller angles (Fig. 6b). Four single stratigraphic horizon, in many places in the pit, topographic out of twenty-four measurements have mismatch angles exceeding contours lines d constructed from the Pennsylvania state LiDAR 5.5. While we presume that the analog compass measurements survey with a resolution of 2 ft (0.62 m) d parallel strike of the are more accurate, we have no independent means of verifying that bedding. Thus, one can visually compare strikes measured at the assumption. Using the poles to bedding measured by the iPhone, site with local contours to assess accuracy of the iPhones; the fitis the best-fitting fold axis as determined by the phone differs by just quite good in most cases. Two exceptions are at site 1, where the 0.1 from that determined by the analog compass. In other words, nose of an was excavated to construct an access road, and both data sets work equally well to determine the fold axis in these locally where the device GPS mislocated the measurements by folded strata. Differences between phone and compass measure- ~15 m (Fig. 5). In the latter case, the measurements were made in a ments lack consistency suggesting that the variations are random narrow valley with limited sky view. (Fig. 6, zoomed view). 104 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112

Fig. 5. Topographic map of part of the abandoned open pit at Bear Valley, Pennsylvania. Topographic contours constructed from the Pennsylvanian state LiDAR data set, originally at 2 ft. (0.62 m) intervals. For clarity, only 10 ft. (3.05 m) contours are shown. Because the pit was stripped to a single stratigraphic horizon, contour lines should approximate strike of bedding in many parts of the pit, though not at Site 1. The red strikes and dips were measured with an iPhone 7 and are plotted on the stereonet in Fig. 6; the blue strikes and dips were measured with an iPhone 6s and plotted in Fig. 7; additional strikes and dips shown in black. Locations generally have uncertainties of ±5to±10 m. All sites also have analog compass measurements but those data are not plotted here. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

In the second Bear Valley data set, average measurements of northern Chile, combined with unique suites of surface cracks about 1 m2 of three different bedding surfaces were determined visible from space, make this comparison possible. Along with (Fig. 7). In this case, while observations from iPhone and compass Chilean colleagues, the senior author and his students have been are very similar, the mismatch angles of the mean vectors of the studying these surface cracks for the last 15 years (Baker et al., poles (3.5e4.3) are slightly larger than the a95 uncertainty cones 2013; Gonzalez et al., 2008; Loveless et al., 2005, 2009) and have (<2). For the most gently dipping of the three bedding sites mapped more than 50,000 individual crack traces on Google Earth measured, the rose diagram (Fig. 7) shows that the strikes of the and IKONOS imagery. phone measurements appear consistently rotated clockwise by In 2014, the Mw8.1 Pisagua earthquake, located just offshore of 5e10, though the actual angular difference between the poles is northern Chile (Fig. 8), produced a new suite of fresh surface cracks less than 4. If we calculate the fold axis from bedding poles which, in virtually all cases, reactivated the long-lived surface determined from the iPhone measurements, the result differs by cracks visible on the satellite imagery (Fig. 9). The first and third 4.4 with most of that difference in the plunge angle. Although we authors documented the orientations of more than 3700 fresh, do not know with great certainty the source of the mismatch be- coseismic cracks in 14 days of field work soon after the earthquake tween iPhone and compass measurements, the geologist who (Loveless et al., 2016; Scott et al., 2016). All of the original obser- collected this data set was wearing a metal wristwatch, which can vations are available in the supplemental material associated with produce visible perturbations in the device magnetometer readings Scott et al. (2016). These new cracks were measured using an when held closer than 10 cm to the face of the phone (Fig. 1b). iPhone 4s and an iPhone 5s running the Fieldmove Clino app (Stereonet Mobile did not exist at that time). Of course, not all sur- 4. Independent assessment of phone accuracy face cracks were reactivated during the Pisagua earthquake so our measurements capture only a subset of the cracks visible from We generally assume that the analog compass is the canonical space. Nonetheless, this data set gives us a quantitative basis to instrument and any deviation when compared with a phone compare phone-measured orientations with those visible in the measurement at the same locality indicates a deficiency of the imagery, independent of analog compass measurements. Though phone. However, for any single phone-compass measurement pair, our iPhone measurements were checked periodically with analog we have no independent means of verifying that the analog com- compass measurements, it is unlikely that we would have been able pass is more accurate. In this section, we compare a large number of to make 1/10th as many measurements without using the phones iPhone measurements, not to compass measurements, but to the as primary data collection devices. orientations of the structures visible on Google Earth imagery. The Because the surface cracks approximate vertical planes, the almost complete lack of vegetation in the Atacama Desert of determination of the strike depends completely on the R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 105

Fig. 6. Measurement by measurement comparison of Stereonet Mobile and Brunton compass measurements at Bear Valley, Pennsylvania. (a) Both poles (dots) and planes (great circles) are shown. The arcs in the zoomed in views on the left connect each analog compass measurement (in red) with the corresponding phone measurement (in black). Although most of the difference is in the strike value, there is no consistent difference. In some cases the phone measurement is rotated clockwise and in other cases counter clockwise with respect to the compass measurement. Difference between the calculated fold axis from the two different data sets is 0.1. (b) Histogram of the angular mismatch of poles to planes between phone and compass for each of the 24 measurements in (a). (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) 106 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112

Fig. 7. Ten phone and ten Brunton measurements of three different irregular bedding surfaces, showing planes (great circles) and poles (dots) as well as mean vectors and a95 uncertainty cones for each population. The delta angles are the difference of the mean vectors of each population at each site. For the lowest dipping strata, ten measurements of bedding using Stereonet Mobile's sighting routine were also made (blue great circles). The rose diagram of strike directions shown for the lowest dipping site indicate that the phone strikes are rotated clockwise from the Brunton Geo strikes by about 5e10, although the angular difference of the poles are just 3.7. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) magnetometer and thus represents the best test of the most sen- satellite image with yellow lines parallel to the phone-measured sitive sensor of the phone (see also Section S1 of the Supplementary strike of the coseismic cracks and a rose diagram comparing the Material). The cracks, however, do have significant irregularities at long-term cracks on the imagery to the coseismic cracks measured various scales along strike (Fig. 9) such that measurement in the with phones. All satellite images had some basic image processing, field necessarily involves some visual averaging, increasing the including contrast and tonal enhancement, sharpening, and uncertainty of the measurement. Because uncertainty in location denoising, to render them easier to see for publication. The statis- exists for any GPS receiver, commonly on the order of 5e10 m, we tics for each of the sites and data sets are summarized in Table 1. cannot always relate the orientation of every measured crack on the For all sites, the circular mean of the coseismic crack orientation ground to those visible in satellite imagery. However, the spacing of measured with phones is within about 10 of the mean of the long- the cracks is typically larger than the uncertainty in location of the term crack orientation measured on the imagery and, in all cases, the phone measurements and thus a one-to-one correlation can be uncertainty ranges overlap at the 2s level (Table 1). Furthermore, the made surprisingly frequently. Finally, one should not expect perfect azimuthal bins with the maximum number of strikes are identical in agreement between long-term cracks measured on satellite imag- all but one case, even though the average reflects all orientations of ery and those fresh coseismic cracks measured on the ground: the the long-term cracks whereas the Pisagua earthquake cracks latter constitute only a small subset of the former and at any represent just a subset of the orientations at each site. This state is particular site, only those cracks which were suitably oriented for perhaps clearest at the Caleta Buena site (Fig. 11) where long-term reactivation opened coseismically. cracks with azimuths between 045 and 090 are common but We have chosen four sites out of the 72 visited to show here were not very suitably orientated for reactivation during the Pisagua (Figs. 10e13). One can see the long-term cracks, in which the fresh earthquake. Likewise, the Pampa de Tana site (Fig.13) has numerous coseismic cracks occur (Fig. 9a), clearly in the imagery at these four NNE to NS striking long-term cracks that were not reactivated. sites and they demonstrate well the relationship between coseis- The Punta de Lobos fan (Fig. 10) and the Caleta Junin (Fig. 12) mic crack orientations measured in the field using iPhones and the sites have the most impressive correlation between long-term orientations of cracks in the imagery. For each site, we show both a crack orientation as documented with satellite imagery and R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 107

Fig. 8. Map of Pisagua earthquake and location of the four sites depicted in Fig. 10e13 depicted with large yellow stars. Locations of the main shock as well as a significant foreshock and aftershock are shown. The colored “butterflies” show the average and 2s uncertainty of crack orientations at each of the 72 sites studied. See Scott et al. (2016) and Loveless et al. (2016) for more information. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) coseismic crack orientation measured with iPhones. Both visual Brunton compass (Fig. 10). The Brunton measurements are statis- inspection of the images, the rose diagrams, and the statistics all tically indistinguishable from the coseismic crack orientations show that the iPhones captured the orientations very well. Thanks measured with iPhones using Fieldmove Clino. Overall, these four to a previous study at Punta de Lobos (Baker et al., 2013), we also sites are representative of the coseismic crack data set as a whole in have on-the-ground, long-term crack measurements made with a terms of fidelity to local orientations. 108 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112

Fig. 9. Typical coseismic cracks produced during the Pisagua earthquake. (a) A long-term crack filled with aeolian sand (marked by white arrows) showing fresh reactivated cracks in the middle. (b) Detail of a fresh coseismic crack cutting across faintly visible tire tracks. R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 109

Fig. 10. Punta de Lobos fan surface (Baker et al., 2013) shown in a Google Earth image and the locations and orientations of coseismic cracks, measured with phones in the field, shown as short yellow line segments along three transects. Circular histogram (rose diagram) shows the orientations of all long-term cracks measured on the imagery along the transects (red petals), long-term cracks measured with Brunton compass (green petals) and the orientations of coseismic cracks measured with iPhones (blue petals). There is no significant difference between iPhone and Brunton measurements. The mean vector for the imagery-measured cracks captures a small population of NW-striking long-term cracks that were not reactivated during the earthquake. Coordinates of image center are: 21.03846S, 70.123084W. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 11. Caleta Buena site. The Pisagua earthquake preferentially reactivated the NW-striking cracks at this area, with only very minor reactivation of the prevalent NE-striking long- term cracks. Yellow line segments are strikes of coseismic cracks measured with phones in the field. Coordinates of image center are: 19.895783S, 70.077480W. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.) 110 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112

Fig. 12. Caleta Junin site, located close to the epicenter of the Pisagua earthquake. Correlation of long-term cracks mapped on Google Earth and coseismic cracks measured with iPhones is particularly good at this site as the long-term cracks are relatively unimodal and were well-oriented for reactivation during the earthquake. Yellow line segments are strikes of coseismic cracks measured with phones in the field. Coordinates of image center are: 19.692243S, 70.128908W. (For interpretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Fig. 13. Pampa de Tana site showing preferential reactivation of the WNW-striking long-term cracks and relatively infrequent reactivation of the prominent, though secondary, ~NS- oriented cracks. Yellow line segments are strikes of coseismic cracks measured with phones in the field. Coordinates of image center are: 19.401761S, 70.137968W. (For inter- pretation of the references to colour in this figure legend, the reader is referred to the web version of this article.)

Table 1 Summary of circular mean vector statistics for crack measurements in Northern Chile.

Punta de Lobos Caleta Buena Caleta Junin Pampa de Tana

mean vector & 2s uncertainty long-term image 354.1 ± 7.1 313.6 ± 25.3 347.8 ± 19.0 297.0 ± 9.2 long-term Brunton 004.3 ± 4.9 N/A N/A N/A coseismic 006.9 ± 9.2 323.1 ± 16.3 352.6 ± 12.5 286.3 ± 12.3 Bin azimuth w/max count long-term 001 - 010 331 - 340 351 - 360 281 - 290 long-term Brunton 001 - 010 N/A N/A N/A coseismic 001 - 010 321 - 330 351 - 360 281 - 290 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 111

5. Discussion have little incentive to make phones that are ideal for the structural geologist's purpose. 5.1. Lessons pertinent to using iPhones as data collection devices Regardless of the device purchased, one should always do careful tests similar to those described here to determine the reli- In most cases, the angular mismatch between measurements ability of their individual instrument before heading out to the made with several different iPhones and with traditional analog field. General reputation of a manufacturer does not guarantee that compasses or measurements on satellite imagery differ by less than the individual device will be adequate to the task. If a particular 10. In the case of the satellite imagery, the mismatch is probably device proves faulty, many apps, including those described here, much smaller than shown because of the inclusion of unreacti- can still be used as data recorders, providing the user with auto- vated, long-term cracks in the mean orientation calculation as re- matic time, date, and location tagging of all observations. flected in the large and overlapping uncertainty intervals in the When using a smart phone in the field, special care beyond that data sets (Table 1). In places where one can with confidence visually normally used with analog compasses should be taken around relate field observations with specific cracks on the ground (e.g., metal objects, magnets, and other electronic devices. For example, Caleta Junin, Fig. 12), the correlation is surprisingly good. Overall, many phone cases have magnetic clips or closures that can thor- our 3700 iPhone measurements in northern Chile provide robust oughly spoil your phone readings. Additionally, the user should be proof that iPhones can be used in the field with good results. careful to remove from proximity seemingly innocent things like The data from our controlled test using the Elba Quartzite metal wristwatches, pens, hand lenses, pocket knives, tablets and flagstone (Fig. 4) at various dips demonstrates that iPhone mea- laptops, etc. surements can be very reliable when appropriate precautions d Even though the magnetometer calibration screen seldom ap- removal of metal objects and electronics from the person making pears anymore in iOS 10, in our experience, it is a best practice to the measurements d are taken. When multiple measurements perform similar motions (figure-8s, tilting the phone in all orien- from the phone are averaged, they are just as good and nearly tations) before starting on any new outcrop. Additionally, similar indistinguishable from a similar number of averaged measure- calibrations should be undertaken periodically on a single outcrop ments from traditional compasses. Both phone and compass have or whenever a reading does not appear to make sense, or where uncertainties and an average of analog measurements should be digital and analog measurements differ significantly. Using a pro- compared to an average of digital measurements. gram that can display an orientation on a high-resolution satellite No significant difference exists between the two iPhone pro- image so the user can verify that a measurement agrees with local grams tested, Stereonet Mobile and Fieldmove Clino, probably geologic strike of the feature being measured can provided added because both use the same iOS CoreMotion routines to calculate the confidence. Several field-based GIS systems, Fieldmove Clino, and orientation of the phone and thus the structure. Fieldmove Clino the latest version of Stereonet Mobile can all do this. deployed on Android devices (Novakova and Pavlis, 2017) appears It goes without saying that any phone being used for data to be hostage to lower quality sensors. The iOS version performed collection should be protected from dust, water, and other abuse in very well in our northern Chile coseismic crack study. It is incum- a ruggedized, non-magnetic case. In some ways, data collection bent upon developers to explain how their software works to sci- with a phone may actually be more secure than in a notebook: entists who rely on their apps to collect priceless data. It would be whenever the user has a cell or Wi-Fi signal, s/he can simply email useful to know, for example, what averaging schemes, if any, the current data file to themselves. This facilitates back up of critical Fieldmove Clino uses and how it calculates orientation as we have field data at more frequent intervals than one would do if they had done here with Stereonet Mobile. to wait until returning to town to find a photocopy shop to copy The field test at Bear Valley (Figs. 5e7) likewise demonstrates one's field notes! that iPhones can be useful in a traditional field setting and, though Standard field gear should include large capacity, rechargeable perhaps not quite as accurate as analog compasses, can in aggregate lithium ion batteries. Small, portable batteries with capacities provide useful information in a fraction of the time required to use exceeding 20,000 mAh cost less than $50 and can recharge a smart the compass. The cylindrical fold axis determined by both phone phone completely 5e7 times. When we were using our phones to and compass measurements from the same outcrops differs by less make 300 or more measurements/day in Chile, the battery would than 5. The strikes also compare very well to contours of the LiDAR become completely depleted at or even before the end of a 10 h topography of the area (Fig. 5). The Bear Valley data set also high- field day. With 4 or 5 days between return trips into town, having lights the Achilles heel of all smart phone measurements: the such batteries available in one's camp and backpack is essential. sensitivity of the device to local magnetic fields. In one case (Fig. 7), a systematic difference in strike of up to 10 may have been caused 6. Conclusions by the geologist's metal wristwatch that was reasonably close to the ® phone during measurement. However, even in that case, the actual With some modest precautions, Apple iPhones can be suc- angular difference between phone and analog compass measure- cessfully used by structural geologists as data collection devices in ments is less than 4. the field. We have no direct experience with Android devices, but the work of Novakova and Pavlis (2017) is less encouraging for 5.2. Best practices for smart phone data collection those devices. Both studies, however, tested an infinitesimally small number relative to the total number of devices that have been The four different iPhones tested here are demonstrably supe- produced of each type and, furthermore, operating systems and rior for data collection to the two Android devices tested by device components change frequently. As of today, the structural Novakova and Pavlis (2017). This outcome suggests that anyone geologist will still want to take their analog compass to the field contemplating data collection with a smart phone should consider with them and verify their phone observations. Anyone contem- their device purchases very carefully, prioritizing quality and reli- plating data collection with any smart phone needs to carry out ability over economy. However, on both platforms, phone compo- extensive tests of the kind performed here to verify that the data nents and operating systems change frequently and no one can collected are reliable. guarantee absolutely that the most reliable phone today will be so When testing mobile devices, four best practices should apply: two years from now. Unfortunately, most phone manufacturers First, because both phone and analog compass measurements have 112 R.W. Allmendinger et al. / Journal of Structural Geology 102 (2017) 98e112 uncertainty and natural surfaces are inherently irregular, one Haakon reminded us of the Ramsay and Huber quote that appears should make multiple measurement of the same surface using each in the first paragraph. We are likewise grateful to Terry Pavlis and type of instrument and compare the averages of the measurements. Steve Whitmeyer, and Editor William Dunne for expert reviews of Comparing one-off measurements, as has commonly been done in this manuscript though they may not necessarily agree with all of the past, fails to acknowledge that uncertainty exists in all mea- the conclusions. The collection of the northern Chile field data was surements with any type of instrument. Second, when evaluating made possible by a RAPID grant from the U.S. National Science planar orientations, one should always compare the angular dif- Foundation, EAR-1443410. ference between poles to the planes and not the difference in strike or dip. At low to moderate dips, the strike can differ significantly Appendix A. Supplementary data between two measurements even though the actual angular dif- ference between the planes as determined by the poles is small. Supplementary data related to this article can be found at http:// Third, the user should invest in a program that monitors the device dx.doi.org/10.1016/j.jsg.2017.07.011. sensors over time, note transients, and experiment with the effect of proximity of external metallic objects on the phone magne- References tometer. Several such apps are available for free or at modest cost in the app stores for both Android and iOS devices. Finally, where Allan, A., 2011. Basic Sensors in iOS: Programming the Accelerometer, Gyroscope, and More, 1 ed. O'Reilly Media, Sebastopol, California. 108 pp. possible the user should compare their phone measurements, not Allmendinger, R.W., Cardozo, N., Fisher, D., 2012. In: Structural Geology Algorithms: only to analog compass measurements, but also to data indepen- Vectors & Tensors. Cambridge University Press, Cambridge, England, 289 pp. dent of the magnetic field such as the LiDAR topographic contours Baker, A., Allmendinger, R.W., Owen, L.A., Rech, J.A., 2013. Permanent deformation e (Fig. 5) and the Google Earth images (Figs.10e13) used in this study. caused by subduction earthquakes in northern Chile. Nat. Geosci. 6, 492 496. Cawood, A.J., Bond, C.E., Howell, J.A., Butler, R.W.H., Totake, Y., 2017. LiDAR, UAV or Smart phones have already replaced compact cameras, video compass-clinometer? Accuracy, coverage and the effects on structural models. cameras, GPS receivers, music players, digital voice recorders, ex- J. Struct. Geol. 98, 67e82.  ercise monitors, clinometers, and reference libraries. In each of Gonzalez, G., Gerbault, M., Martinod, J., Cembrano, J., Allmendinger, R., Carrizo, D., Espina, J., 2008. Crack formation on top of propagating reverse faults of the these cases, the question was not whether the phone was superior Chuculay System northern Chile: insights from field data and numerical to the dedicated device that it replaced but whether it was good modeling. J. Struct. Geol. 30, 791e808. enough for the purpose at hand. The results presented here suggest Hama, L., Ruddle, R.A., Paton, D., 2014. Geological Orientation Measurements Using an IPad: Method Comparison. TPCG, pp. 45e50. that measuring orientations with iOS devices has achieved that Loveless, J.P., Allmendinger, R.W., Pritchard, M.E., Garroway, J.L., Gonzalez, G., 2009. status for all but the most demanding applications. In most use Surface cracks record long-term seismic segmentation of the Andean margin. cases, the accuracy of the iPhone is more than sufficient given the Geology 37, 23e26. Loveless, J.P., Hoke, G.D., Allmendinger, R.W., Gonzalez, G., Isacks, B.L., Carrizo, D.A., variability of the natural feature being measured. Additionally, 2005. Pervasive cracking of the northern Chilean Coastal Cordillera: new evi- because the rapidity and ease of use, iOS devices have a distinct dence of forearc extension. Geology 33, 973e976. advantage over analog compasses: multiple measurements can be Loveless, J.P., Scott, C.P., Allmendinger, R.W., Gonzalez, G., 2016. Slip distribution of the 2014 MW¼8.1 Pisagua, northern Chile, earthquake estimated from coseis- made rapidly and uncertainty instantly assessed. Making a single mic fore-arc surface cracks. Geophys. Res. Lett. 43, 10134e10141. measurement with an analog compass and paper field notebook is Midland Valley, 2017. In: Fieldmove Clino: Android Users Guide. Midland Valley, so time consuming that geologists seldom make more than one Glasgow, Scotland, 38 pp. measurement at a site and thus have no way to assess uncertainty. Mookerjee, M., Vieira, D., Chan, M., Gill, Y., Pavlis, T.L., Spear, F., Tikof, B., 2015. Field data management: integrating cyberscience and geoscience. Eos 96, 18e21. Orientation data collection is entering the age of data redundancy Nickelsen, R.P., 1979. Sequence of structural stages of the alleghany , at the and that is a good thing. Bear Valley strip mine, shamokin, Pennsylvania. Am. J. Sci. 279, 225e271. 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, Acknowledgments 93e103. Ramsay, J.G., Huber, M.I., 1983. In: The Techniques of Modern Structural Geology, The senior author thanks Paul Karabinos, Nestor Cardozo, and Volume 1: Strain Analysis. Academic Press, London, 307 pp. Scott, C.P., Allmendinger, R.W., Gonzalez, G., Loveless, J.P., 2016. Coseismic extension Haakon Fossen for beta testing Stereonet Mobile. Comments from from surface cracks reopened by the 2014 Pisagua, northern Chile, earthquake Fossen and Cardozo have helped to improve the manuscript; sequence. Geology 44, 387e390.