# SparkFun Forums

### Convert yaw, pitch and roll to Azimuth and elevation

General suggestions or questions about the SparkFun Electronics website

### Convert yaw, pitch and roll to Azimuth and elevation#162963

By Bob_Yeatman
#162963
Hi,
I have a sensor that gives my yaw, pitch and roll. How do I convert these values into azimuth and elevation (tilt). I have seen web pages giving lots of matrix match stuff. Can someone give me an example procedure/function (basic, C, Delphi, etc) that accepts the yaw, pitch and roll values and returns the azimuth and elevation (tilt). Any help would be appreciated!
Bob

### Re: Convert yaw, pitch and roll to Azimuth and elevation#162976

By Valen
#162976
Isn't yaw equivalent to azimuth, and pitch equivalent to elevation/tilt? Roll is a rotation along the resulting axis, so won't influence azimuth or elevation. Or is there an angular offset between these axis systems. What sort of thing are you darting around in the air here?

### Re: Convert yaw, pitch and roll to Azimuth and elevation#163153

By Bob_Yeatman
#163153
This sensor in inside of a long thin probe that goes into a borehole (no darting around in the air). The probe is often in a near vertical position but can also be used in a borehole tilted up to about 45 degrees. My problem is this... in a near vertical position turning the probe along its longitudinal axis changes the sensor's azimuth value (its how a point on the side of the probe is oriented relative to north - the compass); the roll and pitch are both about 0 because the probe is about vertical. When the probe is tilted at a 45 degree angle it seems to me that the roll and pitch now define the orientation of the probe's longitudinal axis (for example the probe's longitudinal axis is pointing north). The original azimuth value is now the probe's roll in the borehole. Very confusing Do you have any idea where I can find functions that will give me the probe's azimuth (compass direction of the probe's longitudinal axis) and elevation in an inclined borehole? Would these functions work when the probe in in a near vertical position? Thanks!

### Re: Convert yaw, pitch and roll to Azimuth and elevation#163156

By Mee_n_Mac
#163156
I think you will need to supply a link to the probe/sensor so "we" can see how the manufacturer defines the sensor's axes. Otherwise the definition of X, Y and Z, pitch, yaw and roll, etc will become very confused. My natural tendency is to think that rotation about the longitudinal axis would be called roll, yet you say the sensor changes it's Az value.
###### long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

###### Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

###### Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

###### Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]