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 <bruce.mitchell@linux.vnet.ibm.com>
Change-Id: I07b83dd6b8f4ccf0755ccbdc81c40976a3e571cd
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 df51c66..8df08f9 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)))"
}
]