Convert local to global coordinates
gCoord = local2globalcoord(lclCoord,OPTION)
gCoord = local2globalcoord(___,localOrigin)
gCoord = local2globalcoord(___,localAxes)
the global coordinate
gCoord = local2globalcoord(
gCoord corresponding to
the local coordinate
the type of local-to-global coordinate transformation.
Local coordinates in rectangular or spherical coordinate form.
If the coordinates are in rectangular form, the column represents (X,Y,Z) in meters.
Types of coordinate transformations. Valid values are
Origin of local coordinate system.
Axes of local coordinate system.
Global coordinates in rectangular or spherical coordinate form. The origin of the global coordinate system is at [0; 0; 0]. That system's axes are the standard unit basis vectors in three-dimensional space, [1; 0; 0], [0; 1; 0], and [0; 0; 1].
Convert between local and global coordinate in rectangular form.
gCoord = local2globalcoord([0; 1; 0], ... 'rr',[1; 1; 1]); % Local origin is at [1; 1; 1] % gCoord = [1 1 1]+[0 1 0];
Convert local spherical coordinate to global rectangular coordinate.
gCoord = local2globalcoord([30; 45; 4],'sr'); % 30 degree azimuth, 45 degree elevation, 4 meter radius
The azimuth angle is the angle from the positive x-axis toward the positive y-axis, to the vector's orthogonal projection onto the xy plane. The azimuth angle is between –180 and 180 degrees. The elevation angle is the angle from the vector's orthogonal projection onto the xy plane toward the positive z-axis, to the vector. The elevation angle is between –90 and 90 degrees. These definitions assume the boresight direction is the positive x-axis.
Note: The elevation angle is sometimes defined in the literature as the angle a vector makes with the positive z-axis. The MATLAB® and Phased Array System Toolbox™ products do not use this definition.
This figure illustrates the azimuth angle and elevation angle for a vector that appears as a green solid line. The coordinate system is relative to the center of a uniform linear array, whose elements appear as blue circles.
 Foley, J. D., A. van Dam, S. K. Feiner, and J. F. Hughes. Computer Graphics: Principles and Practice in C, 2nd Ed. Reading, MA: Addison-Wesley, 1995.