coordinate system rotation and then calculate position in new (rotated) system
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have a direction defined by azimuth and evation (e.g. Azi, Elev).
I would like to calculate values of these Azi i Elev after coordinate system
rotation: first around Z axis (angle e.g.: Zrot) and then around rotated (in first rotation
around Z axis) Y axis (angle e.g.: Yrot).
So: I rotate coordinate system around Z axis, then around "rotated" Y axis and I would like to
calculate Azi and Elev in rotated coordinate system.
I try
vrot = v*Rz*Ry
with
Rz = [ cosd(Azi) -sind(Azi) 0;
sind(Azi) cosd(Azi) 0;
0 0 1];
Ry = [ cosd(Elev) 0 sind(Elev);
0 1 0;
-sind(Elev) 0 cosd(Elev)];
But it seems that in this approach after first rotation (around Zo axis) we get new position in Old Coordinate System (POZo turns into POZn) and this new position (POZn) is then rotated around Yn axis.
But my goal is a bit different: I would like rotate XoYoZo system around Zo axis, get POZo in New Coordinate System (POZo in XnYnZn) and finally rotate XnYnZn system around Yn axis and obtain POZo after this rotation.
If it can be done somehow in matlab?
0 comentarios
Respuestas (1)
darova
el 16 de Mzo. de 2020
Here is the solution
v1 = Rz*v(:);
[az1,el1] = cart2sph(v1(1),v1(2),v1(3));
v2 = Ry*v1(:);
[az2,el2] = cart2sph(v2(1),v2(2),v2(3));
0 comentarios
Ver también
Categorías
Más información sobre Coordinate Systems en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!