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 <[email protected]>
---
 xslt/SuuntoSDM.xslt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/xslt/SuuntoSDM.xslt b/xslt/SuuntoSDM.xslt
index 5c3b173..98b3b49 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 &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"/>
-- 
1.9.1

_______________________________________________
subsurface mailing list
[email protected]
http://lists.hohndel.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to