From ab155da45cce2b1316de3d1269294376dc9c52a0 Mon Sep 17 00:00:00 2001 From: Bruce Mitchell Date: Mon, 28 Jun 2021 15:33:06 -0500 Subject: meta-ibm: Adds virtual Altitude sensor The Altitude measurement is from the computation of the DPS310 pressure sensor with this "Expression": "44330.0 * (1.0 - ((P0/101325.0) ^ (1/5.255)))" Tested: busctl introspect xyz.openbmc_project.VirtualSensor \ /xyz/openbmc_project/sensors/altitude/Altitude returned results consistent with location of the Rainier system. Signed-off-by: Bruce Mitchell Change-Id: I07b83dd6b8f4ccf0755ccbdc81c40976a3e571cd --- .../p10bmc/virtual_sensor_config.json | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor') diff --git a/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/p10bmc/virtual_sensor_config.json b/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/p10bmc/virtual_sensor_config.json index df51c66ab..8df08f94e 100644 --- a/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/p10bmc/virtual_sensor_config.json +++ b/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/p10bmc/virtual_sensor_config.json @@ -27,5 +27,31 @@ ] }, "Expression": "T0" + }, + { + "Desc": + { + "Name": "Altitude", + "SensorType": "altitude" + }, + "Threshold" : + { + "WarningHigh": 3050 + }, + "Params": + { + "DbusParam": + [ + { + "ParamName": "P0", + "Desc": + { + "Name": "Station_Pressure", + "SensorType": "pressure" + } + } + ] + }, + "Expression": "44330.0 * (1.0 - ((P0/101325.0) ^ (1/5.255)))" } ] -- cgit v1.2.3