Shearwater import: add support for DC reported ceiling

This adds stopdepth, stoptime and in_deco attributes on Shearwater XML
import. The output from the XSLT is very verbose (these values are
printed for each sample), but as Subsurface cleans things up, there is
no need to do any more magic on XSLT side.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
This commit is contained in:
Miika Turkia 2018-05-27 08:32:30 +03:00 committed by Lubomir I. Ivanov
parent cf4e3e17aa
commit ddd35bc941

View file

@ -192,6 +192,33 @@
<xsl:value-of select="concat(currentNdl, ':00 min')"/>
</xsl:attribute>
</xsl:if>
<xsl:if test="firstStopDepth != ''">
<xsl:attribute name="stopdepth">
<xsl:choose>
<xsl:when test="$units = 'imperial'">
<xsl:value-of select="concat(format-number(firstStopDepth * 0.3048, '0.00'), ' m')"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="concat(firstStopDepth, ' m')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<xsl:attribute name="stoptime">
<xsl:value-of select="concat(firstStopTime, ' min')"/>
</xsl:attribute>
<xsl:choose>
<xsl:when test="firstStopDepth = 0">
<xsl:attribute name="in_deco">
<xsl:value-of select="'0'"/>
</xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="in_deco">
<xsl:value-of select="'1'"/>
</xsl:attribute>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</sample>
</xsl:for-each>
</divecomputer>