From b8c734e5d26213695ab3b27ca83d1114de00e9ac Mon Sep 17 00:00:00 2001 From: github0013 Date: Mon, 2 Nov 2020 17:44:42 +0900 Subject: [PATCH] fix mis-calculation Isn't it supporsed to be "1/5.257"? https://keisan.casio.com/exec/system/1224585971 --- libraries/ms5611/ms5611.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/ms5611/ms5611.cpp b/libraries/ms5611/ms5611.cpp index cb059b0..3419ef8 100644 --- a/libraries/ms5611/ms5611.cpp +++ b/libraries/ms5611/ms5611.cpp @@ -149,7 +149,7 @@ void Ms5611::computeMeasures(uint8_t* d1Buff, uint8_t* d2Buff, double& temperatu static double Ms5611::computeAltitude(double pressure) { double alti; - alti = pow((pressure/(MS5611_BASE_SEA_PRESSURE)), 0.1902949572); //0.1902949572 = 1/5.255 + alti = pow((pressure/(MS5611_BASE_SEA_PRESSURE)), 0.1902225604); //0.1902225604 = 1/5.257 alti = (1-alti)*(288.15/0.0065); return alti; }