Main Content

uiaeroaltimeter

Create altimeter component

Description

altimeter = uiaeroaltimeter creates an altimeter in a new figure. MATLAB® calls the uifigure function to create the figure.

The altimeter displays the altitude above sea level in feet, also known as the pressure altitude. It displays the altitude value with needles on a gauge and a numeric indicator.

  • The gauge has 10 major ticks. Within each major tick are five minor ticks. This gauge has three needles. Using the needles, the altimeter can display accurately only altitudes between 0 and 100,000 feet.

    • For the longest needle, an increment of a small tick represents 2000 feet and a major tick represents 10,000 feet.

    • For the second longest needle, a minor tick represents 20 feet and a major tick represents 100 feet.

    • For the shortest needle a minor tick represents 200 feet and a major tick represents 1,000 feet.

  • For the numeric display, the gauge shows values as numeric characters between 0 and 9,999 feet. When the numeric display value reaches 10,000 feet, the gauge displays the value as the remaining values below 10,000 feet. For example, 12,345 feet displays as 2,345 feet. When a value is less than 0 (below sea level), the gauge displays 0. The needles show the appropriate value except for when the value is below sea level or over 100000 feet. Below sea level, the needles are set to 0, over 100,000, the needles stay set at 100,000.

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

altimeter = uiaeroaltimeter(parent) specifies the object in which to create the altimeter.

example

altimeter = uiaeroaltimeter( ___ ,Name,Value) specifies altimeter 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 altimeter component named altimeter. By default, the function creates a uifigure object for the indicator object.

altimeter = uiaeroaltimeter

Figure contains an object of type uiaeroaltimeter.

altimeter = 
  Altimeter (0) with properties:

    Altitude: 0
    Position: [100 100 120 120]

  Use GET to show all properties

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

f = uifigure;
altimeter = uiaeroaltimeter(f)

Figure contains an object of type uiaeroaltimeter.

altimeter = 
  Altimeter (0) with properties:

    Altitude: 0
    Position: [100 100 120 120]

  Use GET to 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 Altimeter properties and descriptions for each type, see Altimeter Properties.

Output Arguments

collapse all

Altimeter component, returned as an object.

Version History

Introduced in R2018b