Metadata-Version: 2.4
Name: flysim
Version: 1.3.1
Summary: 3D drone & fixed-wing flight simulator with keyboard/mouse/HID control, real aerodynamics, terrain, and a Qt control panel.
Author-email: cycleuser <cycleuser@cycleuser.org>
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/CodeOfMe/FlySim
Project-URL: Repository, https://github.com/CodeOfMe/FlySim
Project-URL: Issues, https://github.com/CodeOfMe/FlySim/issues
Keywords: drone,simulator,3d,opengl,pygame,hid,et16s,rc
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Games/Entertainment :: Simulation
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pygame>=2.4
Requires-Dist: PyOpenGL>=3.1.7
Requires-Dist: numpy>=1.24
Requires-Dist: trimesh>=4.0
Requires-Dist: pygltflib>=1.0
Requires-Dist: Pillow>=9.0
Provides-Extra: qt
Requires-Dist: PySide6>=6.4; extra == "qt"
Dynamic: license-file

# FlySim

A 3D drone & fixed-wing flight simulator with real-time OpenGL rendering,
realistic aerodynamics, and a Qt control panel. Supports **keyboard**, **mouse**,
and the **WFLY ET16S** RC transmitter over USB HID.

## Features

- **12 multicopter models** (quad / hexa / octo): GEPRC Mark5, iFlight, TBS,
  Tarot 680 Pro / T18 / T960, E616P, DJI Agras T50, DJI M600 Pro, DJI F450 —
  each built to its real wheelbase and frame dimensions
- **3 fixed-wing aircraft**: trainer, Eclipson Model A, sport plane, with a
  proper aerodynamic model (angle of attack, lift, drag, stall)
- **Power-system builder**: 12 motors, 39 propellers (3"→54", incl. 3011), 12
  batteries — real-time payload capacity & endurance via actuator-disc theory
- **Terrain system**: flat, fractal-noise random DEM, load DEM (PNG/ASC/GeoTIFF),
  and satellite imagery (ESRI World Imagery), with terrain-aware collision
- **Airflow visualization**: particle streamlines, rotor downwash, wind arrows
- **Atmosphere**: temperature / pressure / humidity / CO₂ → real-time air
  density, viscosity, speed of sound (ideal-gas law + Sutherland's law)
- **Qt control panel** (`flysim --qt`): tabbed menu, model selection,
  power system, environment, and camera zoom
- **Realistic physics**: alternating motor spin (CW/CCW), momentum-theory hover
  power, per-motor thrust mixing, Verlet rope + payload
- Live RC panel (channels CH1–CH4 in PWM, RSSI signal strength)

## Install

```bash
pip install flysim
```

Or from source:

```bash
git clone https://github.com/CodeOfMe/FlySim.git
cd FlySim
pip install -e .
```

## Run

```bash
flysim              # pygame front-end
flysim --qt         # PySide6 front-end with control panel
# or
python -m flysim
```

## Requirements

- Python >= 3.10
- pygame >= 2.4, PyOpenGL >= 3.1.7, numpy >= 1.24
- trimesh >= 4.0, pygltflib >= 1.0
- PySide6 (optional, for `--qt`)

## Controls

### Keyboard

| Action | Keys |
|--------|------|
| Throttle up / down | W / S |
| Yaw left / right | A / D |
| Pitch forward / back | Up / Down |
| Roll left / right | Left / Right |
| Toggle airflow | V |
| Toggle fixed-wing / multicopter | F |
| Cycle drone model | ` (backtick) |
| Toggle payload | G |
| Pause | P |
| Reset | R |
| Orbit camera | Mouse drag |
| Zoom | Mouse wheel |
| Quit | ESC |

### WFLY ET16S (HID, Mode 2)

Throttle = left stick Y, Yaw = left stick X, Pitch = right stick Y,
Roll = right stick X. Auto-detected via pygame joystick.

## Coordinate system

- North = -Z, East = +X, Up = +Y
- yaw = 0 faces North; yaw increases clockwise (top view)

## License

GPL-3.0-or-later. See [LICENSE](LICENSE).
