Skip to content

1protocol/uav-simulation-pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UAV Simulation Pro

UAV Simulation Pro is a high-performance, web-based Unmanned Aerial Vehicle (UAV) flight simulator. It combines a realistic 3D visualization engine built with Three.js and a robust physics core powered by Rust and WebAssembly (WASM).

Status Technology

🚀 Features

  • Hybrid Architecture: Physics calculations are offloaded to a high-performance Rust backend compiled to WASM, while rendering is handled by the browser's GPU via WebGL.
  • Realistic Rendering: Custom 3D drone models with rotating propellers, dynamic lighting, and shadows.
  • Physics Engine: State-aware physics simulation including gravity, thrust, inertia, and PID-based hover stabilization.
  • Modern HUD Interface: A "Glassmorphism" style Head-Up Display (HUD) showing real-time telemetry:
    • Altitude & Speed with dynamic bar charts.
    • System Status monitoring.
    • Mission Timer.
  • Hot Reloading: Seamless development experience with Vite and vite-plugin-wasm.

🛠️ Tech Stack

📦 Installation & Setup

Prerequisites

  • Node.js (v18+ recommended)
  • Rust (Latest stable toolchain) & cargo
  • wasm-pack (cargo install wasm-pack)

1. Clone the Repository

git clone <repository-url>
cd uav-simulation-pro

2. Install Dependencies

npm install

3. Build the Physics Engine (WASM)

You must compile the Rust code before running the app.

npm run build:wasm

4. Run the Simulator

Start the development server.

npm run dev

Open your browser at http://localhost:5173.

📂 Project Structure

uav-simulation-pro/
├── crate-wasm/           # Rust Source Code (Physics Engine)
│   ├── src/
│   │   ├── lib.rs        # Core Simulation Logic (UavSimulation struct)
│   └── Cargo.toml        # Rust Dependencies
├── src/                  # Frontend Source Code
│   ├── engine/           # 3D Specific Code
│   │   ├── DroneModel.ts # Three.js constructions
│   │   └── SceneSetup.ts # Camera & Lights
│   ├── main.ts           # Entry Point (Loop & WASM Binding)
│   └── style.css         # HUD Styling
├── index.html            # Main HTML Layout
├── package.json          # Node Dependencies & Scripts
└── vite.config.ts        # Vite Configuration

🎮 Controls & Physics

Currently, the simulation runs in Autonomous Hover Mode.

  • The drone attempts to maintain a target altitude of 5.0 meters.
  • The Rust physics engine applies gravity and counter-thrust forces in real-time.
  • The PID controller stabilizes the ascent/descent.

📄 License

This project is open-source and available under the simple Sandbox license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors