From 193c456f06c022c1d83d4f0238c46c541a726c3c Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Wed, 28 Aug 2019 17:53:28 +0200 Subject: [PATCH] Fix new CNS calculation - remove error with factor of 10 Fix a typo in the new CNS calculation which introduced a error of factor 10. Signed-off-by: Stefan Fuchs --- core/divelist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/divelist.c b/core/divelist.c index 3c8d306ea..227528e18 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -207,7 +207,7 @@ static double calculate_cns_dive(const struct dive *dive) // This formula is the result of fitting two lines to the Log of the NOAA CNS table rate = po2i <= 1500 ? exp(-11.7853 + 0.00193873 * po2i) : exp(-23.6349 + 0.00980829 * po2i); - cns += (double) t * rate * 1000.0; + cns += (double) t * rate * 100.0; } return cns; }