We now do the first_ceiling_pressure calculation at the start of the CVA loop.
We don't need to do it before.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We should run clear_deco as early as we can. We should calculate the nuclear
regeneration and start gradient after calculating tissue tolerance. We don't
need to redo nuclear regeration and start gradient after that.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
By calculating crushing pressure after the manually entered phase, we were doing
it wrong for multi-level dives.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Inspired gas loading equations depend on the partial pressure of inert gas in
the alveolar.
P_alv = (P_amb - P_H2O + (1 - Rq) / Rq * P_CO2) * f
where:
P_alv alveolar partial pressure of inert gas
P_amb ambient pressure
P_H2O water vapour partial pressure = ~0.0627 bar
P_CO2 carbon dioxide partial pressure = ~0.0534 bar
Rq respiratory quotient (O2 consumption / CO2 production)
f fraction of inert gas
In our calculations, we simplify this to use an effective water vapour pressure
WV = P_H20 - (1 - Rq) / Rq * P_CO2
Buhlmann ignored the contribution of CO2 (i.e. Rq = 1.0), whereas Schreiner
adopted Rq = 0.8.
WV_Buhlmann = PP_H2O = 0.0627 bar
WV_Schreiner = 0.0627 - (1 - 0.8) / Rq * 0.0534 = 0.0493 bar
Buhlmann calculations use the Buhlmann value, VPM-B calculations use the
Schreiner value.
Concept explained here:
http://www.divetable.de/workshop/V1_e.htm
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
In other implementations of VPM-B, surface_tension_gamma and
skin_compression_gammaC are taken as 0.0179 N/msw and 0.257 N/msw respectively.
We do pressure calculations in bar, not msw, so our gamma values need to reflect
that. Previously we had used 0.179 and 2.57, which are close but not quite
correct (10 msw == 1.01325 bar).
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This is useful for determining why we calculate a difference profile
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Update the tooltip and enable only when there is a divesite selected
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Use clicked instead of activated signal on the completerList to
handle the selection of a divesite.
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A divesite uuid is created using the timestamp of the currently
selected dive. When there is no current_dive, use the current
time to create a uuid.
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
While I cannot explain for the life of me why this worked on Linux and
Windows and not on Mac, what I have now seems to work on all three
platforms.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
And add a small message that two potential ERRORS that are thrown in the
deploy step are actually harmless.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
A git pull seems to cause things to go wrong. Just fetching the repository
and checking out the version that we want seems to work better.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If localDevice isn't valid we never initialize the discory agent, so
let's not dereference it in the destructor unless it is valid.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
These were left unused by cleaning up the import function parameters.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Continuing the crusade against excessive number of parameters for some
functions. This should be the last of the import functions to be cleaned
up.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The pressure for the Boyle compensation is of the first ceiling,
i.e. the ceiling seen from the bottom rather than the first
stop.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
At least on Ubuntu with xfce instead of Unity this appears to be necessary
to get a menu bar for the application.
Fixes#833
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When, in a dive edit mode user entered a dive site
and went to dive site edit mode then finished the ds
edit, the app would lose the disabled property of the
dive list, making it possible to select a new dive
when we where editing another one, complete mess.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
If the user clicks on the first or second option of the drop
down list, subsurface will move him to the dive site edit panel
automatically, since it's a new dive site and there's no information
about it yet.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
When we are in display dive mode, and then edit the
location text edit, going to edit dive mode, the location
text edit will be moved a bit below of it's original position
but the Dive Site List would be already opened, and stuck
on it's original position, covering the dive list.
This patch fixes that.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Moved the get taxonomy button from the maintab to the edit dive site
widget.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
The get taxonomy button will be inside the manage dive site interface.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I didn't have time to create / finish the photos widget, so
I'm adding back the profile view while in dive site edit mode,
but disabling it.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Otherwise some artefacts of the last dive / dive site that where shown can
remain visible even after the dive data was closed.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Right now this is quite ugly. And at least in my VM the transparency
doesn't seem to work correctly. But at least we now have some visual
indication that we are doing something while opening or saving cloud
storage.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This removes the excessive amount of parameters on manual CSV import. We
just use appropriate string array than can be directly fed to XSLT
parsing.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Add more VPM-B planner tests. The "expected" total run time is taken as the
total run time produced by the Fortran VPM-B program. For all these tests, the
results are within two minutes, which is a good result, but most are classified
as a "fail".
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This adds a test for 100 m for 60 min dive on trimix using VPM-B
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Adding Linus' instructions for udev rule to our FAQ. Product ID 0031
that is used for firmware updates is not included here, as it is
probably not commonly needed.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
- We add a dive while offline.
- On a different computer (here simulated by a different local cache) we
add a different file.
- Now we go back to the previous local cache (the one where we added a
different dive in the first step) and take that online (i.e., connect to
cloud storage). Now both of the new dives should have been added to our
data file.
This is a rather trivial test with no conflict and a straight forward
merge. We need to add a lot more test cases to make sure this works as
expected and doesn't leave the user with a corrupt state.
Ideally whatever happens, the user should never see an error...
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
All this really does is make sure that the fast forward works if the local
cache has received updates that haven't made it to the server, yet.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
We shouldn't always tell the user about the perceived validity of the
cloud certificate - we force it anyway.
But it's nice to be easily able to see if we tried to update the remote,
so add another debug output when run with -v
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This makes it much easier to compare XML files written by Subsurface.
The order of the dive_site_table depended on the order in which they were
encountered. This makes it easier to eye-ball changes in XML files. And
allows the GitStorage test to pass.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>