summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-python/recipes-devtools/python/python-numeric
diff options
context:
space:
mode:
authorAllen.Wang <Allen_Wang@quantatw.com>2022-02-21 11:12:46 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-02-24 22:47:06 +0300
commitb5ff70ec19c020cdbc34499bf9c680d69da57eaa (patch)
tree636d08605e98ed44bb8beff0295846400073cee7 /meta-openembedded/meta-python/recipes-devtools/python/python-numeric
parent934b28fbdc86b318dfdcd0043172b8ffdb6a8f41 (diff)
downloadopenbmc-b5ff70ec19c020cdbc34499bf9c680d69da57eaa.tar.xz
meta-bletchley: phosphor-virtual-sensor: add virtual HSC_Input_Power
- Virtual_P12V_AUX_HSC_Input_Power Apply calibration equation to adjust HSC Input Power HSC sensor reading have error with the measurement from pin directly, those errors are different to each actually power measurement, use linear interpolation to estimate error in each range of HSC POWER reading. "Expression":" var PWR[9]:={71.786,130.828,193.845,255.12,315.468,374.183,427.233,486.983,545.588}; var ERR[9]:={0.1002,0.04141,0.04927,0.05102,0.05308,0.05359,0.04437,0.05245,0.06011}; switch { case HSC_PWR<PWR[0]:HSC_PWR/(1+ERR[0]); case inrange(PWR[0],HSC_PWR,PWR[1]) : HSC_PWR/(1+ERR[0]+(HSC_PWR-PWR[0])*(ERR[1]-ERR[0])/(PWR[1]-PWR[0])); case inrange(PWR[1],HSC_PWR,PWR[2]) : HSC_PWR/(1+ERR[1]+(HSC_PWR-PWR[1])*(ERR[2]-ERR[1])/(PWR[2]-PWR[1])); case inrange(PWR[2],HSC_PWR,PWR[3]) : HSC_PWR/(1+ERR[2]+(HSC_PWR-PWR[2])*(ERR[3]-ERR[2])/(PWR[3]-PWR[2])); case inrange(PWR[3],HSC_PWR,PWR[4]) : HSC_PWR/(1+ERR[3]+(HSC_PWR-PWR[3])*(ERR[4]-ERR[3])/(PWR[4]-PWR[3])); case inrange(PWR[4],HSC_PWR,PWR[5]) : HSC_PWR/(1+ERR[4]+(HSC_PWR-PWR[4])*(ERR[5]-ERR[4])/(PWR[5]-PWR[4])); case inrange(PWR[5],HSC_PWR,PWR[6]) : HSC_PWR/(1+ERR[5]+(HSC_PWR-PWR[5])*(ERR[6]-ERR[5])/(PWR[6]-PWR[5])); case inrange(PWR[6],HSC_PWR,PWR[7]) : HSC_PWR/(1+ERR[6]+(HSC_PWR-PWR[6])*(ERR[7]-ERR[6])/(PWR[7]-PWR[6])); case inrange(PWR[7],HSC_PWR,PWR[8]) : HSC_PWR/(1+ERR[7]+(HSC_PWR-PWR[7])*(ERR[8]-ERR[7])/(PWR[8]-PWR[7])); default : HSC_PWR/(1+ERR[8]); } " Signed-off-by: Allen.Wang <Allen_Wang@quantatw.com> Change-Id: I553380e27eff35fef8020de8fe346e055d75a2f8
Diffstat (limited to 'meta-openembedded/meta-python/recipes-devtools/python/python-numeric')
0 files changed, 0 insertions, 0 deletions