Display value for math between 2 incoming targetIDs

I’d like to make a TXT gauge that shows pressure ratio. I have MGP on one targetID and EMAP on another. I need to create a gauge that can display EMAP/MGP. can this be done either in gauge math section or the XML file?

say my EMAP channel is reading 25psi and my MGP is reading 20psi i want it to do 25/20 and the txt gauge display 1.25

You have to do another custom value in XML that takes original values and uses the conversion to make the calculation.

can you show me an example of what this would look like? I cant wrap my head around how I would take data from 2 different values and include them in a conversion

Show me a snippet of your XML for getting EMAP and MPG. I will then try to show how to add a value for pressure ratio.

Seems what is hurting me here is that i’m using a custom name for the EMAP value. I’m better off changing it to a target ID and then doing gauge math =ID32/ID31

What is the significance of ID32. MAP dot? what does this mean compared to 31 which is just MAP.

ID32, MAP Dot (distance over time) is MAP change in units per second.

can you override units of a preset target id using the units attribute in the xml file?

The units in XML tells RealDash if any unit conversion is needed when value is displayed. Internally, RealDash operates on metric values of every value, and if any other units is selected in settings, the conversion is done just before showing the value in the gauge.

In general, for best performance, use conversion in XML to convert any imperial values to metric and use ‘units’ to indicate correct units after the conversion is applied.

For example, say that you have vehicle speed in miles per hour in your XML. This causes RealDash to make an extra conversion each time value is received:

  • RealDash receives a value that units is set to MPH
  • Value is then converted to metric (KPH) and stored to value input system.
  • Any gauge that wants to show vehicle speed gets the value from value input system and if user has selected Miles per hour as speed units, the KPH is converted to MPH before value is set to the gauge.

Working on single units system (metric) in value input system simplifies its implementation and makes it more performant.

1 Like

I ended up using target 32 map dot and put units kpa “cause i wasn’t sure if units on target 31 “map” were different and that worked perfectly.

gauge math ID32/ID31