Example #1
0
        public static TrackingValues FromPB(metaio.unitycommunication.TrackingValues tv)
        {
            TrackingValues ret = new TrackingValues();

            ret.state         = (TrackingState)tv.State;
            ret.translation   = new Vector3d(tv.Translation.X, tv.Translation.Y, tv.Translation.Z);
            ret.rotation      = new Vector4d(tv.Rotation.X, tv.Rotation.Y, tv.Rotation.Z, tv.Rotation.W);
            ret.llaCoordinate = new LLACoordinate()
            {
                latitude  = tv.LlaCoordinate.Latitude,
                longitude = tv.LlaCoordinate.Longitude,
                altitude  = tv.LlaCoordinate.Altitude,
                accuracy  = tv.LlaCoordinate.Accuracy,
                timestamp = tv.LlaCoordinate.Timestamp
            };
            ret.quality            = tv.Quality;
            ret.timeElapsed        = tv.TimeElapsed;
            ret.coordinateSystemID = tv.CoordinateSystemID;
            ret.cosName            = tv.CosName;
            ret.additionalValues   = tv.AdditionalValues;
            return(ret);
        }
Example #2
0
 public static TrackingValues FromPB(metaio.unitycommunication.TrackingValues tv)
 {
     TrackingValues ret = new TrackingValues();
     ret.state = (TrackingState)tv.State;
     ret.translation = new Vector3d(tv.Translation.X, tv.Translation.Y, tv.Translation.Z);
     ret.rotation = new Vector4d(tv.Rotation.X, tv.Rotation.Y, tv.Rotation.Z, tv.Rotation.W);
     ret.llaCoordinate = new LLACoordinate()
     {
         latitude = tv.LlaCoordinate.Latitude,
         longitude = tv.LlaCoordinate.Longitude,
         altitude = tv.LlaCoordinate.Altitude,
         accuracy = tv.LlaCoordinate.Accuracy,
         timestamp = tv.LlaCoordinate.Timestamp
     };
     ret.quality = tv.Quality;
     ret.timeElapsed = tv.TimeElapsed;
     ret.trackingTimeMs = tv.TrackingTimeMs;
     ret.timestampInSeconds = tv.TimestampInSeconds;
     ret.coordinateSystemID = tv.CoordinateSystemID;
     ret.cosName = tv.CosName;
     ret.additionalValues = tv.AdditionalValues;
     ret.sensor = tv.Sensor;
     return ret;
 }