altoslib/altosui: Fixes for state changes
authorKeith Packard <keithp@keithp.com>
Sat, 31 Aug 2013 13:19:28 +0000 (08:19 -0500)
committerKeith Packard <keithp@keithp.com>
Sat, 31 Aug 2013 13:19:28 +0000 (08:19 -0500)
Format for gps alt (now double).
Use new code for csv file loading.

Signed-off-by: Keith Packard <keithp@keithp.com>
altoslib/AltosState.java
altosui/AltosCSV.java
altosui/AltosUI.java

index 52650062c479c205a520cdf8c55c6a66a682ae87..aa3de432a75fa2e7feaaf9522d967ba1555213ed 100644 (file)
@@ -350,7 +350,7 @@ public class AltosState implements Cloneable {
        }
 
        double motion_filter_value() {
-               return 1/ Math.exp(time_change/10.0);
+               return 1/ Math.exp(time_change/2.0);
        }
 
        void update_speed() {
index 0b5a74e964c838224e8ab437480d552c468c9bb8..c96c815e129c38edf4a0bf03bbc18f6e168158f5 100644 (file)
@@ -170,7 +170,7 @@ public class AltosCSV implements AltosWriter {
                if (from_pad == null)
                        from_pad = new AltosGreatCircle();
 
-               out.printf("%2d,%2d,%3d,%12.7f,%12.7f,%6d,%5d,%3d,%3d,%3d,%3d,%3d,%9.0f,%9.0f,%4.0f,%4.0f,%6.1f",
+               out.printf("%2d,%2d,%3d,%12.7f,%12.7f,%8.1f,%5d,%3d,%3d,%3d,%3d,%3d,%9.0f,%9.0f,%4.0f,%4.0f,%6.1f",
                           gps.connected?1:0,
                           gps.locked?1:0,
                           gps.nsat,
index 72b2c0d9869cd71e62a7a6a0ce374968427505b8..b47df0d9cc4844e45d94c40e94775cc24bc85fe8 100644 (file)
@@ -353,7 +353,7 @@ public class AltosUI extends AltosUIFrame {
                        if (file.getName().endsWith("eeprom"))
                                return new AltosEepromFile(in);
                        else
-                               return null; // new AltosTelemetryIterable(in);
+                               return new AltosTelemetryFile(in);
                } catch (FileNotFoundException fe) {
                        System.out.printf("%s\n", fe.getMessage());
                        return null;