/// <summary>
        /// Initialise movuino's attributs
        /// </summary>
        public void Init()
        {
            _prevAccel = new Vector3(0, 0, 0);
            _prevGyr   = new Vector3(0, 0, 0);
            _prevMag   = new Vector3(0, 0, 0);
            _prevEuler = new Vector3(0, 0, 0);

            _accel = new Vector3(0, 0, 0);
            _gyr   = new Vector3(0, 0, 0);
            _mag   = new Vector3(0, 0, 0);
            _euler = new Vector3(0, 0, 0);

            _initObjectAngle = this.gameObject.transform.eulerAngles;
            _deltaAngleAccel = new Vector3(0, 0, 0);

            _initGyr        = new Vector3(666, 666, 666);
            _initAccel      = new Vector3(666, 666, 666);
            _initMag        = new Vector3(666, 666, 666);
            _initEulerAngle = new Vector3(0, 0, 0);

            _angleGyrMethod   = new Vector3(0, 0, 0);
            _angleAccelMethod = new Vector3(0, 0, 0);
            _angleMagMethod   = new Vector3(0, 0, 0);

            _listMeanAcc  = new List <Vector3>();
            _listMeanGyro = new List <Vector3>();
            _listMeanMag  = new List <Vector3>();

            initmovuinoCoordinates = new Coordinates(0);

            _OSCmovuinoSensorData = OSCDataHandler.CreateOSCDataHandler <OSCMovuinoSensorBasicData>();
        }
Example #2
0
        public MovuinoSensor(string adress)
        {
            prevAccel = new Vector3(0, 0, 0);
            prevGyr   = new Vector3(0, 0, 0);
            prevMag   = new Vector3(0, 0, 0);

            Accel = new Vector3(0, 0, 0);
            Gyr   = new Vector3(0, 0, 0);
            Mag   = new Vector3(0, 0, 0);

            initAngle            = new Vector3(0, 0, 0);
            movuinoAdress        = adress;
            OSCmovuinoSensorData = OSCDataHandler.CreateOSCDataHandler <OSCMovuinoSensorBasicData>();
        }