Main Content

campitch

Set or get pitch angle of camera for satellite scenario viewer

Description

campitch(viewer,pitch)sets the pitch angle of the camera for the specified satellite scenario viewer. Setting the pitch angle tilts the camera up or down as shown in this figure..

Camera with double-headed arrow, pointing up and down in front of lens

outPitch = campitch(viewer,___)returns the pitch angle of the camera. If the second input ispitch, then the function sets the output equal to the input pitch.

Input Arguments

collapse all

Satellite scenario viewer, specified as asatelliteScenarioViewerobject.viewermust be specified as a scalarsatelliteScenarioViewerobject.[1]

Pitch angle of the camera, specified as a scalar the in the range [–90, 90] degrees. By default, the pitch angle is–90degrees, which means that camera points directly toward the surface of the globe.

Tips

  • When the pitch angle is near –90 (the default value) or 90 degrees, the camera loses one rotational degree of freedom. As a result, when you change the roll angle, the heading angle might change instead. This phenomenon is calledgimbal lock. To avoid the effects of gimbal lock, call thecamheadingfunction instead of thecamrollfunction.

Introduced in R2021a

[1]Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.