projects
/
fw
/
altos
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
altoslib: Ignore extra AO_LOG_FLIGHT records from TeleGPS
[fw/altos]
/
altoslib
/
AltosConvert.java
diff --git
a/altoslib/AltosConvert.java
b/altoslib/AltosConvert.java
index a65669dabde9d2f3007536318f52737de1a86f7a..18878c026dd01115501e87f8880a9bcb613feea6 100644
(file)
--- a/
altoslib/AltosConvert.java
+++ b/
altoslib/AltosConvert.java
@@
-18,7
+18,7
@@
/*
* Sensor data conversion functions
*/
/*
* Sensor data conversion functions
*/
-package org.altusmetrum.altoslib_
4
;
+package org.altusmetrum.altoslib_
5
;
public class AltosConvert {
/*
public class AltosConvert {
/*
@@
-208,7
+208,7
@@
public class AltosConvert {
static public double mega_battery_voltage(int v_batt) {
if (v_batt != AltosLib.MISSING)
static public double mega_battery_voltage(int v_batt) {
if (v_batt != AltosLib.MISSING)
- return 3.3 * mega_adc(v_batt) * (
15.0 + 27.0) / 27
.0;
+ return 3.3 * mega_adc(v_batt) * (
5.6 + 10.0) / 10
.0;
return AltosLib.MISSING;
}
return AltosLib.MISSING;
}
@@
-224,6
+224,12
@@
public class AltosConvert {
return sensor / 32767.0 * supply * 127/27;
}
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;
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 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");
public static String show_gs(String format, double a) {
a = meters_to_g(a);
format = format.concat(" g");