Fix water temperature on Suunto SDM import

Seems that Suunto stores temperature value of 0 when there is no
temperature reading (I guess). Thus this patch ignores temperature
samples that are zero. Otherwise, Subsurface looks into the samples and
grabs the lowest number as water temperature.

See #720

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Miika Turkia 2014-08-28 21:05:03 +03:00 committed by Dirk Hohndel
parent b701bc612b
commit bfc20ae70f

View file

@ -189,9 +189,11 @@
<xsl:attribute name="depth">
<xsl:value-of select="concat(translate(DEPTH, ',', '.'), ' m')"/>
</xsl:attribute>
<xsl:attribute name="temp">
<xsl:value-of select="TEMPERATURE"/>
</xsl:attribute>
<xsl:if test="TEMPERATURE &gt; 0">
<xsl:attribute name="temp">
<xsl:value-of select="TEMPERATURE"/>
</xsl:attribute>
</xsl:if>
<xsl:attribute name="pressure">
<xsl:call-template name="pressure">
<xsl:with-param name="number" select="PRESSURE"/>