TransWikia.com

How to convert Distance, Azimuth, Dip to XYZ?

Geographic Information Systems Asked on May 7, 2021

I have an excel spreadsheet with header and survey drill data. Header data contains hole ID, and location coordinates, and the survey data contains related downhole survey with Distance, Azimuth and Dip values.

Since I know the hole location and surface elevation, I would like to be able to convert the survey table to XYZ coordinates as well. Does anyone has a function / procedure / example? (VB & ArcObjects)

Header Data:

Header Data

Survey Data:

enter image description here

4 Answers

The question asks for conversion between spherical and cartesian coordinates. This spreadsheet lays out the formulas:

Spreadsheet screen shot

Blue lines are input, black are intermediate calculations, and red are output. Within the formulas, the values are referred to by the names in the [Parameter] column (assigned via the Insert|Name|Create operation).

They differ from those in most math/physics references because in geography, the azimuth is usually taken east of north rather than north of east. This makes the geographic azimuth the complement of the mathematical one (they sum to 90 degrees). Replacing an angle by its complement in any trig function interchanges it with its "co" partner: sine and cosine are interchanged, tangent and cotangent, secant and cosecant. Also, in many mathematical systems the "dip" is expressed as an angle from true vertical (a co-latitude) rather than as an angle from horizontal (a latitude), again causing an interchange of sine and cosine.

Edit 9/20/13

For a downhole distance you probably want to negate dZ.

Correct answer by whuber on May 7, 2021

While this is an old question, the other answers are not appropriate. Converting Distance (Measured Depth), Dip (Inclination), Azimuth to 3D coordinates depends on how you interpret what is happening between the locations where measurements were taken (survey stations). The standard practice today is "Minimum Curvature" where the assumption is that a circular arc connects each survey location.

http://www.drillingformulas.com/minimum-curvature-method/ gives full details on how to calculate the X, Y and Z locations. The relevant portions are:

dMD = Distance2 - Distance1
B = acos(cos(I2 - I1) - (sin(I1)*sin(I2)*(1-cos(A2-A1))))
RF = 2 / B * tan(B / 2)
dX = dMD/2 * (sin(I1)*sin(A1) + sin(I2)*sin(A2))*RF
dY = dMD/2 * (sin(I1)*cos(A1) + sin(I2)*cos(A2))*RF
dZ = dMD/2 * (cos(I1) + cos(I2))*RF

X2 = X1 + dX
Y2 = Y1 + dX
Z2 = Z1 + dX

Answered by Eric on May 7, 2021

As Eric writes, you can easily end up with a div_by_zero error here: You can however avoid this without testing for exact zero: When abs(B) is less than about 1e-9, the tan(B/2) term will be exactly (within the 64/53-bit precision of a double) the inverse of 2/B.

The easiest way to show this is with the Taylor series for tan(x) which is x + 1/3*x^3 + 2/15*x^5 + .... This means that the x^3 term will be so small compared to x as to be effectively zero.

The main advantage of doing it this way is that you avoid calculating tan() of a very small number which is likely to lead to many operations on sub-normal numbers. Sub-normal support is still very slow on many architectures so it is better to avoid it in the first place.

Answered by Terje Mathisen on May 7, 2021

Answered by Hazzem Emessery on May 7, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP