Metadata-Version: 2.1
Name: quat3d
Version: 0.3.3
Summary: This is an IMU quaternion data visualization tool for xkit.
Home-page: https://github.com/planxstudio/xkit
Author: chanmin.park
Author-email: devcamp@gmail.com
Keywords: xkit,genlib
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
Requires-Dist: click
Requires-Dist: python-dotenv
Requires-Dist: pyqt6
Requires-Dist: pyqtgraph
Requires-Dist: pyopengl
Requires-Dist: pyopengl_accelerate
Requires-Dist: numpy-stl
Requires-Dist: genlib

This is an IMU quaternion data visualization tool for xkit.

### History
- V0.3.0
  - Implementing 3D visualization with OpenGL
  - STL file included(jet.stl)
  - UDPServer or MulticastReceiver

### Install
```sh
pip install quat
```

### Dependencies
- PyQt6
- PyOpenGL
- pyqtgraph
- numpy-stl
- genlib


### Running
**UDP Server (port 7321)**
```sh
quat
```
**MulticastReceiver (group 239.8.7.6, port 7321)**
```sh
quat --mcast
```
**etc**  
--group=\<group\>  
--iport=\<port\>  
--log=\<stream | file>

### Client Implementations
- UDPClient or MulticastSender

**quaternion data format**
  ```sh
  w, x, y, z
  ```

**Example**
  ```python
  import time
  from genlib.upd import UDPClient
  from pop.ext import IMU

  imu = IMU()
  udp = UDPClient()
  
  QUAT_IP = '192.168.0.100'
  QUAT_PORT = 7321

  while True:
      w, x, y, z = imu.read(IMU.QUATERNION)
      udp.sendTo(f"{w}, {x}, {y}, {z}".encode(), (QUAT_IP, QUAT_PORT))
      time.sleep(20/1000)  
  ```
