Main Content

azel2phitheta

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

Description

PhiTheta = azel2phitheta(AzEl) converts the azimuth/elevation angle pairs to their corresponding phi/theta angle pairs.

example

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

example

Examples

collapse all

Find the phi-theta representation for 30° azimuth and 10° elevation for the convention where phi is defined from the y-axis to the z-axis, and theta is defined from the x-axis toward the yz-plane.

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

   19.4254
   31.4749

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

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

   30.0000
   80.0000

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 as true or false.

  • If RotAx is true, the phi angle is defined from the y-axis to the z-axis and the theta angle is defined from the x-axis toward the yz-plane.

  • If RotAx is false, the phi angle is defined from the x-axis to the y-axis and the theta angle is defined from the z-axis toward the xy- plane. (see Alternative 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 of PhiTheta are the same as those of AzEl.

More About

collapse all

Extended Capabilities

expand all

Version History

Introduced in R2012a