aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2015-08-18VPM-B: Fix calculating Boyles compensation on gas change stops.Gravatar Jan Darowski
Previously we were calculating the compensation only on the deco stops, gas change stops appearing before the first deco stop were ommited. Signed-off-by: Jan Darowski <jan.darowski@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Explicit names for initialization of deco constantsGravatar Robert C. Helling
This patch is purely cosmetic except for the fact it changes the critical radii to the V-planner with Boyle compensation values. These values would have been set anyway by Jan's commit "VPM-B: Set radius constants to values reccomended by V-Planner" which will conflict with this anyway. This way, the last chunk of Jan's patch can just be discarded. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Pref. to ascent to next stop only when stop is below ceilingGravatar Robert C. Helling
Usually, we try to ascent to the next stop and check if we break the ceiling while doing that. This patch adds a preference value to rather check if the ceiling is above the next stop before attempting to ascent. The difference if off-gasing during the ascent is taken into account. Logically, it does not sound like it could be relevant to ignore that off-gasing but it leads to more conservative schedules and it seems the original Fortran VPM-B implementation does just this. So one could argue it is part of that model (if it makes sense or not), so we should at least give users the possibility to turn this on. Maybe we should even make this the default for VPM-B. This patch just addes the code to have the value in the preferences and the planner to act accordingly. There is no UI for it, yet. To test, you have to set it in the code. There could be a later patch with a UI if people like to have it. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Factor out root of cubic to be used also for update_gradientGravatar Robert C. Helling
We can use the analytic solution of a cubic in two different places. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Merge branch 'boyle-ready' of https://github.com/Slagvi/subsurfaceGravatar Dirk Hohndel
Fixed merge conflicts in deco.c dive.h planner.c Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Fix MKVI erroneous sample timeGravatar Miika Turkia
There was a bug in MKVI download tool that resulted in erroneous sample times. This fix takes care of that and should work similarly as the vendor's own. Fixes #916 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Explicit cast to stop compiler warningGravatar Robert C. Helling
Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-17Cmake: automatically create version for Mac bundleGravatar Dirk Hohndel
The version info that is used for the Mac bundle is created at cmake run time, not at make run time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16INSTALL file: update Mac build instructionsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16Build script: fix install_name for libssrfmarblewidget on MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16Build script: make sure cmake finds Qt on MacGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16INSTALL file: build the latest master / testing branchesGravatar Dirk Hohndel
The INSTALL file in the sources should show the instructions to build the latest master - and then be updated to build the latest release as we get closer to making a release. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16INSTALL file: update the Homebrew install URLGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16Build script: make sure we find any library that we installedGravatar Dirk Hohndel
Somehow libssh2 wasn't found on Mac builds - this makes sure we always add the $INSTALL_ROOT/lib as library path. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-16Cmake: only link against libusb-1.0 if it was foundGravatar Dirk Hohndel
This should work much better as libusb is really only required if you want support for all the dive computers (e.g., Atomics Aquatics Cobalt family). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15Some unification between Buehlmann and VPM-BGravatar Robert C. Helling
This patch makes deco_allowed_depth() work both for Buehlmann as well as VPM-B (as long as the VPM-B internal variable total_gradient[] is valid). As a bonus, in VPM-B mode, in the planner, the ceilings are VPM-B ceilings and not Buehlmann GF. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-08-15VPM-B: Set radius constants to values reccomended by V-Planner.Gravatar Jan Darowski
V-Planner reccomends smaller values for the VPM with the Boyles compensation. Also missing units comments were added. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15VPM-B: Add conservatism levels to the ui. Fix planner settings disabling.Gravatar Jan Darowski
Conservatism level can now be changed from gui, is saved in settings. Also way of disabling the planner settings in the ui was improved to support more deco models and be called at the widget creation. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15VPM-B: Add conservatism levels to deco.cGravatar Jan Darowski
Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15VPM-B: Add surface decompression time.Gravatar Jan Darowski
Now, we calculate the volume of free gas not only based on the deco time but also time on the surface, needed for the full desaturation. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15Merge branch 'custom-print' of github.com:neolit123/subsurfaceGravatar Dirk Hohndel
2015-08-15VPM-B: Add Boyles compensation to the planner.Gravatar Jan Darowski
Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15VPM-B: Add simple Boyle's law compensation.Gravatar Jan Darowski
This is a very basic implementation that uses bin search for solving the cubic. It's not called anywhere at this stage, needs to be changed to analytic solution. Signed-off-by: Jan Darowski <jan.darowski@gmail.com>
2015-08-15Printing: remove silly white line at end of each pageGravatar Gehad elrobey
QPrinter::pageRect() doesn't always return the correct value of the printable area, which results in white horizontal lines of un-rendered area at the bottom of each page, Use QPrinter::pageLayout() instead which fixes the issue. QPrinter::pageLayout() is added in QT 5.3, So use pageRect for previous versions. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: fill the QPainter background color before renderingGravatar Gehad elrobey
While rendering a dynamically sized view port, it may not fit the full page size, But the background color should be the same for the whole page, So fill the page background color with the template background color before rendering. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: enhance 2 dives templateGravatar Gehad elrobey
- Add more text padding on the left - Reduce the width of the profile so that the padding on the right of it is equal to the padding bottom from it. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: add table backgrounds and borders to six dives templateGravatar Gehad elrobey
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: use the same background for all the data cells flow layoutGravatar Gehad elrobey
Dive notes should have the same background as the remaining data cells. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: add 'dontbreak' css class to divesGravatar Gehad elrobey
Prevent breaking the dives in flowlayout, and the rows in the table template. They should have the 'dontbreak' css selector. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: don't break dives into successive pagesGravatar Gehad elrobey
While rendering a template with "0" dives per page value, try to fit as many dives per page but don't break a dive into 2 pages. Use a dynamically sized view port to fit the rendered area only, and don't render the full page. All the Template elements that shouldn't be broken should have the CSS class "dontbreak". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: disable ui elements on statistics printGravatar Gehad elrobey
Disable all the UI elements for "dive list print", disable all the template settings as well, Template Edit button will be enabled after statistics print supports color palettes. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: use border width from Grantlee backendGravatar Gehad elrobey
Find the border-width dynamically from the Grantlee backend. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: export border to templatesGravatar Gehad elrobey
As there is a problem with sizing the borders in QWebView, "vw" sizing is not working as supposed with border-width, As a workaround we export border-width dynamically, so that border-width is relatively the same for all page sizes. The border-width is equal to the page width / 1000 which gives a nice range for borders for A0 - A5 papers, Also prevent drawing zero pixel borders and use 1 px borders as the minimum border. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: fix scrolling bug by adding extra paddingGravatar Gehad elrobey
This bug occurs in "table" and "flowlayout" templates, it takes place when the size of the full web view to be rendered is not divisible by the size of the view port (Page size), This issue is fixed by adding extra padding to the bottom of the body so that the total body height is divisable by the view port size. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: remove the outer border from table templateGravatar Gehad elrobey
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: remove extra white spaces from 6 dives templateGravatar Gehad elrobey
The are some rounding errors in the 6 dives template. Solve them them by adding the color to the main body div. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: add more padding on the top of the profileGravatar Gehad elrobey
add more padding on the top of the profile so that the left-right-top padding around the profile is the same. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: rename "Table cells" to "Table cells 1"Gravatar Gehad elrobey
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: insert placeholders in empty feildsGravatar Gehad elrobey
Don't leave fields empty, this may corrupt the layout, a better way is to insert placeholders for empty data, which also provides a better UX. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: remove templates additional marginsGravatar Gehad elrobey
Remove extra margins and paddings in templates. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: hide scrollbar from QWebview to fix padding issueGravatar Gehad elrobey
The vertical scrollbar was causing a default margin at the right most of the page which corrupted the page layout calculations. By hidding the vertical scrollbar the issue is fixed. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: remove the outer most border for all templatesGravatar Gehad elrobey
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: make the actual data font width regular (not bold)Gravatar Gehad elrobey
The actual data needs to be regular font not a bold font, so use <p> instead of <h1> tag for the actual data fields. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: make default borders blackGravatar Gehad elrobey
Make all borders black by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: replace dark and light colorsGravatar Gehad elrobey
Make dark colors for headers while lighter colors for data fields, this is more intuitive, and makes the palettes more appealing. Make dark color default for cells2 Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: add color3 to templates and make it effectiveGravatar Gehad elrobey
Use the added color for 'Table cells 2' Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: fix color numbers in printing templatesGravatar Gehad elrobey
After adding the additional 'Table Cells 2' color to the color palette fix the colors assigned to each field. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: add another color in color palettesGravatar Gehad elrobey
Add another color 'Table cells 2' to the color palette, make all the backgrounds solid white by default. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: add statistics printGravatar Gehad elrobey
Add statistics table print option. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>
2015-08-15Printing: export more dive details with Grantlee backendGravatar Gehad elrobey
Add SAC, tags, used gas and dive rating to dive data fields exported with Grantlee backend. Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> Signed-off-by: Gehad elrobey <gehadelrobey@gmail.com>