Main Content

azel2phitheta

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

Description

example

PhiTheta= azel2phitheta(AzEl)converts theazimuth/elevation anglepairs to their correspondingphi/theta anglepairs.

example

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

Examples

collapse all

Find the phi-theta representation for 30° azimuth and 10° elevation for the convention where phi is defined from they-axis to thez-axis, and theta is defined from thex-axis toward theyz飞机。

PhiTheta = azel2phitheta([30;10])
PhiTheta =2×119.4254 31.4749

Find the phi-theta representation for 30° azimuth and 10° elevation for the convention with phi defined from thex-axis to they-axis, and theta defined from thez-axis toward thexy飞机。

PhiTheta = azel2phitheta([30;10],false)
PhiTheta =2×130 80

Input Arguments

collapse all

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

Data Types:double

Phi-theta angle convention selection, specified astrueorfalse.

  • IfRotAxistrue, the phi angle is defined from they-axis to thez-axis and the theta angle is defined from thex-axis toward theyz飞机。

  • IfRotAxisfalse, the phi angle is defined from thex-axis to they-axis and the theta angle is defined from thez-axis toward thexy- plane. (seeAlternative Definition of Phi and Theta).

Data Types:double

Output Arguments

collapse all

Phi and theta angles, returned as a two-row matrix. Each column of the matrix represents an angle in degrees, in the form [phi; theta]. The matrix dimensions ofPhiThetaare the same as those ofAzEl.

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 thexy计划e. 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飞机。The angle is positive when going toward the positivez-axis from thexy计划e. 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 theyz计划e. 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 theyz计划e. 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

This transformation applies whenRotAxistrue.

Alternative Definition of Phi and Theta

The phi angle (φ) is the angle from the positivex-axis to the vector’s orthogonal projection onto thexy计划e. 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 thexy计划e. 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 θ

Extended Capabilities

Introduced in R2012a