bristlemouth / bm_protocol

Primary Bristlemouth firmware repository
https://www.bristlemouth.org/
Apache License 2.0
10 stars 7 forks source link

fix: soft calibration offset #101

Closed towynlin closed 4 months ago

russelldeguzman commented 4 months ago

Regarding the polarity of the calibration term - here are some values of the offsets from the BoW test.

Timestamp,Timestamp(utc_s),SerialNumber,OffsetValueDegC
2023-12-25_11:11:11,1600000,398804,-0.03876
2023-12-25_11:11:11,1600000,398804,-0.0590343
2023-01-11_13:15:33/,1673471733.9574752,399504,0.15164988416988404
2023-01-11_13:15:33/,1673471733.9574752,401239,0.09835451737451692

If the TSYS reads higher than the RBR it's being calibrated against, it will read a negative value sst_calibration_raw_plot Yields the offsets:

{
    "423709": -0.06944950269506993,
    "423398": -0.1281154421201235,
    "423665": -0.11886492877309844,
    "423712": -0.04740188975872664,
    "423764": -0.07272016491273071
}

which we should add back to each reading to get the calibrated reading.

and the inverse for reading below the reference RBR

russelldeguzman commented 4 months ago

Nice find! 🎉