altoslib: Add units converters for latitude and longitude
[fw/altos] / altoslib / AltosConvert.java
index 8bcb9c9693618df5ce4dcd382fd37648dfe8d64d..dc0fbb6253608529b0e6e6fb33ec02be7687f21d 100644 (file)
@@ -224,6 +224,12 @@ public class AltosConvert {
                return sensor / 32767.0 * supply * 127/27;
        }
 
+       static double tele_gps_voltage(int sensor) {
+               double  supply = 3.3;
+
+               return sensor / 32767.0 * supply * (5.6 + 10.0) / 10.0;
+       }
+
        static double easy_mini_voltage(int sensor, int serial) {
                double  supply = 3.3;
                double  diode_offset = 0.0;
@@ -343,6 +349,12 @@ public class AltosConvert {
 
        public static AltosOrient orient = new AltosOrient();
 
+       public static AltosVoltage voltage = new AltosVoltage();
+
+       public static AltosLatitude latitude = new AltosLatitude();
+
+       public static AltosLongitude longitude = new AltosLongitude();
+
        public static String show_gs(String format, double a) {
                a = meters_to_g(a);
                format = format.concat(" g");