コード例 #1
0
        public Vector3 GetOrientation()
        {
            AXESXYZValues gyroValue = gyro.GetXYZInstantValues();
            Vector3       angles    = new Vector3();

            angles.X = gyroValue.Angles[0];
            angles.Y = gyroValue.Angles[1];
            angles.Z = gyroValue.Angles[2];

            return(angles);
        }
コード例 #2
0
        public Vector3 GetAcceleration()
        {
            AXESXYZValues gyroValue    = gyro.GetXYZInstantValues();
            Vector3       acceleration = new Vector3();

            acceleration.X = gyroValue.LinearAccelerations[0];
            acceleration.Y = gyroValue.LinearAccelerations[1];
            acceleration.Z = gyroValue.LinearAccelerations[2];

            return(acceleration);
        }