This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

uiaerohorizon

Create artificial horizon component

Syntax

horizon = uiaerohorizon
horizon = uiaerohorizon(parent)
horizon = uiaerohorizon( ___ ,Name,Value)

Description

example

horizon = uiaerohorizon creates an artificial horizon in a new figure. MATLAB® calls the uifigure function to create the figure.

The artificial horizon represents aircraft attitude relative to horizon and displays roll and pitch in degrees:

  • Values for roll cannot exceed +/– 90 degrees.

  • Values for pitch cannot exceed +/– 30 degrees.

If the values exceed the maximum values, the gauge maximum and minimum values do not change.

Changes in roll value affect the gauge semicircles and the ticks located on the black arc turn accordingly. Changes in pitch value affect the scales and the distribution of the semicircles.

Note

Use this function only with figures created using the uifigure function. Apps created using GUIDE or the figure function do not support flight instrument components.

example

horizon = uiaerohorizon(parent) specifies the object in which to create the artificial horizon.

horizon = uiaerohorizon( ___ ,Name,Value) specifies artificial horizon properties using one or more Name,Value pair arguments. Use this option with any of the input argument combinations in the previous syntaxes.

Examples

collapse all

Create an artificial horizon component named horizon. By default, the function creates a uifigure object for the indicator object.

horizon = uiaerohorizon
horizon = 

  ArtificialHorizon ([0  0]) with properties:

       Pitch: 0
        Roll: 0
    Position: [100 100 120 120]

  Show all properties

Create a figure window to contain the artificial horizon component, then create an artificial horizon component named horizon.

figure = uifigure;
egt = uiaeroegt(figure)
horizon = 

  ArtificialHorizon ([0  0]) with properties:

       Pitch: 0
        Roll: 0
    Position: [100 100 120 120]

  Show all properties

Input Arguments

collapse all

Parent container, specified as a Figure created using the uifigure function, or one of its child containers: Tab, Panel, ButtonGroup, or GridLayout. If no container is specified, MATLAB calls the uifigure function to create a new Figure object that serves as the parent container.

Name-Value Pair Arguments

Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside quotes. You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

For a full list of artificial horizon properties and descriptions for each type, see ArtificialHorizon Properties.

Output Arguments

collapse all

Artificial horizon component, returned as an object.

Introduced in R2018b