Main Content

phitheta2azel

Convert angles from phi/theta form to azimuth/elevation form

Description

example

AzEl= phitheta2azel(PhiTheta)converts thephi/theta anglepairs to their correspondingazimuth/elevation anglepairs.

example

AzEl= phitheta2azel(PhiTheta,RotAx)also specifies the choice of phi-theta angle convention usingRotAx.

Examples

collapse all

Find the azimuth-elevation representation for φ = 30° and θ = 0°. Use the phi-theta convention with φ defined from they-axis to thez-axis, and θ defined from thex-axis toward theyz飞机。

azel = phitheta2azel([30;10])
azel =2×18.6822 4.9809

Find the azimuth-elevation representation for φ = 30° and θ = 0°. Use the phi-theta convention with φ defined from the x-axis to the y-axis, and θ defined from the z-axis toward the xy-plane.

azel = phitheta2azel([30;10],false)
azel =2×130 80

Copyright 2012 The MathWorks, Inc..

Input Arguments

collapse all

Phi and theta angles, specified as a two-row matrix. Each column of the matrix represents an angle in degrees, in the form [phi; theta].

Data Types:double

Phi-theta angle convention selection, specified astrueorfalse.

  • IfRotAxistrue的φ角指令n vector is the angle from thez-axis to the projection of the vector into theyz飞机。The theta angle is defined from thex-axis to the direction vector. Positive values are toward theyz飞机。

  • IfRotAxisfalse, the phi angle is defined from thex-axis to the projection of the direction vector in thexy飞机。The angle is positive in the direction of they-axis. The theta angle is defined from thez-axis to the direction vector and is positive in the direction of thexy- plane (seeAlternative Definition of Phi and Theta Angles).

Data Types:logical

Output Arguments

collapse all

Azimuth and elevation angles, returned as a two-row matrix. Each column of the matrix represents an angle in degrees, in the form [azimuth; elevation]. The matrix dimensions ofAzElare the same as those ofPhiTheta.

More About

collapse all

Azimuth and Elevation Angles

Theazimuth angleof a vector is the angle between thex-axis and the orthogonal projection of the vector onto thexyplane. The angle is positive in going from thexaxis toward theyaxis. Azimuth angles lie between –180 and 180 degrees. Theelevation angleis the angle between the vector and its orthogonal projection onto thexy飞机。的角度对th时是积极的e positivez-axis from thexyplane. By default, the boresight direction of an element or array is aligned with the positivex-axis. The boresight direction is the direction of the main lobe of an element or array.

Note

The elevation angle is sometimes defined in the literature as the angle a vector makes with the positivez-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 shown as a green solid line.

Phi and Theta Angles

The phi angle (φ) is the angle from the positivey-axis to the vector’s orthogonal projection onto theyzplane. The angle is positive toward the positivez-axis. The phi angle is between 0 and 360 degrees. The theta angle (θ) is the angle from thex-axis to the vector itself. The angle is positive toward theyzplane. The theta angle is between 0 and 180 degrees.

The figure illustrates phi and theta for a vector that appears as a green solid line.

The coordinate transformations between φ/θ andaz/elare described by the following equations

sin e l = sin ϕ sin θ tan a z = cos ϕ tan θ cos θ = cos e l cos a z tan ϕ = tan e l / sin a z

Alternative Definition of Phi and Theta Angles

The phi angle (φ) is the angle from the positivex-axis to the vector’s orthogonal projection onto thexyplane. The angle is positive toward the positivey-axis. The phi angle is between 0 and 360 degrees. The theta angle (θ) is the angle from thez-axis to the vector itself. The angle is positive toward thexyplane. The theta angle is between 0 and 180 degrees.

The figure illustratesφandθfor a vector that appears as a green solid line.

ϕ = a z θ = 90 e l a z = ϕ e l = 90 θ

This transformation applies whenRotAxisfalse.

Extended Capabilities

Version History

Introduced in R2012a