[PATCH] Fill up plot_data with temperature all the way
Jef Driesen
jefdriesen at telenet.be
Wed Nov 13 01:47:46 UTC 2013
On 2013-11-13 03:05, Dirk Hohndel wrote:
> My problem with this patch is that it does the wrong thing for
> situations where you have only a very small number of temperature
> readings (e.g.; ONE). I know that I have seen XML files that have a
> single reading about half way through the dive (at the deepest spot,
> IIRC). So for dive computers like this it does something rather odd -
> you get no temperature for most of the dive, and then you get a
> potentially wrong temperature for the rest of the dive.
I don't think I have ever encountered a dive computer, that has only one
(or very few "discrete") temperature sample(s). There are either no
temperature values at all, a value every X samples, or a new value
whenever the temperature has changed. Thus it should be fine to fill in
missing values by keeping the previous values, interpolating, or
whatever estimation method you prefer.
There is however one exception. For some Suunto's, which don't have any
temperature values in the samples, libdivecomputer will artificially
inject the temperature data from the header (at begin/end of the dive
and at maximum depth) in the sample data. I assume these are the
temperature samples you are referring to?
This was implemented long time ago as a stop-gap solution for the lack
of support for the temperature values in the header. This is a very
often requested feature. At that time, it seemed a good idea to add
support it like this. But nowadays, I think we should somehow do this
differently, because it makes it difficult to tell apart a real
temperature profile from a few discrete values.
Jef
More information about the subsurface
mailing list