summaryrefslogtreecommitdiff
path: root/ao-tools/altosui/AltosState.java
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-05-17 21:30:57 -0700
committerKeith Packard <keithp@keithp.com>2010-05-17 21:30:57 -0700
commit563a9dcdfef42718370c49f16cc2271642b3e055 (patch)
tree332c5cc67f8f4fa737691c98c80c9c70b1406dac /ao-tools/altosui/AltosState.java
parentcc002c0a43a02845ba67d1a61828be382f307b2e (diff)
Finish basic flight monitoring UI with voice using FreeTTS
This captures telemetry data to log files and presents flight status information in audio form using FreeTTS. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/altosui/AltosState.java')
-rw-r--r--ao-tools/altosui/AltosState.java9
1 files changed, 2 insertions, 7 deletions
diff --git a/ao-tools/altosui/AltosState.java b/ao-tools/altosui/AltosState.java
index 192011d0..59a1999e 100644
--- a/ao-tools/altosui/AltosState.java
+++ b/ao-tools/altosui/AltosState.java
@@ -29,7 +29,7 @@ public class AltosState {
/* derived data */
- double report_time;
+ long report_time;
double time_change;
int tick;
@@ -66,11 +66,6 @@ public class AltosState {
int speak_tick;
double speak_altitude;
- static double
- aoview_time()
- {
- return System.currentTimeMillis() / 1000.0;
- }
void init (AltosTelemetry cur, AltosState prev_state) {
int i;
@@ -82,7 +77,7 @@ public class AltosState {
ground_altitude = AltosConvert.cc_barometer_to_altitude(data.ground_pres);
height = AltosConvert.cc_barometer_to_altitude(data.flight_pres) - ground_altitude;
- report_time = aoview_time();
+ report_time = System.currentTimeMillis();
accel_counts_per_mss = ((data.accel_minus_g - data.accel_plus_g) / 2.0) / 9.80665;
acceleration = (data.ground_accel - data.flight_accel) / accel_counts_per_mss;