diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2014-08-28 21:05:03 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-28 13:53:16 -0700 |
commit | bfc20ae70ff4edac01d9fe58a6f982c344cb3176 (patch) | |
tree | dccd55017a625fa571d18e13b51fb63581d23f4d | |
parent | b701bc612b1f65788c922712df281105e042f7dd (diff) | |
download | subsurface-bfc20ae70ff4edac01d9fe58a6f982c344cb3176.tar.gz |
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>
-rw-r--r-- | xslt/SuuntoSDM.xslt | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/xslt/SuuntoSDM.xslt b/xslt/SuuntoSDM.xslt index 5c3b17373..98b3b4988 100644 --- a/xslt/SuuntoSDM.xslt +++ b/xslt/SuuntoSDM.xslt @@ -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 > 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"/> |