|
@@ -32,11 +32,6 @@ public class AttitudeJson : JCUnityLib.CustomJson
|
|
|
"Variance",
|
|
"Variance",
|
|
|
"VectorByBlock"
|
|
"VectorByBlock"
|
|
|
);
|
|
);
|
|
|
- InitJsonClass<EllipsoidFitting>(() => new EllipsoidFitting(default, default, default),
|
|
|
|
|
- "Center",
|
|
|
|
|
- "CorrectMatrixArray",
|
|
|
|
|
- "Radius"
|
|
|
|
|
- );
|
|
|
|
|
InitJsonClass<ByteToShorts>(() => new ByteToShorts(3),
|
|
InitJsonClass<ByteToShorts>(() => new ByteToShorts(3),
|
|
|
"ByteToShort"
|
|
"ByteToShort"
|
|
|
);
|
|
);
|
|
@@ -50,6 +45,25 @@ public class AttitudeJson : JCUnityLib.CustomJson
|
|
|
"Short",
|
|
"Short",
|
|
|
"ThresholdRate"
|
|
"ThresholdRate"
|
|
|
);
|
|
);
|
|
|
|
|
+ InitJsonClass<EllipsoidFitting>(
|
|
|
|
|
+ o => {
|
|
|
|
|
+ var to = (EllipsoidFitting)o;
|
|
|
|
|
+ JToken jt = new JObject();
|
|
|
|
|
+ jt["Center"] = ToJTokenByImporter(to.Center);
|
|
|
|
|
+ jt["CorrectMatrixArray"] = ToJTokenByImporter(to.CorrectMatrixArray);
|
|
|
|
|
+ jt["Raduis"] = ToJTokenByImporter(to.Radius);
|
|
|
|
|
+ return jt;
|
|
|
|
|
+ },
|
|
|
|
|
+ jt => {
|
|
|
|
|
+ var o = new EllipsoidFitting(
|
|
|
|
|
+ (Vector<double>)ParseByExporter(jt["Center"], typeof(Vector<double>)),
|
|
|
|
|
+ null,
|
|
|
|
|
+ (Vector<double>)ParseByExporter(jt["Radius"], typeof(Vector<double>))
|
|
|
|
|
+ );
|
|
|
|
|
+ o.CorrectMatrixArray = (double[][])ParseByExporter(jt["CorrectMatrixArray"], typeof(double[][]));
|
|
|
|
|
+ return o;
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
InitJsonClass<Dictionary<Vector<int>, Vector<double>>>(
|
|
InitJsonClass<Dictionary<Vector<int>, Vector<double>>>(
|
|
|
o => JToken.FromObject(o),
|
|
o => JToken.FromObject(o),
|
|
|
jt => {
|
|
jt => {
|