Transforming between coordinate systems
Please find attached a matlab script that will convert data back and forth between ENU, XYZ, and Beam coordinates. ![]()
The script has many uses but at Nortek we often use it to convert data to beam coordinates, make necessary corrections to the raw data, and then convert back to XYZ or ENU.
Please note that the transformation matrix for each instrument can be found in the header (*.hdr). The numbers shown scale with 4096. Her is an exmple for a Vector file:
Transformation matrix
11134 -5672 -5486
-115 9484 -9390
1441 1417 1317
Best regards,
Atle Lohrmann
I have been using the Vector ADV together with an echo sounder, and I plan to use the tilt and roll data from the ADV to convert my acoustic data to ENU coordinates.
Admittedly I do not know a lot about tilt-roll sensors. Looking at the script, however, I see that the tilt/roll has to be given in a specific order, i.e. like a gimbal system. Is this correct?
The reason for asking is that I have seen (and used) other definitions of tilt and roll, where the angles are independent. In that case the tilt angle was defined as the angle between the YZ-plane and the Yz-plane and roll as the angle between the XZ-plane and the Xz-plane, where XYZ and xyz were the static and rotated coordinatesystem, respectively.
Hope someone can clarify this for me, as I have too many coordinate transformations to keep track of at the moment

Best,
Nils Olav
Nils Olav
I understand the question and I must admit thinking about the problem gives me an headache
'> The saving grace here is that the different assumptions about the exact order of the tilt (and yes, I agree the script assumes a certain order) become irrelevant when the tilt angles are small. To this you can add the fact that there can be small inaccuracies (a few 1/10 of degrees) in the measurements. The conclusion is that the different transformations you can use all collapse into one when the tilt angles are less than 10 degrees (I am not going to calculate it all out but sine and cosine are pretty much linear - or 1 - with an accuracy of 2 % within this range).
I hope this hopelessly imprecise answer is of some help....
'> - Atle Lohrmann
Indeed, this is where engineering and math meet 
Anyway, I have made a matlab function to plot my system. It is slightly different than the XYZ ADV coordinates (Z is downward). The ENU is the same, though.
Plotting it helps for the headache 
Nils Olav
Hi
Really nice script - and a cool 3D plot - but I really do not see how it would make my headache go away
- Atle
Atle,
I am having trouble downloading this MATLAB script from the Nortek website. I have contacted the site administrator, but was wondering if you might be able to email me a copy or repost? Thank you.
Mike
Dear Mike
I am not quie sure I understand. When I save the file on my computer it looks just like the normal m-file. The name of the file is a little strange but you can just rename it.
Best regards, Atle Lohrmann
Hello, i am trying to understand the mathlab fille, a want to transform from xyz, to ENU, i am using a vector with horizontal sensor.I have a doubt aboUt the T MATRIX (WATH KIND OF DATES I HAVE TO PUT INSIDE??? VELOCITIES IN XYZ?????.
AND THE FUNCTION STATUSBIT ...HOW CAN I USE IT ... I DONT UNDERSTAND????
AND WHAT IS TE OBJECTIVE OF THE T/4096?????
PLEASE HELP ME !!!!!!!!
MY EMAIL IS iranyvera@hotmail.com
Hi, here are a few postings you may want to consult:
http://www.nortek-as.com/forum/velocimeters/30181077#356071153
http://www.nortek-as.com/forum/velocimeters/675713976#107399116
http://www.nortek-as.com/forum/velocimeters/30180983#758616362
Most of all of this is just math -- a book about linear transformations may be a good place to start.
Enjoy the weekend! Best regards, Atle Lohrmann

