Switch from GPLv2 to GPLv2+
[fw/altos] / altoslib / AltosTelemetryMetrumSensor.java
index fc047afd9a59391f3888170bbb7c30d3d12e60ac..e15043b4add4862724d6d7a8b184c5625864046b 100644 (file)
@@ -3,7 +3,8 @@
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful, but
  * WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -15,7 +16,7 @@
  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
  */
 
-package org.altusmetrum.altoslib_2;
+package org.altusmetrum.altoslib_11;
 
 
 public class AltosTelemetryMetrumSensor extends AltosTelemetryStandard {
@@ -27,7 +28,7 @@ public class AltosTelemetryMetrumSensor extends AltosTelemetryStandard {
 
        int     acceleration;
        int     speed;
-       int     height;
+       int     height_16;
 
        int     v_batt;
        int     sense_a;
@@ -43,7 +44,7 @@ public class AltosTelemetryMetrumSensor extends AltosTelemetryStandard {
 
                acceleration  = int16(14);
                speed         = int16(16);
-               height        = int16(18);
+               height_16     = int16(18);
 
                v_batt        = int16(20);
                sense_a       = int16(22);
@@ -59,7 +60,8 @@ public class AltosTelemetryMetrumSensor extends AltosTelemetryStandard {
                state.set_pressure(pres);
                state.set_temperature(temp/100.0);
 
-               state.set_kalman(height, speed/16.0, acceleration/16.0);
+               state.set_kalman(extend_height(state, height_16),
+                                speed/16.0, acceleration/16.0);
 
                state.set_battery_voltage(AltosConvert.mega_battery_voltage(v_batt));