Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 1569 → Rev 1570

/dongfang_FC_rewrite_tool/xslt/googleEarthPlot.xsl
0,0 → 1,31
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:kml="http://www.opengis.net/kml/2.2" >
<xsl:template match="/">
<kml:kml><kml:Document><kml:name>Flight 1000</kml:name>
<kml:Style id="transPurpleLineGreenPoly"><kml:LineStyle><kml:color>7fff00ff</kml:color>
<kml:width>4</kml:width></kml:LineStyle>
<kml:PolyStyle><kml:color>7f00ff00</kml:color></kml:PolyStyle>
</kml:Style>
<kml:Placemark><kml:name>Absolute</kml:name>
<kml:visibility>1</kml:visibility>
<kml:description>Transparent purple line</kml:description>
<kml:styleUrl>#transPurpleLineGreenPoly</kml:styleUrl>
<kml:LineString><kml:tessellate>1</kml:tessellate><kml:altitudeMode>absolute</kml:altitudeMode>
<kml:coordinates>
<xsl:text>
</xsl:text>
<xsl:apply-templates select="mk-osddata/dataset[@timestamp>45000]/currentPosition"/>
<xsl:text>
</xsl:text>
</kml:coordinates>
</kml:LineString>
</kml:Placemark>
</kml:Document>
</kml:kml>
</xsl:template>
<xsl:template match="currentPosition"><xsl:value-of select="@longitude"/>,<xsl:value-of select="@latitude"/>,<xsl:value-of select="@altitude"/><xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
 
/dongfang_FC_rewrite_tool/xslt/heightControlDebug.xsl
0,0 → 1,30
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="*"><xsl:apply-templates /></xsl:template>
 
<xsl:template match="dataset">
<xsl:copy>
<xsl:apply-templates select="@*"/>
<xsl:apply-templates />
</xsl:copy>
<xsl:text>
</xsl:text>
</xsl:template>
 
<xsl:template match="text()"></xsl:template>
<xsl:template match="data[@offset='20' or @offset='21' or @offset='22' or @offset='23' or @offset='24' or @offset='25' or @offset='26' or @offset='27' or @offset='28' or @offset='29' or @offset='30']">
<xsl:copy><xsl:apply-templates select="@*"/></xsl:copy>
<!-- <xsl:apply-templates select=''/> -->
<xsl:text>
</xsl:text>
</xsl:template>
 
<xsl:template match="data"></xsl:template>
<xsl:template match="attribute::*">
<xsl:copy>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
/dongfang_FC_rewrite_tool/xslt/synthAbsoluteAltitude.xsl
0,0 → 1,47
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- this serves to insert an absolute altitude based on a constant + the pressure height.
Reason: It was omitted to log the GPS altitudes... -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 
<xsl:template match="*">
<xsl:copy>
<xsl:apply-templates select="attribute::*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>
 
<xsl:template match="currentPosition">
<xsl:variable name="height"><xsl:value-of select="../height/@barometric" /></xsl:variable>
<xsl:copy>
<xsl:apply-templates select="attribute::*"/>
<xsl:apply-templates/>
<xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute>
</xsl:copy>
</xsl:template>
 
<xsl:template match="targetPosition">
<xsl:variable name="height" select="0"/>
<xsl:copy>
<xsl:apply-templates select="attribute::*"/>
<xsl:apply-templates/>
<xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute>
</xsl:copy>
</xsl:template>
 
<xsl:template match="homePosition">
<xsl:variable name="height" select="0"/>
<xsl:copy>
<xsl:apply-templates select="attribute::*"/>
<xsl:apply-templates/>
<xsl:attribute name="altitude"><xsl:value-of select="470 + $height"/></xsl:attribute>
</xsl:copy>
</xsl:template>
 
<xsl:template match="attribute::*">
<xsl:copy>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>