summaryrefslogtreecommitdiffstats
path: root/dives
AgeCommit message (Collapse)Author
2014-07-29Add test dive with heart rate informationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-07-15Fix the description of test dive cylindersGravatar Miika Turkia
It is really confusing when the size of the cylinder does not match the description. Inconsistent data in will mean inconsistent data out and validating that export works means I try to get consistent data out... Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-06-11Add beginning of pretend CCR XML fileGravatar Dirk Hohndel
Note that we are missing code to write out the new attributes, so saving this test dive back to a file loses them. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-07Add test dive that shows heart rateGravatar Dirk Hohndel
This is adapted from a real dive file, anonymized and massively shortened. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-04-05Add test dive that has an unused cylinderGravatar Dirk Hohndel
This way one can test that the corresponding preferences option works correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-03-15Add test dive to show erroneous pp graphsGravatar Jan Mulder
Add simple test dive to show the erroneous pp graph in case of multiple periods of high p02. See commit aa0cd792bbe3e for the fix. Signed-off-by: Jan Mulder <jlmulder@planet.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-25Removing MacRoman encoding from sample diveGravatar Miika Turkia
MacRoman encoding is poorly supported, and there is nothing that needs any special encodings in the sample file. Thus removing the whole encoding directive. Fixes #441 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-02-06Include images in profileGravatar Robert C. Helling
This adds an entry to the dive list context menu to load images. The user can select image files and set a time offset to align camera and dive computer clocks. Using the exif time stamp the images are tried to match to the times of the selected dives (with a grace period of an hour before and after the dive). Upon success an event of type 123 is created per image with the string value being the path to the image. Those images are displayed as thumbnails in the profile. If the matching dive does not yet have a geo location specified but the image provides one it is copied to the dive (making the camera a poor man's companion app). This patch includes easyexif https://code.google.com/p/easyexif/ which is originally under a New BSD License to parse the image meta data. This commit includes a new test dive dives/test31.xml with a matching image wreck.jpg to try out the functionallity. Obvious to do's: Have images on the map Have the images clickable Have a proper picture viewer Give visual reference for image time shifting. Use the new profile Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-21Prevent potential math overflow in new profileGravatar Robert C. Helling
Test for max_temp == min_temp to prevent math overflow when calculating temperature axis in new profile Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-17Sample log from Sensus Ultra, exported in CSVGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-08Change fake profile behaviorGravatar Dirk Hohndel
If no average depth is known the current fake profile behavior is rather unintuitive (we make up an average depth). Instead we should assume that this is a PADI style dive log and give the user a "rectangular" profile (actually, it's a trapecoid as we at least try to enforce a sane ascent / descent speed). If the dive is somewhat longer or deeper (10 min / 10 m) we even add a 3m safety stop at 5m. Added a new dives/test0b that tries to capture the typical cases to test this. Fixes #398 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2014-01-01Test dive for odd pressure profileGravatar Rodrigo Severo
When near the surface the pressure doesn't change - and then there is a sudden drop at the end. Signed-off-by: Rodrigo Severo <rodrigo@fabricadeideias.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-28Test dive for eventsGravatar Miika Turkia
Dive with test events, can be used to test approximation of depth when exporting dives. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-24Sample dive from XP5Gravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-12Correctly parse multiple tags in the divelogGravatar Dirk Hohndel
The old parsing code overwrote the first comma with a '\0' and then checked the index against the length of the buffer - which was changed by replacing the ',' with the '\0'. This means that since commit 78acf20848c0 ("Don't crash on loading tags longer than 127 chars") Subsurface has potentially damaged / lost data in dive files! Added a test dive that shows the issue if opened by a Subsurface version after the commit mentioned above but before this commit. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Different Icon for a Bookmark Event.Gravatar Tomaz Canabrava
This patch adds a different icon for a Bookmark Event, and it also cleaned a lot of code. :) See #300 [Dirk Hohndel: made the two icons slightly bigger] Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-04Allow comma separated CSV filesGravatar Dirk Hohndel
The separator selector in the CSV import dialog was unused. This passes the value into the xslt and adds ',' as possible value. I'm sure this could be done much better (pass the actual character instead of the index), but I couldn't get that to work and this does seem to do the trick. Also added a test dive to test this feature. Fixes #321 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-12-02Change gas in second cylinder in sac-test-divesGravatar Anton Lundin
Due to that we can't handle gaschanges to the same gas in another cylinder, this changes the second gas to EAN22 to workaround that. Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-15Add test dive with tank pressure sensor informationGravatar Dirk Hohndel
This is a real data from a Uemis Zurich divecomputer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-03Sample dive from APDLogViewerGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-10-02Test dive for CSV importGravatar Miika Turkia
This test dive follows the format of APD Log Viewer but contains only the currently used data (time, depth, and temperature). Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-05-16Adjust test dives to comply with the current trip syntaxGravatar Dirk Hohndel
Otherwise the tests fail - we no longer support the old format. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-03-05Suunto DM4 sample diveGravatar Miika Turkia
Both in .db and exported XMK format. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26Test divesGravatar Miika Turkia
On Tue, Feb 26, 2013 at 6:19 PM, Dirk Hohndel <dirk@hohndel.org> wrote: > Miika Turkia <miika.turkia@gmail.com> writes: > >> On Tue, Feb 26, 2013 at 5:54 PM, Dirk Hohndel <dirk@hohndel.org> wrote: >>> Miika Turkia <miika.turkia@gmail.com> writes: >>> >>>> On Tue, Feb 26, 2013 at 6:45 AM, Dirk Hohndel <dirk@hohndel.org> wrote: >>>>> I added a few test dives exported from other software (Dm3, DiveLog 5.08, >>>>> JDiveLog 10.2 from Mac - last one doesn't parse because of encoding... Also >>>>> a composed XML zip file from DiveLog isn't supported, yet) >>>>> Find them under dives >>>> >>>> Now this gets interesting. Is there ANY logic in the units in the >>>> dives/TestDiveDiveLog5.08.xml? It seems that some of the temperatures >>>> are in C (Airtemp and Watertemp) and some in F (samples). Otherwise I >>>> would guess we are talking metric here, but I do not see any specs >>>> (another log I have seen from DivingLog had all the units in metric, >>>> as far as I could guess). BTW is the Weight in kg or lb? >>> >>> I have purchased DivingLog and should be able to create any combination >>> of data for the test file that we could possibly want. I'll do a set in >>> a moment that describe what SHOULD be there in their notes, maybe that >>> will clear things up. >>> >>> That said, I really want to release 3.0.1 in the next couple of hours, >>> so this may have to wait for 3.0.2 (if we end up needing that) or 3.1. >>> >>>> The divelogs.de UDCF format looks like it shouldn't take long to write >>>> support for. I'll look into it this evening. >>> >>> It is evening for you, right? No pressure, just making sure I understand >>> what may be coming in in patches in the next hour or two >> >> I currently have one version of the DivingLog XSLT. So a bit of >> verification and that could possibly be used as is. However, this >> could use a bit more testing than a new support to make sure things >> are not going to be any worse than they currently are. >> >> I have not started with the UDCF yet, but that could be reasonably >> fast to implement. However, no guarantees. (And yes, it is evening for >> me) > > I can hold off 3.0.1 a couple hours longer if that is a realistic thing > to do. I don't see the UDCF as that important since we have a different > format from them that we support. So I think the best possible DivingLog > support would be my preference. > > I'll add a few more exported dives from DivingLog next (and fix the > naming of the existing ones). In that case, here is the DivingLog XSLT if anyone can give it a test. miika From 4a62058f4f6fd4780f04bce6e1fe45e20abcf33f Mon Sep 17 00:00:00 2001 From: Miika Turkia <miika.turkia@gmail.com> Date: Tue, 26 Feb 2013 17:46:53 +0200 Subject: [PATCH] XSLT for DivingLog Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-26Update DivingLog 5.08 export filesGravatar Dirk Hohndel
Two XML files, one all imperial, one all metric Quick inspection shows that there is no indication whatsoever on metric vs imperial in the file. That is of course completely moronic and makes automated import more or less impossible. I also added a different zip file from DivingLog - quick analysis shows that this is simply the corresponding xml file, wrapped in a zip container. So this should be trivial to add. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-25Add two more versions of this dive from divelogs.deGravatar Dirk Hohndel
The DLD is imported perfectly, the udcf is not. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-25Add the same test dive in a number of different formatsGravatar Dirk Hohndel
Suuntu DM3 DiveLog 5.08 XML DiveLog 5.08 UDDF DiveLog 5.08 UDCF DiveLog 5.08 compressed zip (we don't support that) JDiveLig 10.2 from Mac (fails because of ecoding) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24Fix SAC calculations for dives without any samplesGravatar Linus Torvalds
We computed a made-up average depth based on the maximum depth, and used that. That's questionable even if we didn't have any explicit average depth to begin with, but it's particularly wrong if we did have an explicit average depth to use. Now, admittedly we have no way to actually create fake dives like this with a particular average depth, so this really doesn't make any difference in real life. But we should do this right. Also, make the XML be in the format that subsurface actually saves things in (mainly things like cylinder sizes having an extra decimal place, but also ordering of XML elements). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24Correctly calculate SAC rate in the presense of surface eventsGravatar Linus Torvalds
This assumes that you are not breathing your cylinders while at the surface, which may or may not be correct, but is usually the right thing. Regardless, we're better off giving a conservative (higher) SAC rate estimate for a diver that breathes his cylinder at the surface too than giving an artificially low one because the diver ended up using his snorkel and we didn't take that into account. NOTE! This basically calculates a better duration and average depth than the ones we end up showing in the dive list. Maybe we should actually show this "no-surface-time" duration and average depth instead of the ones we do show? That's a separate question, though. Added a test-case for the surface case to the sac-test.xml dives. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-02-24Fix up SAC calculations for ATM/bar confusionGravatar Linus Torvalds
We even documented that we did SAC in bar*l/min, but the "S" in SAC stands for "Surface". So we should normalize SAC rate to surface pressure, not one bar. It's a tiny 1% difference, and doesn't actually matter in practice, but it's noticeable when you want to explicitly test for SAC-rate by creating a test-dive that averages exactly 10m. Suddenly you don't get the round numbers you expect. [ Side note: 10m is not _exactly_ one extra atmosphere according to our calculations, but it's darn close in sea water: the standard salinity of 1.03 kg/l together with the standard acceleration of 9.81m/s^2 gives an additional pressure of 1.01 bar, which is within a fraction of a percent of one ATM. Of course, divers have likely chosen that value exactly for the math to come out that way, since the true average salinity of seawater is actually slightly lower ] So here's a few test-dives, along with the SAC rate fixup to make them look right. (There's also a one-liner to dive.c that makes the duration come out right if the last sample has a non-zero depth, and the previous sample did not: one of my original test-dives did the "average 10m depth" by starting at 0 and ending at 20m, and dive.c got a tiny bit confused about that ;) [ The rationale for me testing our SAC rate calculations in the first place was that on snorkkeli.net user "Poltsi" reported that our SAC rate calculations differ from the ones that Suunto DM4 reports. So I wanted to verify that we did things right. Note that Poltsi reported differences larger than the difference of BAR/ATM, so this is not the cause. I'll continue to look at this. ] Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-24Add test dive for constant temperatureGravatar Dirk Hohndel
Making sure that this doesn't cause divisions by zero and that the scaling and positioning doesn't get messed up by it (right now it doesn't look great). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2013-01-13Add GPS locations to some of the test divesGravatar Henrik Brautaset Aronsen
With Pierre-Yves' commit with a map widget, here are a couple of example GPS locations from my own dives. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-12-06Add two test dives that triggered the bug fixed in the previous commitGravatar Dirk Hohndel
Loading these two XML files created a divelist with two trips that each started at the same time but that were NOT linked together (because the code in insert_trip detected that they started at the same time). Since the trips were not linked together, trying to then merge those two trips from the UI got us into an infinite loop, trying to move a dive from one trip into the same trip (as the code couldn't find the trip that wasn't linked into the dive_trip_list). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-17Correctly deal with empty XML filesGravatar Dirk Hohndel
Previously we could end up with a bogus dive with all zero data in it. Adding dives/test24.xml to be able to test that we handle this case correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-09-03Correct the trip related test divesGravatar Dirk Hohndel
They still had the old "date only" format, but the code now relies on date and time being both set. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2012-08-27Some simple test dives for the trips codeGravatar Dirk Hohndel
Playing with these shows that there are still some issues with handling multiple files correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-12-12Add three more trimix test divesGravatar Dirk Hohndel
This allows us to check what we display in the dive list and how we sort it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-12-12Make test dive 15 a bit more usefulGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-12-12Two test dives I added a couple of months agoGravatar Dirk Hohndel
...and never commited Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-12-11Add trimix test diveGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-09Correctly plot dives ending below the surfaceGravatar Dirk Hohndel
I thought we had fixed this before - but I guess it got broken again somewhere. We now make sure that the plot_info ends on an entry with depth 0. Added test14 to verify the fix. Also fixed cut'n'paste errors in a few test dive files. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04Fix missing pressure plot at start of the dive in some situationsGravatar Dirk Hohndel
In some situations we could end up with no sample pressure and no interpolated pressure at time = 0. This is now fixed. Fix notes in test dive the exposed the issue. Also change the code in create_plot_info to keep the number of samples and the number of corresponding pi entries in separate variables. This avoids future changes from breaking if they assume they can access dive->sample[nr_samples - 1] (which is a reasonable assumption to make). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04Update test divesGravatar Dirk Hohndel
The notes now reflect things that were fixed in the last commits. Also added more test dives to test other boundary cases. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-11-04Replace Linus' dives with useful test dives that help test the appGravatar Dirk Hohndel
As much as Linus' dives may be fun to look at, they don't help us test the app. Writing these test dives I already found a couple of bugs - and I'm just getting started. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2011-08-28Make the multi-dive files valid XMLGravatar Linus Torvalds
They had multiple "root" entries (all called 'dive'), which makes baby Jesus cry. So just enclose them all in one root entry (called 'dives') that magically turns it all into parseable xml. Yeah, that really helps make the world a better place. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2011-08-28Start archiving the stupid XML filesstartGravatar Linus Torvalds
(and add a reminder of how they came to be) Gaah. XML is *stupid*. It's not easy to parse for humans or for computers, and some of these XML files are just disgusting. But maybe they can be turned into something usable with libxml. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>