From 55b72d40e31cf4022cc349dc141b67a620e4ee47 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Mon, 16 Dec 2024 10:02:42 +0100 Subject: [PATCH] planner: round deco-stop levels to integral feet In the decostop table, we had deco stops at fractional feet (e.g. 333.33 ft). This was somewhat awkward, because the user defined literals do not yet(?) support non-integers and therefore, these entries were given in mm instead. Just round to the nearest integral feet values. Signed-off-by: Berthold Stoeger --- core/planner.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/planner.cpp b/core/planner.cpp index 781a37927..b7a99f08f 100644 --- a/core/planner.cpp +++ b/core/planner.cpp @@ -39,9 +39,9 @@ static std::vector decostoplevels_metric = { 0_m, 3_m, 6_m, 9_m, 12_m, static std::vector decostoplevels_imperial = { 0_ft, 10_ft, 20_ft, 30_ft, 40_ft, 50_ft, 60_ft, 70_ft, 80_ft, 90_ft, 100_ft, 110_ft, 120_ft, 130_ft, 140_ft, 150_ft, 160_ft, 170_ft, 180_ft, 190_ft, 200_ft, 210_ft, 220_ft, 230_ft, 240_ft, 250_ft, 260_ft, 270_ft, 280_ft, 290_ft, - 300_ft, 101600_mm, 111760_mm, 400_ft, 132080_mm, 142240_mm, 500_ft, 162560_mm, 172720_mm, - 600_ft, 193040_mm, 203200_mm, 223520_mm, 800_ft, 264160_mm, 284480_mm, 1000_ft, - 325120_mm, 345440_mm, 1200_ft, 386080_mm }; + 300_ft, 333_ft, 367_ft, 400_ft, 433_ft, 467_ft, 500_ft, 533_ft, 567_ft, + 600_ft, 633_ft, 667_ft, 733_ft, 800_ft, 867_ft, 933_ft, 1000_ft, + 1067_ft, 1133_ft, 1200_ft, 1267_ft }; #if DEBUG_PLAN void dump_plan(struct diveplan *diveplan)