/dongfang_FC_rewrite_tool/configsets/ADXRS610/config.xml |
---|
1,6 → 1,6 |
<parameterset eepromVersion="3" length="73"> |
<parameter name="bitConfig"> |
<bit name="CFG_SIMPLE_HEIGHT_CONTROL" value="0"/> |
<bit name="CFG_SIMPLE_HEIGHT_CONTROL" value="1"/> |
<bit name="CFG_SIMPLE_HC_HOLD_SWITCH" value="0"/> |
<bit name="CFG_HEADING_HOLD" value="0"/> |
<bit name="CFG_COMPASS_ACTIVE" value="0"/> |
67,10 → 67,10 |
<parameter name="airpressureAccZCorrection" value="184"/> |
<parameter name="heightP" value="var1"/> |
<parameter name="heightI" value="var2"/> |
<parameter name="heightD" value="0"/> |
<parameter name="heightD" value="100"/> |
<parameter name="heightSetting" value="var0"/> |
<parameter name="heightControlMaxIntegral" value="30"/> |
<parameter name="heightMaxThrottleChange" value="30"/> |
<parameter name="heightControlMaxIntegral" value="40"/> |
<parameter name="heightMaxThrottleChange" value="40"/> |
<parameter name="heightSlewRate" value="200"/> |
/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/SimpleOSDTool.java |
---|
49,7 → 49,7 |
public static void main(String[] args) throws IOException { |
SimpleOSDTool test = new SimpleOSDTool(); |
MKConnection _port = new MKTCPConnection(); // new RXTXSerialPort(); |
MKConnection _port = new MKTCPConnection(); // |
_port.init("8080"); |
FrameQueue q = new FrameQueue(_port); |
SimpleOSDView v = new SimpleOSDView (); |
/dongfang_FC_rewrite_tool/src/dongfang/mkt/main/UniversalConfigurator.java |
---|
245,7 → 245,7 |
if ("w".equals(args[0]) && (args.length!=3 && args.length!=4)) help(); |
if ("r".equals(args[0]) && (args.length!=3 && args.length!=4)) help(); |
String portIdentifier = "COM10"; |
String portIdentifier = null; |
if ("r".equals(args[0])) { |
readConfiguration(portIdentifier, Integer.parseInt(args[1])); |
/dongfang_FC_rewrite_tool/src/dongfang/mkt/ui/offscreendisplay/MapImageView.java |
---|
135,7 → 135,6 |
GPSPosition upperLeft = new GPSPosition(); |
GPSPosition lowerRight = new GPSPosition(); |
/* |
upperLeft.setLatitude(47.328355); |
upperLeft.setLongitude(8.518231); |
143,20 → 142,16 |
lowerRight.setLatitude(47.321532); |
lowerRight.setLongitude(8.530822); |
// geotagged geo:lat=47.324614 geo:lon=8.528202 |
highlight.setLatitude(47.324714); |
highlight.setLongitude(8.528102); |
*/ |
upperLeft.setLatitude(47.344577); |
upperLeft.setLongitude(8.529304); |
// upperLeft.setLatitude(47.344577); |
// upperLeft.setLongitude(8.529304); |
// * l/r: geotagged geo:lat=47.321749 geo:lon=8.534403 |
lowerRight.setLatitude(47.337576); |
lowerRight.setLongitude(8.542220); |
// lowerRight.setLatitude(47.337576); |
// lowerRight.setLongitude(8.542220); |
setSize(MAPWIDTH, MAPHEIGHT); |
this.upperLeft = upperLeft; |
this.lowerRight = lowerRight; |
mapImage = Toolkit.getDefaultToolkit().getImage("qth.jpg"); |
mapImage = Toolkit.getDefaultToolkit().getImage("flugplatz_large.jpg"); |
} |
} |
/dongfang_FC_rewrite_tool/src/dongfang/mkt/ui/offscreendisplay/VariousInfoPane.java |
---|
1,6 → 1,7 |
package dongfang.mkt.ui.offscreendisplay; |
import java.awt.BorderLayout; |
import java.awt.Font; |
import java.awt.GridLayout; |
import java.util.Formatter; |
import java.util.Locale; |
17,15 → 18,22 |
import dongfang.mkt.frames.OSDDataResponseFrame; |
public class VariousInfoPane extends JPanel implements OSDDataConsumer { |
static class BigLabel extends JLabel { |
public BigLabel() { |
super(); |
setFont(getFont().deriveFont(Font.BOLD, 16)); |
} |
} |
class PositionsPanel extends JPanel implements OSDDataConsumer { |
class CurrentPositionPanel extends JPanel { |
JLabel lat; |
JLabel lon; |
BigLabel lat; |
BigLabel lon; |
void init() { |
lat = new JLabel(); |
lon = new JLabel(); |
lat = new BigLabel(); |
lon = new BigLabel(); |
} |
int getNumRows() { |
47,11 → 55,11 |
} |
class HomePositionPanel extends CurrentPositionPanel { |
JLabel home; |
BigLabel home; |
void init() { |
super.init(); |
home = new JLabel(); |
home = new BigLabel(); |
} |
int getNumRows() { |
118,16 → 126,16 |
class HeightsPanel extends JPanel implements OSDDataConsumer { |
class HeightPanel extends JPanel implements OSDDataConsumer { |
JLabel baroHeight; |
JLabel GPSHeight; |
JLabel baroVVI; |
JLabel GPSVVI; |
BigLabel baroHeight; |
BigLabel GPSHeight; |
BigLabel baroVVI; |
BigLabel GPSVVI; |
void init() { |
baroHeight = new JLabel(); |
GPSHeight = new JLabel(); |
baroVVI = new JLabel(); |
GPSVVI = new JLabel(); |
baroHeight = new BigLabel(); |
GPSHeight = new BigLabel(); |
baroVVI = new BigLabel(); |
GPSVVI = new BigLabel(); |
} |
int getNumRows() { |
203,14 → 211,14 |
} |
class SpeedHeadingPanel extends JPanel implements OSDDataConsumer { |
JLabel noseDirection; |
JLabel flightDirection; |
JLabel speed; |
BigLabel noseDirection; |
BigLabel flightDirection; |
BigLabel speed; |
void init() { |
noseDirection = new JLabel(); |
flightDirection = new JLabel(); |
speed = new JLabel(); |
noseDirection = new BigLabel(); |
flightDirection = new BigLabel(); |
speed = new BigLabel(); |
Border b = BorderFactory.createTitledBorder( |
BorderFactory.createEtchedBorder(), "Speed and heading"); |
setBorder(b); |
253,6 → 261,7 |
class StatusPanel extends JPanel implements OSDDataConsumer { |
JProgressBar dataAgeProgress; |
JProgressBar battery; |
BigLabel numberOfSatellites; |
long dataTime = 0; |
259,6 → 268,7 |
void init() { |
dataAgeProgress = new JProgressBar(0, 5000); |
battery = new JProgressBar(100, 130); |
numberOfSatellites = new BigLabel(); |
//dataAgeProgress.setEnabled(false); |
Border b = BorderFactory.createTitledBorder( |
282,7 → 292,7 |
} |
int getNumRows() { |
return 2; |
return 3; |
} |
void layoutSubs() { |
290,6 → 300,8 |
add(dataAgeProgress); |
add(new JLabel("Battery")); |
add(battery); |
add(new JLabel("Satellites")); |
add(numberOfSatellites); |
} |
StatusPanel() { |
303,6 → 315,7 |
return; |
dataTime = System.currentTimeMillis(); |
battery.setValue(data.getBatteryVoltage()); |
numberOfSatellites.setText("" + data.getNumberOfSatellites()); |
} |
} |
/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> |