Joli\ArDrone\Navdata\Option::getDemoOptionData PHP Method

getDemoOptionData() private method

private getDemoOptionData ( )
    private function getDemoOptionData()
    {
        $flyState = self::$flyState[$this->buffer->getUint16LE()];
        $controlState = self::$controlState[$this->buffer->getUint16LE()];
        $batteryPercentage = $this->buffer->getUint32LE();
        $theta = $this->buffer->getFloat32() / 1000;
        // [mdeg]
        $phi = $this->buffer->getFloat32() / 1000;
        // [mdeg]
        $psi = $this->buffer->getFloat32() / 1000;
        // [mdeg]
        $altitude = $this->buffer->getUint32LE() / 1000;
        // [mm]
        $velocity = $this->buffer->getVector31();
        // [mm/s]
        $frameIndex = $this->buffer->getUint32LE();
        $detection = ['camera' => ['rotation' => $this->buffer->getMatrix33(), 'translation' => $this->buffer->getVector31()], 'tagIndex' => $this->buffer->getUint32LE()];
        $detection['camera']['type'] = $this->buffer->getUint32LE();
        $drone = ['camera' => ['rotation' => $this->buffer->getMatrix33(), 'translation' => $this->buffer->getVector31()]];
        $rotation = ['frontBack' => $theta, 'pitch' => $theta, 'theta' => $theta, 'y' => $theta, 'leftRight' => $phi, 'roll' => $phi, 'phi' => $phi, 'x' => $phi, 'clockwise' => $psi, 'yaw' => $psi, 'psi' => $psi, 'z' => $psi];
        $data = ['controlState' => $controlState, 'flyState' => $flyState, 'batteryPercentage' => hexdec($batteryPercentage), 'rotation' => $rotation, 'frontBackDegrees' => $theta, 'leftRightDegrees' => $phi, 'clockwiseDegrees' => $psi, 'altitude' => $altitude, 'altitudeMeters' => $altitude, 'velocity' => $velocity, 'xVelocity' => $velocity['x'], 'yVelocity' => $velocity['y'], 'zVelocity' => $velocity['z'], 'frameIndex' => $frameIndex, 'detection' => $detection, 'drone' => $drone];
        return $data;
    }