diff options
| author | Keith Packard <keithp@keithp.com> | 2017-06-22 10:10:06 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-06-22 10:10:06 -0700 | 
| commit | 6dbb362b2d1df4d8c2d301e90624aceef8051ef5 (patch) | |
| tree | 882cca04aafcb8185444e412eb192ccf86f439c2 /altoslib/AltosFlightSeries.java | |
| parent | ea7e236e75452e27f3af6730a0542850851eb23d (diff) | |
altoslib: Clean up quaternion and rotation interfaces
Export euler to quaternion (instead of half_euler).
Provide angles to rotate rather than rates and time.
Add comments to quaternion and rotation code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'altoslib/AltosFlightSeries.java')
| -rw-r--r-- | altoslib/AltosFlightSeries.java | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/altoslib/AltosFlightSeries.java b/altoslib/AltosFlightSeries.java index 45d3b456..57f1a491 100644 --- a/altoslib/AltosFlightSeries.java +++ b/altoslib/AltosFlightSeries.java @@ -363,11 +363,11 @@ public class AltosFlightSeries extends AltosDataListener {  			double	dt = time - prev_time;  			if (dt > 0) { -				double	roll = AltosConvert.degrees_to_radians(roll_v.value); -				double	pitch = AltosConvert.degrees_to_radians(gyro_pitch.value(time)); -				double	yaw = AltosConvert.degrees_to_radians(gyro_yaw.value(time)); +				double	roll = AltosConvert.degrees_to_radians(roll_v.value) * dt; +				double	pitch = AltosConvert.degrees_to_radians(gyro_pitch.value(time)) * dt; +				double	yaw = AltosConvert.degrees_to_radians(gyro_yaw.value(time)) * dt; -				rotation.rotate(dt, pitch, yaw, roll); +				rotation.rotate(pitch, yaw, roll);  				orient_series.add(time, rotation.tilt());  			}  			prev_time = time; | 
