altoslib: Get rid of manual JSON encoding stuff
[fw/altos] / altoslib / AltosRotation.java
index 321a0f304d53d11d49950f2b82db3d277007ad24..97cf78967921f8bb10bc1c0d45bb8c7bc0969345 100644 (file)
@@ -17,7 +17,7 @@
 
 package org.altusmetrum.altoslib_11;
 
-public class AltosRotation implements AltosJsonable {
+public class AltosRotation extends AltosQuaternion {
        private AltosQuaternion         rotation;
 
        public double tilt() {
@@ -48,18 +48,7 @@ public class AltosRotation implements AltosJsonable {
                rotation = up.vectors_to_rotation(orient);
        }
 
-       public AltosJson json() {
-               return rotation.json();
-       }
-
-       public AltosRotation(AltosJson j) {
-               rotation = new AltosQuaternion(j);
-       }
-
-       public static AltosRotation fromJson(AltosJson j, AltosRotation def) {
-               if (j == null)
-                       return def;
-
-               return new AltosRotation(j);
+       public AltosRotation() {
+               rotation = new AltosQuaternion();
        }
 }