-
Notifications
You must be signed in to change notification settings - Fork 6
Garmin generic arc
joeherwig edited this page Sep 30, 2020
·
13 revisions
This very simple but versatile gauge can be used to display plenty of values.
Its behaviour is configured within the panel specific config.json.
See the example of the RealAir Duke Turbine V2 for the ENG_1_TORQUE
for instance:
"ENG_1_TORQUE": {
"label": "TRQ LB/ft",
"rangemin": 0,
"rangemax": 2000,
"calculatedValue": "x * 6 / 7",
"baseStyle": {
"rulerwidth": 2,
"arcMinAngle": -100,
"arcMaxAngle": 110
},
"ranges": [
{
"color": "green",
"minValue": 0,
"maxValue": 1400,
"width": 2
},
{
"color": "red",
"alerttype": "warning",
"alerttext": "high",
"minValue": 1450,
"maxValue": 2000,
"width": 2,
"activewidth": 60
}
]
}
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.
-
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. -
baseStyle.rulerwidth
can be optionally used to set the standard ruler width. (defaults to2
if not set -
baseStyle.arcMinAngle
can be optionally used to set the starting angle measured from the 12 'o clock position. Defaults to-140
if not set explicitly -
baseStyle.arcMaxAngle
can be optionally used to set the starting angle measured from the 12 'o clock position. Defaults to110
if not set explicitly Example: An assigned String with the text"x * 6 / 7"
equals to the formula and will first replace thex
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.
-
The Code to be added to the index.html is just:
<object id="ENG_1_N1_RPM" data="../../standardgauges/Garmin-generic-arc.svg" type="image/svg+xml"></object>
This application is available as FOSS (Free and open source Software) under the the Creative Commons 'by-nc-sa 4.0'-license.