diff options
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | Documentation/user-manual.txt | 29 | ||||
-rw-r--r-- | core/plannernotes.c | 2 | ||||
-rw-r--r-- | qt-models/diveplannermodel.cpp | 5 |
4 files changed, 24 insertions, 14 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b6d87f1a..a2c302e31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +- Compute plan variations in background to improve responsiveness +- Improve profile rescaling in planner - Store the gas switch depth of a cylinder from the planner in the logbook file or git storage. No more need to reenter this value on replanning. - Improved handling of different information (divemaster, buddy, suit, notes) diff --git a/Documentation/user-manual.txt b/Documentation/user-manual.txt index 9b26eb022..60e15f986 100644 --- a/Documentation/user-manual.txt +++ b/Documentation/user-manual.txt @@ -3804,20 +3804,27 @@ provides information about a dive that is a little deeper or slightly longer than the planned dive. This is found near the top of the _Dive plan details_ where the dive duration is indicated. The information is intended to be used if it is necessary to modify the ascent "on the fly" in the case of unexpected deviations from the dive plan during the dive. -Checking this option creates a lot of additional computation, -to such a degree that the planner is slower than otherwise. The information is typically -given as: - Runtime: 53min + 0:52/m + 4:21/min +For example, if it says "Runtime: 123min, Stop times + 2:49 /m + 1:30 /min" this means: if you dive deeper +than planned, you should add almost 3 minutes per meter you go deeper to your decompression (and +you can substract 3 minutes per meter that you stay shallower). If you overstay your bottom +time, you need to add one and a half minutes to the stops for each minutes you overstay +and similarly, you can shorten your deco time by one and a half minute for each minute +you stay shorter. -This indicates: +These variations of depth and time all refer to the last manually entered segment of the +dive (which is not necessarily the deepest). The additional minutes should be distributed +over the differnent stops in a way proportional to the stop length, i.e. add more of the +additional minutes to the longer, shallower stops. - * Calculated dive duration is 53 min. - * For each extra meter in depth during the bottom phase of the dive, the ascent duration increases by 52 seconds. - * For each extra minute of bottom time, the duration increases by 4 min 21 sec. Thus, if the bottom time is - two minutes longer than planned, ascent duration duration will be (2 * 4min 21 sec) = 8 minutes 42 sec longer and - would probably require that each deco stop is 8:42/53:00 = around 16% longer than planned. These calculations - are only applicable for small deviations from the dive plan, not for larger deviations. +Note that the given times are variations of the duration of the decompression phase. The +minutes to add for overstaying at depth do not include the extended bottom time! This +way of altering dive plans gets worse the larger the deviation becomes from the original +plan. So it should not be trusted for more than a handful of minutes or meters of +deviations from the planned bottom time. + +Checking this option creates a lot of additional computation, +to such a degree that the planner is slower than otherwise. *Minimum gas requirements* diff --git a/core/plannernotes.c b/core/plannernotes.c index 534061a87..2e38aaff9 100644 --- a/core/plannernotes.c +++ b/core/plannernotes.c @@ -111,7 +111,7 @@ void add_plan_to_notes(struct diveplan *diveplan, struct dive *dive, bool show_d } if (prefs.display_variations && decoMode() != RECREATIONAL) - len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Runtime: %dmin %s"), + len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Runtime: %dmin%s"), diveplan_duration(diveplan), "VARIATIONS<br></div>"); else len += snprintf(buffer + len, sz_buffer - len, translate("gettextFromC", "Runtime: %dmin<br></div>"), diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index c03e4612c..8b57f3d8c 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -1085,11 +1085,12 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, s restore_deco_state(save, &ds, false); char buf[200]; + char *deco_time = tr("Stop times").toUtf8().data(); if (prefs.units.length == units::METERS) - sprintf(buf, "+ %d:%02d /m + %d:%02d /min", FRACTION(analyzeVariations(shallower, original, deeper, "m"),60), + sprintf(buf, ", %s + %d:%02d /m + %d:%02d /min", deco_time, FRACTION(analyzeVariations(shallower, original, deeper, "m"),60), FRACTION(analyzeVariations(shorter, original, longer, "min"), 60)); else - sprintf(buf, "+ %d:%02d /ft + %d:%02d /min", + sprintf(buf, ", %s + %d:%02d /ft + %d:%02d /min", deco_time, FRACTION(analyzeVariations(shallower, original, deeper, "ft") * feet_to_mm(1.0) / 1000,60), FRACTION(analyzeVariations(shorter, original, longer, "min"), 60)); |