From eb6e2162871e8a6c923e0f3c2d4a4ae7b7ed7c50 Mon Sep 17 00:00:00 2001 From: Erik Johansson Date: Wed, 21 Nov 2018 08:44:18 +0100 Subject: [PATCH] Inlife: fix wrong calculation of visceral fat for long people (#352) --- .../com/health/openscale/core/bluetooth/BluetoothInlife.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothInlife.java b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothInlife.java index 7b8732dc..57c89d4f 100644 --- a/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothInlife.java +++ b/android_app/app/src/main/java/com/health/openscale/core/bluetooth/BluetoothInlife.java @@ -194,7 +194,7 @@ public class BluetoothInlife extends BluetoothCommunication { final float height = selectedUser.getBodyHeight(); if (selectedUser.getGender().isMale()) { if (height >= 1.6 * weight + 63) { - visceral = (0.765 - 0.002 * height) * (weight - 50) + visceralFactor; + visceral = (0.765 - 0.002 * height) * weight - 50 + visceralFactor; } else { visceral = 380 * weight / (((0.0826 * height * height) - 0.4 * height) + 48) - 50 + visceralFactor; @@ -202,7 +202,7 @@ public class BluetoothInlife extends BluetoothCommunication { } else { if (weight <= height / 2 - 13) { - visceral = (0.691 - 0.0024 * height) * (weight - 50) + visceralFactor; + visceral = (0.691 - 0.0024 * height) * weight - 50 + visceralFactor; } else { visceral = 500 * weight / (((0.1158 * height * height) + 1.45 * height) - 120) - 50 + visceralFactor;