diff options
| author | Keith Packard <keithp@keithp.com> | 2017-06-08 20:37:58 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-06-08 20:37:58 -0700 | 
| commit | 32de85691f2e4ed1430a259e05a514ad820b32d9 (patch) | |
| tree | 25ba96ae1bf03732c4cb6ef419bdc9286be1f091 /altoslib/AltosConvert.java | |
| parent | 4c5acb57d7ac1abec7bb4cda9dc88c2a19767a2d (diff) | |
altoslib: Compute orientation from eeprom data files
This was lost in the AltosFlightSeries transformation.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosConvert.java')
| -rw-r--r-- | altoslib/AltosConvert.java | 13 | 
1 files changed, 13 insertions, 0 deletions
| diff --git a/altoslib/AltosConvert.java b/altoslib/AltosConvert.java index a252abdf..0d25c6d7 100644 --- a/altoslib/AltosConvert.java +++ b/altoslib/AltosConvert.java @@ -184,6 +184,18 @@ public class AltosConvert {  		return altitude;  	} +	public static double degrees_to_radians(double degrees) { +		if (degrees == AltosLib.MISSING) +			return AltosLib.MISSING; +		return degrees * (Math.PI / 180.0); +	} + +	public static double radians_to_degrees(double radians) { +		if (radians == AltosLib.MISSING) +			return AltosLib.MISSING; +		return radians * (180.0 / Math.PI); +	} +  	public static double  	cc_battery_to_voltage(double battery)  	{ @@ -392,6 +404,7 @@ public class AltosConvert {  	}  	public static double acceleration_from_sensor(double sensor, double plus_g, double minus_g, double ground) { +  		if (sensor == AltosLib.MISSING)  			return AltosLib.MISSING; | 
