Skip to content

Garmin generic line single horizontal

joeherwig edited this page Sep 30, 2020 · 4 revisions

GARMIN generic line single horizontal

This very simple but versatile gauge can be used to display plenty of values.

Configuration

Its behaviour is configured within the panel specific config.json. See the examples of the RealAir Lancair Legacy for the for instance:

  "GENERAL_ENG_1_OIL_PRESSURE": {
    "rangemin": 0,
    "rangemax": 120,
    "label": "Oil psi",
    "calculatedValue": "x",
    "baseStyle": {
      "rulerwidth": 2
    },
    "ranges": [
      {
        "color": "orange",
        "alerttype": "warning",
        "alerttext": "low",
        "minValue": 0,
        "maxValue": 9,
        "width": 1,
        "activewidth": 15
      },
      {
        "color": "green",
        "minValue": 30,
        "maxValue": 60,
        "width": 1
      },
      {
        "color": "red",
        "alerttype": "warning",
        "alerttext": "high",
        "minValue": 101,
        "maxValue": 120,
        "width": 1,
        "activewidth": 15
      }
    ]
  },
  "GENERAL_ENG_1_OIL_TEMPERATURE": {
    "rangemin": 0,
    "rangemax": 140,
    "calculatedValue":"x / 16384 * 140",
    "label": "Oil Temp °C",
    "baseStyle": {
      "rulerwidth": 2
    },
    "ranges": [
      {
        "color": "orange",
        "alerttype": "warning",
        "alerttext": "low",
        "minValue": 37,
        "maxValue": 75,
        "width": 1,
        "activewidth": 15
      },
      {
        "color": "green",
        "minValue": 76,
        "maxValue": 93,
        "width": 1
      },
      {
        "color": "orange",
        "alerttype": "warning",
        "alerttext": "high",
        "minValue": 94,
        "maxValue": 114,
        "width": 1,
        "activewidth": 15
      },
      {
        "color": "red",
        "alerttype": "warning",
        "alerttext": "high",
        "minValue": 115,
        "maxValue": 130,
        "width": 1,
        "activewidth": 15
      }
    ]
  }

See the detailed description of the different configuration parameters at config.json Description.

As you can see in those rendered examples the ranges (min-max) and the start and end-angle can be defined per gauge. Also the colors and values for warning and ranges as well as the respective labels.

Properties

  • label is displayed above the clear-text value
  • rangemin defines the lowest numeric value to be displayed.
  • rangemax defines the highest numeric value to be displayed.
  • calculatedValue offers you the ability to assign a recalculation that is evaluated for each received value. Example: An assigned String with the text "x * 6 / 7" equals to the formula and will first replace the x with the received value and afterwards evaluate the whole expression, before rendering the calculated value.
  • ranges define different colored marked ranges on the gauge. As this is an array, you can define multiple ranges per gauge.
    • color sets the color of the range-mark
    • minValue defines, where the range starts
    • maxValue defines, where the range ends
    • width defines the thickness of the range to be displayed when the hand is not within the range
    • activewidth defines the thickness of the range to be displayed when the hand is within the range. this can be used to bring the pilots attention to specific values. See above example for TRQ LB/ft (left version) or Elev trim.

index.html - code

The Code to be added to the index.html is just:

<object id="GENERAL_ENG_1_OIL_PRESSURE" data="../../standardgauges/Garmin-generic-line-single-horizontal.svg" type="image/svg+xml">