Rev 1563 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1563 | Rev 1564 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | import dongfang.mkt.comm.FrameQueue; |
15 | import dongfang.mkt.comm.FrameQueue; |
16 | import dongfang.mkt.comm.MKConnection; |
16 | import dongfang.mkt.comm.MKConnection; |
17 | import dongfang.mkt.comm.serial.RXTXSerialPort; |
17 | import dongfang.mkt.comm.serial.RXTXSerialPort; |
18 | import dongfang.mkt.frames.OSDDataRequestFrame; |
18 | import dongfang.mkt.frames.OSDDataRequestFrame; |
19 | import dongfang.mkt.frames.OSDDataResponseFrame; |
19 | import dongfang.mkt.frames.OSDDataResponseFrame; |
20 | import dongfang.mkt.frames.OSDDataResponseFrame.GPSDistanceAndBearing; |
- | |
21 | import dongfang.mkt.frames.OSDDataResponseFrame.GPSPosition; |
- | |
Line 22... | Line 20... | ||
22 | 20 | ||
23 | public class OSDLogger { |
21 | public class OSDLogger { |
24 | private static final PrintStream STDERR = System.out; |
22 | private static final PrintStream STDERR = System.out; |
Line 68... | Line 66... | ||
68 | w.write(" <homePosition " + f.getHomePosition().toXML() + " " + f.getCurrentToHome().toXML() + "/>\n"); |
66 | w.write(" <homePosition " + f.getHomePosition().toXML() + " " + f.getCurrentToHome().toXML() + "/>\n"); |
69 | w.write(" <heading compass=\"" + f.getCompassHeading() + "\" flight=\"" + f.getDirectionOfFlight() + "\" groundSpeed=\"" + ((double)f.getGroundSpeed())/100 + "\"/>\n"); |
67 | w.write(" <heading compass=\"" + f.getCompassHeading() + "\" flight=\"" + f.getDirectionOfFlight() + "\" groundSpeed=\"" + ((double)f.getGroundSpeed())/100 + "\"/>\n"); |
Line 70... | Line 68... | ||
70 | 68 | ||
71 | w.write(" <waypoints index=\"" + f.getWaypointIndex() + "\" count=\"" + f.getWaypointCount() + "\"/>\n"); |
69 | w.write(" <waypoints index=\"" + f.getWaypointIndex() + "\" count=\"" + f.getWaypointCount() + "\"/>\n"); |
72 | w.write(" <height barometric=\"" + f.getHeightByPressure() + "\" barometricVerticalVelocity=\"" + f.getVerticalVelocityByPressure() + "\" gpsVerticalVelocity=\"" + f.getVerticalVelocityByGPS() + "\"/>\n"); |
- | |
Line 73... | Line 70... | ||
73 | w.write(" <height barometric=\"" + f.getHeightByPressure() + "\"/>\n"); |
70 | w.write(" <height barometric=\"" + f.getHeightByPressure() + "\" barometricVerticalVelocity=\"" + f.getVerticalVelocityByPressure() + "\" gpsVerticalVelocity=\"" + f.getVerticalVelocityByGPS() + "\"/>\n"); |
74 | 71 | ||
Line 75... | Line 72... | ||
75 | w.write(" <status rcQuality=\"" + f.getRcQuality() + "\" fcflags=\"" + f.getFcFlags() + "\" fcflags2=\"" + f.getFcFlags2() + "\" ncflags=\"" + f.getNcFlags() + "\" errorCode=\"" + f.getErrorCode() + "\" numberOfSatellites=\"" + f.getNumberOfSatellites() + "\"/>\n"); |
72 | w.write(" <status rcQuality=\"" + f.getRcQuality() + "\" fcflags=\"" + f.getFcFlags() + "\" fcflags2=\"" + f.getFcFlags2() + "\" ncflags=\"" + f.getNcFlags() + "\" errorCode=\"" + f.getErrorCode() + "\" numberOfSatellites=\"" + f.getNumberOfSatellites() + "\"/>\n"); |