Changeset 032c325 in subsurface


Ignore:
Timestamp:
Feb 10, 2017, 6:41:24 AM (7 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
7c91cdd
Parents:
ec20d36f
git-author:
Robert C. Helling <helling@…> (02/07/17 00:18:19)
git-committer:
Dirk Hohndel <dirk@…> (02/10/17 06:41:24)
Message:

Reset VPM-B state between repetitive dives

This resets the maximum crushing pressures and the maximal
ambient pressure between repetitive dives to prevent anomalies
that a dive produces a shorter deco when following another one
than without.

Reported-by: sfuchs@…
Signed-off-by: Robert C. Helling <helling@…>
Signed-off-by: Dirk Hohndel <dirk@…>

Location:
core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • core/deco.c

    rbb4bf63 r032c325  
    560560}
    561561
     562void clear_vpmb_state() {
     563        int ci;
     564        for (ci = 0; ci < 16; ci++) {
     565                max_n2_crushing_pressure[ci] = 0.0;
     566                max_he_crushing_pressure[ci] = 0.0;
     567        }
     568        max_ambient_pressure = 0;
     569}
     570
    562571void clear_deco(double surface_pressure)
    563572{
    564573        int ci;
     574        clear_vpmb_state();
    565575        for (ci = 0; ci < 16; ci++) {
    566576                tissue_n2_sat[ci] = (surface_pressure - ((in_planner() && (decoMode() == VPMB)) ? WV_PRESSURE_SCHREINER : WV_PRESSURE)) * N2_IN_AIR / 1000;
  • core/dive.h

    rd4dbd0be r032c325  
    873873void calc_crushing_pressure(double pressure);
    874874void vpmb_start_gradient();
     875void clear_vpmb_state();
    875876
    876877void delete_single_dive(int idx);
  • core/divelist.c

    r08c4281 r032c325  
    424424                add_dive_to_deco(pdive);
    425425                laststart = pdive->when;
     426                clear_vpmb_state();
    426427#if DECO_CALC_DEBUG & 2
    427428                printf("added dive #%d\n", pdive->number);
Note: See TracChangeset for help on using the changeset viewer.