simil.m

来自「Geodetic tools to be used in navigation 」· M 代码 · 共 33 行

M
33
字号
function xx=simil(x,ds,rx,ry,rz,t)% SIMIL  Computes similarity coordinate transformation.%   Transforms a single point for a left-handed coordinate%   system using the model%     x'=sRx+t%   where%     x  = coordinate vector to transform from%     x' = coordinate vector to transform to%     s  = scale = 1+ds, ds=scale change%     R  = total rotation matrix (RxRyRz)%     t  = translation vector%   Non-vectorized for multiple stations.% Version: 5 Nov 98% Useage:  xx=simil(x,ds,rx,ry,rz,t)% Input:   x  - coordinate vector to transform%          ds - scale change (unitless)%          rx - rotation about x axis (rad)%          ry - rotation about y axis (rad)%          rz - rotation about z axis (rad)%          t  - translation vector% Output:  xx - transformed coordinate vectorcrx=cos(rx);srx=sin(rx);Rx=[1 0 0; 0 crx -srx; 0 srx crx];cry=cos(ry);sry=sin(ry);Ry=[cry 0 sry; 0 1 0; -sry 0 cry];crz=cos(rz);srz=sin(rz);Rz=[crz -srz 0; srz crz 0; 0 0 1];R=Rx*Ry*Rz;xx=(1+ds)*R*x+t;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?