Ok, it's an odd place to start, but this now shows the pressure curve
details and the air usage in the proper units.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Soon we'll show things in psi or bar depending on user choice. Let's
not get confused about units before we do.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The UEMIS Zurich SDA keeps recording samples for quite a while after the
dive ended. These provide no additional information, but confuse our
drawing algorithm as they can cause us to draw both the depth and tank
pressure plots beyond the right edge of our canvas.
Stop drawing if sample->time.seconds is larger than dive->duration.seconds.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* dirk:
Print starting and ending pressures
Fix up conflicts in profile.c due to different ways to set the text
formatting. Dirk's 'text_format_options' thing is prettier than mine.
Use it.
This is very simplistic as far as placement of the text goes.
It makes the plot_text function somewhat more generic.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Show "absolute volume" used, and SAC/m (surface-equivalent per minute).
I'm not going to guarantee the calculations. And I show the result in
cubic feet. Sue me.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Text notes need to be last, so that they don't get stepped on by the
other graph elements.
Also, separate the depth text plot out into a function of its own.
Tidier that way.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Use a 10-minute window *or* when the depth has reversed sufficiently to
make the max we've found interesting.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Add some actual numbers to the depth plot too. Do it by finding the
deepest points (within a five-minute rolling window), and show the
depths of those points.
Sure, we could have just labeled the depth markers, but this seems
nicer. But what do I know - I'm not exactly famous for my GUI design.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Only draw the pressure line to the final data point
(duration / end.mbar) if we haven't already drawn samples
past that point (as the UEMIS records pressure data for a
number of additional samples after the actual dive has ended)
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
[ Changed to use 'last actual drawn sample time that had pressure
data' instead of 'last sample time' - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Doing per-dive cylinder start/end pressures is insane, when we can have
up to eight cylinders. The cylinder start/end pressure cannot be per
dive, it needs to be per cylinder.
This makes the save format cleaner too, we have all the cylinder data in
just one place.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Instead of just tracking gasmix, track the size and workng pressure of
the cylinder too.
And use "cylinder" instead of "tank" throughout.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Now the dive profile plot *really* needs some units. The pressure is
just a random line otherwise.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
The time minimum was in seconds, not minutes, and we really do want to
show at least to 90ft to make shallow dives look shallow rather than
scaled to some full depth.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
.. and repaint the profile when the selection changes.
Now, if it just wasn't so ugly, it might even be useful. Except it
obviously needs to also show all the other dive information. And allow
the user to fill in details. And save the end results.
So no, it's not useful.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>