mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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:
parent
cf4e3e17aa
commit
ddd35bc941
1 changed files with 27 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue