uiaerohorizon

Create artificial horizon component

Since R2018b

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. NoteUse 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`.

```f = uifigure; egt = uiaeroegt(f)```
```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` object created using the `uifigure` function or one of its child containers: `Tab`, `Panel`, `ButtonGroup`, or `GridLayout`. If you do not specify a parent container, MATLAB calls the `uifigure` function to create a new `Figure` object that serves as the parent container.

Name-Value Arguments

Specify optional pairs of arguments as `Name1=Value1,...,NameN=ValueN`, where `Name` is the argument name and `Value` is the corresponding value. Name-value arguments must appear after other arguments, but the order of the pairs does not matter.

Before R2021a, use commas to separate each name and value, and enclose `Name` in quotes.

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.

Version History

Introduced in R2018b