Beam2ENU
I have been using Beam2ENU Matlab script on the Beam data in the wad file (see previous topic), and have it running successfully (I think). However, the output velocities seem to high (being significantly greater than the beam velocities). Is that what I should expect. The output velocities also seem too high, given my knowledge of the site.
Here is a sample of the input and output (2 data points)
Heading 205.2
Pitch -1
Roll -1.5
Beam1 Beam2 Beam3 x y z e n u
-0.1 0.906 -0.033 -0.84659082 -1.28287207 0.284213379 -0.795602648 1.30375017 0.332424322
0.024 0.842 -0.057 -0.581556641 -1.228223633 0.297449707 -0.85877527 1.040382514 0.339598304
Thank you.
Kevin
Just keep asking, I am sure you are not the only one having these questions
'> After the clarification in the previous topic I guess the question now is how to convert from XYZ to ENU coordinates. So I have added a Matlab-script to do that.
This is a general script, for those of you who want to use it for other instruments, remember to substitute the beam to xyz transformation matrix with the actual values from the header file. The script takes into account the orientation of the system that is reported in the status byte.
With up orientation, your sample data point then becomes
X Y Z East North Up
-0.1 0.906 -0.033 0.8617 -0.2939 -0.0550
Best regards,
Sven Nylund
I am still using the BEAM coords from the wad file and trying to get to either xyz or enu. From previous correspondence these are from the first wave bin above the blanking distance.
My system is the horizontal (ie it lies flat on the bed) 2MHz ADCP, with the beams pointing up (at 90 degrees to the casing). The Transformation matrix in the header file of this instrument is the same as in the Beam2ENU script that I have been using. I obtained this script from elsewhere in this forum.
If I call Beam2ENU with the [Beam1; Beam2; Beam3] data
[-0.1; 0.906; -0.033]
this is what I get returned:
MATLAB command window (with some line breaks removed)
>> heading=205.2
heading =
205.2000
>> pitch=-1
pitch =
-1
>> roll=-1.5
roll =
-1.5000
>> beam=[-0.1;0.906;-0.033]
beam =
-0.1000
0.9060
-0.0330
>> [enu, xyz] = Beam2ENU(heading, pitch, roll, beam)
enu =
-0.7956
1.3038
0.3324
xyz =
-0.8466
-1.2829
0.2842
>>
I can't see the problem in the function Beam2ENU, but these numbers seem way too high. I wonder if it is because I am using a horizontal instrument, and heading, pitch or roll is handled wrongly in Beam2ENU. For example, even though the numbers in the transformation matrix are the same, should they be entered in a different order, or something like that.
Again, any help would be appreciated.
Kevin
The point I made (or at least tried to make
As long as you work with the ASCII .wad file and the Aquadopp Profiler, the data you import will be in the same coordinate system as you configured the instrument for.
AWAC users should take note that this is different for the AWAC where the velocity data in the .wad file is in beam coordinates.
Best regards,
Sven Nylund
I said:
I am trying to find out what the Velocity fields (10, 11, 12) in the ADCP wad file are. Persumably they are the velocities used for PUV calculation of wave parameters in STORM.
At setup I nominated XYZ mode, so I presume the fields contain XYZ (as opposed to ENU or Beam data). However, which bin are these data from?
Torstein replied:
The coordinate system (ENU, XYZ, BEAM) depends on which instrument you use.
If you are using the Aquadopp current meter, then the coordinate system is that which you choose at configuration time.
If you are using the Aquadopp Profiler then the coordinate system is always in BEAM coordinates for the wave burst measurement. The coordinate system you specify in the deployment planning applies to the current profiles only.
Hence the confusion!
Thanks for your help in clearing this up.
Kevin
Having cleared up the confusion, I ran the (unchanged) xyz2enu script you supplied on the same data point that you tested (see above). Y
Your result:
With up orientation, your sample data point then becomes
X Y Z East North Up
-0.1 0.906 -0.033 0.8617 -0.2939 -0.0550
Here is my output using xyz2enu
>> clear
>> x=-0.1
x =
-0.1000
>> y=0.906
y =
0.9060
>> z=-0.033
z =
-0.0330
>> heading=205.2
heading =
205.2000
>> pitch=-1
pitch =
-1
>> roll=-1.5
roll =
-1.5000
>> status=0
status =
0
>> [e,n,u]=xyz2enu(x,y,x,heading,pitch,roll,status)
e =
0.8606
n =
-0.2921
u =
-0.1219
The results are very similar, except for the u, which seems to be quite a lot higher than you calculated (and higher than I would have expected). As I have changed nothing in the script, I am not sure what I have done wrong. Any idea?
Thanks again.
Kevin
Well, this is really confusing. I really do not understand what might be going on here. I suggest you start out with some really simple numbers which may indicate where the problem is. For example:
» [e, n, u]=xyz2enu(1,0,0,0,0,0,0);disp([e n u])
0.0000 1.0000 -0.0000
» [e, n, u]=xyz2enu(1,0,0,0,45,0,0);disp([e n u])
0 0.7071 0.7071
Single stepping through the function while checking each calculation might be something to try.
Best regards,
Sven Nylund
I spent some time trying to puzzle this one out. Then I noticed a small but significant typo - x,y,X,heading,... in my function call.
>> [e,n,u]=xyz2enu(x,y,x,heading,pitch,roll,status)
Sorry to have wasted your time.
Kevin
Hi I install storm but there are some problems.
1- There isn t any technical manual for this software and operators didn t know any thing about the method that used in .
2- what is the direction of velocity that showed as beam1-3 in software?
If this software has a technical manual please introduce or send to my email:gh.shiravani@gmail.com and also tell me about the direction of velocities that storm show them by beam1 beam2 and beam3.
thanks
1) I am afraid there is no separate printed manual for the software. The program operation is described in the online Help.
2) The velocities are along the transducer beams (positive away from the instrument)
Best regards,
Oistein
Hi all,
Thanks for the information, i've been reading your posts and i have much clearer idea now. But still have some questions.
Where can i find this Beam2ENU.m file?
I have another transformation file i found somewhere in the forum but it applies a correction to the heading angle that i don't get,
hh =pi*(heading-90)/180;
why do they subtract 90º??
In our case, we have the Aquadopp mored on the bay and pointing upwards, then we don't need to apply the tilt matrix to our data, is that correct?
Thanks,
Mireia Lara
Previously kep wrote:
Hi Kevin,
Just keep asking, I am sure you are not the only one having these questions" />
'>
After the clarification in the previous topic I guess the question now is how to convert from XYZ to ENU coordinates. So I have added a Matlab-script to do that.
This is a general script, for those of you who want to use it for other instruments, remember to substitute the beam to xyz transformation matrix with the actual values from the header file. The script takes into account the orientation of the system that is reported in the status byte.
With up orientation, your sample data point then becomes
X Y Z East North Up
-0.1 0.906 -0.033 0.8617 -0.2939 -0.0550
Best regards,
Sven Nylund
Beam2ENU - matlab script.
Subtracting 90 degrees comes from the different between radians (0 is toward East) and geographical degrees (0 is pointing toward North)
- Atle Lohrmann
Thanks for that,
I still have some doubts because even aplying this transformation i get unrealistic vertical velocities.
By unrealistic vertical velocities I mean higher than 1m/s and higher than horizontal velocities, this is true also for the Z component of XYZ coordinates.
I read somewhere that profilers placed in shallow waters, as is our case (only 6m depth) can get an error in the conversion to ENU coordinates, is that true for an Aquadopp 2MHz?
Mireia Lara

