Skip to content

leftos/towercab-3d

Repository files navigation

TowerCab 3D

A 3D tower cab view application for VATSIM air traffic controllers. View real-time aircraft positions on a 3D globe with satellite imagery and terrain.

Discord

TowerCab 3D

Table of Contents

Features

Remote Browser Access

  • Access TowerCab from any device on your local network (iPad, tablets, other PCs)
  • Desktop app runs an HTTP server on port 8765 when launched
  • Unified data streaming: all aircraft data (VATSIM, vNAS, RealTraffic) streamed via WebSocket
  • Automatic vNAS 1Hz updates when host has active CRC session (no configuration needed)
  • All mods, models, and settings served from host PC
  • Touch controls optimized for iPad Safari and mobile browsers:
    • Single-finger drag to rotate camera or pan map
    • Two-finger pinch to zoom
    • Two-finger rotate to adjust heading
    • Virtual joystick for camera movement
  • Responsive mobile-friendly UI adapts to screen size with flyout menus
  • Remote client presence indicator shows device count on desktop
  • Connection status indicator shows Live/Stale/Disconnected state on remote clients
  • Camera bookmarks and datablock positions shared across all connected devices
  • Device optimization presets automatically offered on first remote connection

Live Traffic Integration

  • VATSIM Network: Real-time virtual ATC traffic (polled every 1 second, VATSIM updates ~15 seconds)
  • vNAS Integration: 1Hz real-time updates when using CRC (reduces display delay from 17s to 1.5s)
  • RealTraffic: Optional real-world ADS-B traffic with ~2-3s updates (requires license key)
  • Smooth 60 Hz interpolation for fluid aircraft movement between updates
  • Global aircraft search (Ctrl+K) to find and follow any aircraft (sorted by distance when airport selected)
  • Connection status indicator with pilot/aircraft count
  • Compass direction indicator showing camera heading

3D Visualization

  • High-fidelity 3D globe with Cesium Ion satellite imagery
  • Configurable terrain quality (5 levels from Low to Ultra)
  • Terrain flattening for runways, taxiways, and aprons (15,000+ airports)
  • Optional 3D OpenStreetMap buildings with configurable quality
  • Dynamic time-of-day lighting (real-time or fixed hour)
  • Aircraft rendered as 3D models with realistic type-based sizing (39 aircraft types)
  • Aircraft physics emulation: pitch during climbs/descents, banking in turns, landing flare
  • METAR-based weather effects: fog domes and cloud layers at real ceiling altitudes

Multi-Viewport System

  • Create multiple inset viewports for simultaneous views
  • Each viewport has independent camera controls and can follow different aircraft
  • Drag and resize inset viewports, positions saved per airport
  • Click to activate a viewport for keyboard/mouse control

Replay System

  • Continuous recording of all VATSIM traffic (snapshots every 15 seconds)
  • Scrub back up to 25 minutes to review past events
  • Playback at 0.5x, 1x, 2x, or 4x speed
  • Export/import replays to share or archive sessions
  • Switch airports during replay to view traffic at any location

Camera System

  • 3D Tower View: Look around from tower perspective with smooth controls
  • Top-Down View: Bird's-eye view with pan and zoom (press T to toggle)
  • Aircraft Following: Two modes - Tower (camera stays at tower) or Orbit (camera circles aircraft)
  • WASD Movement: Move camera position relative to tower
  • Bookmark System: Save up to 100 camera positions per airport with custom names
  • Quick Bookmarks: Ctrl+0-9 for instant recall of first 10 bookmarks
  • Bookmark Manager: Ctrl+B opens full bookmark management modal

Aircraft Panel

  • Nearby aircraft list with real-time updates
  • Filter by callsign, aircraft type, or route
  • Sort by distance (from tower or camera), callsign, altitude, speed, or smart sort
  • Smart sort categorizes by flight phase (Short Final, Rolling, Taxi, etc.) with runway detection
  • Datablock repositioning with numpad-style directions (1-9)
  • Auto-rearrange to prevent label overlaps (optional)
  • Adjustable leader line length (1-5)
  • One-click following with mode selection
  • Click-to-look: click any aircraft to pan camera to center on it

Airport Selection

  • Tabbed selector: Favorites, Recent, Popular, and vNAS-enabled airports
  • Search 28,000+ airports by ICAO, IATA, name, or city
  • Mark airports as favorites for quick access
  • Recent airports history (last 10 visited)
  • Popular airports ranked by current VATSIM traffic
  • vNAS tab shows airports with 1Hz update availability
  • Smooth camera animation when changing airports

Measuring Tool

  • Click-to-measure distances on terrain
  • Live preview as you move the cursor
  • Multiple measurements can be active simultaneously
  • Right-click to remove individual measurements

VR Support (Experimental)

  • WebXR integration for VR headsets (Quest Link, SteamVR, etc.)
  • Stereo rendering with configurable IPD
  • Immersive tower cab experience

Modding Support

  • Custom aircraft 3D models (glTF/GLB format)
  • Custom tower models for specific airports
  • FSLTL and AIG model support with airline-specific liveries (on-demand conversion)
  • Custom VMR rules for advanced model matching
  • See MODDING.md for details

Requirements

  • Desktop App: Windows 10/11 (64-bit), macOS 10.13+, or Linux
  • Remote Access: Any device with a modern web browser (Chrome, Safari, Edge, Firefox)
  • Cesium Ion account (free tier) for terrain and imagery
  • Node.js 18+ and Rust toolchain (only for development)

Quick Start

Option A: Download the Installer (Recommended)

  1. Download the latest Windows installer from GitHub Releases
  2. Run the installer and follow the prompts
  3. Launch TowerCab 3D from the Start Menu or desktop shortcut
  4. The app will automatically check for updates on startup and notify you when new versions are available
  5. Continue to Get a Cesium Ion Token below

Option B: Run from Source (Development)

1. Install Dependencies

npm install

2. Run in Development Mode

npm run dev  # Starts desktop app with HTTP server on port 8765

The desktop app will start an HTTP server accessible at http://[your-pc-ip]:8765 from other devices on your network.

2. Get a Cesium Ion Token

  1. Create a free account at cesium.com/ion
  2. Go to Access Tokens and create a new token with default permissions
  3. Copy the token

3. Configure the Application

  1. Click the Settings button (gear icon) in the bottom-right corner
  2. Paste your Cesium Ion token in the token field
  3. Adjust terrain quality and other settings as desired
  4. Close the settings modal

4. Select an Airport

  1. Click the airport button in the top-left (shows "Select Airport" initially)
  2. Search for an airport by ICAO code (e.g., "KJFK"), IATA code (e.g., "JFK"), name, or city
  3. Click an airport to fly there

5. Access from Remote Devices (Optional)

  1. With the desktop app running, find your PC's local IP address:
    • Windows: Run ipconfig and look for "IPv4 Address"
    • macOS/Linux: Run ifconfig or ip addr and look for your network interface
  2. On your iPad or other device, open a web browser and navigate to http://[your-pc-ip]:8765
  3. The app will load with the same settings, bookmarks, and mods as the desktop app
  4. On first connection from a touch device, you'll be prompted to apply optimized graphics settings

Controls

Keyboard Controls

Key Action
W/A/S/D Move camera position (forward/left/back/right)
Q/E Move camera down/up
Shift Sprint (3x movement speed with WASD)
Arrow Keys Rotate camera (heading/pitch)
+/- Zoom in/out
T Toggle 3D / top-down view
R or Home Reset camera view
Shift+R Full reset (position and orientation)
O Toggle follow mode (Tower/Orbit) when following
Escape Stop following / close modals
Ctrl+K Open global aircraft search
Ctrl+B Open bookmark manager
Ctrl+0-9 Load bookmarks 0-9 instantly
Ctrl+M Toggle METAR overlay display
M Toggle measuring tool
F1 Toggle performance HUD
F3 Open model matching debug modal
F4 Open aircraft timeline debug modal
Space Play/Pause replay (in Replay mode)
Left/Right Arrow Step backward/forward 15s (in Replay mode)

Mouse Controls

Action Effect
Right-click + Drag Look around (rotate camera)
Left-click + Drag Pan camera (top-down mode only)
Scroll Wheel Zoom in/out
Click Aircraft Label Follow that aircraft

Touch Controls (iPad/Mobile)

Action Effect
Single-finger Drag Rotate camera (3D) or pan map (top-down)
Two-finger Pinch Zoom in/out
Two-finger Rotate Adjust heading
Virtual Joystick Move camera position (WASD equivalent)
Tap Aircraft Label Follow that aircraft

Bookmark System

Save and restore camera positions quickly:

  • Type .XX. to save to slot XX (e.g., .00., .15.)
  • Type .XX.NAME. to save with a custom name (e.g., .00.RWY 27., .15.TOWER.)
  • Type .XX and press Enter to load from a slot
  • Press Ctrl+0-9 for instant recall of bookmarks 0-9
  • Press Ctrl+B to open the Bookmark Manager with full keyboard navigation
  • Bookmarks are saved per-airport

Building for Production

Development Build (Frontend Only)

npm run vite:build

Full Application Build (Windows Installer)

npm run build

The installer will be created in the src-tauri/target/release/bundle/ folder. This is the same installer distributed via GitHub Releases.

Project Structure

towercab-3d/
├── src/
│   └── renderer/       # React frontend
│       ├── components/ # React UI components
│       ├── hooks/      # Custom React hooks
│       ├── services/   # API services (VATSIM, airports)
│       ├── stores/     # Zustand state stores
│       ├── types/      # TypeScript type definitions
│       └── utils/      # Utility functions
├── src-tauri/          # Tauri Rust backend
│   ├── src/            # Rust source code
│   ├── icons/          # Application icons
│   └── tauri.conf.json # Tauri configuration
├── resources/          # Static assets (icons, etc.)
└── mods/               # Custom models directory
    ├── aircraft/       # Aircraft model mods
    └── towers/         # Tower model mods

Technology Stack

Technology Purpose
Tauri 2 Desktop application framework (Rust backend, WebView2 frontend)
React 19 UI framework
TypeScript 5 Type-safe development
CesiumJS 1.136 3D globe rendering
Babylon.js 8 Screen-space labels, leader lines, weather effects, VR rendering
Zustand 5 State management
Vite 7 Build tool

Data Sources

  • VATSIM: Virtual ATC traffic from data.vatsim.net
  • RealTraffic: Optional real-world ADS-B traffic (requires license key subscription)
  • Airports: Database from github.com/mwgg/Airports
  • Terrain/Imagery: Cesium Ion World Terrain and Bing Maps Aerial
  • Aircraft Dimensions: Wingspan and length data from FAA Aircraft Characteristics Database
  • Aircraft 3D Models: 39 aircraft models from Flightradar24/fr24-3d-models (GPL-2.0, originally from FlightGear) - includes A320 family, B737/747/757/767/777/787, CRJ, E-Jets, Q400, and more

Refreshing Aircraft Dimensions Data

The aircraft dimensions data (used for realistic model sizing) is bundled with the app. To update it with the latest FAA data:

# Requires Python 3 with pandas and openpyxl
pip install pandas openpyxl
python scripts/shipping/data-generation/convert-aircraft-data.py

This downloads the latest FAA Excel file and converts it to src/renderer/public/aircraft-dimensions.json.

Settings Reference

Settings are organized into six tabs: Configuration, Aircraft & Labels, Graphics & Weather, Controls & Camera, Performance, and Advanced.

Configuration Tab

Setting Description Range/Options
Cesium Ion Token API key for terrain/imagery (shared across devices) Required
Data Source Choose VATSIM or RealTraffic VATSIM/RealTraffic
RealTraffic License Key Required for RealTraffic data Optional
HTTP Server Enable remote browser access on port 8765 On/Off
MSFS Community Path Path to MSFS Community folder for model conversion Directory path
Enable FSLTL Models Use converted FSLTL aircraft models On/Off
Enable AIG Models Use converted AIG aircraft models On/Off
Model Priority Which model source to prefer FSLTL First/AIG First
Texture Scale Resolution for converted model textures Full/2K/1K/512
Cache Directory Where to store converted models Directory path
Cache Size Limit Max disk space for model cache 500 MB - 20 GB

Aircraft & Labels Tab

Setting Description Options
Visibility Range How far to show aircraft labels 5-100 nm
Show Ground Traffic Display aircraft on ground On/Off
Show Airborne Traffic Display flying aircraft On/Off
Datablock Display Label detail level Full/Airline Codes Only/None
Datablock Font Size Size of label text 8-20 px
Leader Line Length Distance from aircraft to label 0.5-5.0
Default Datablock Direction Default label position (numpad-style) 1-9
Auto-Rearrange Datablocks Prevent label overlaps On/Off
Ground Traffic Labels Filter labels for ground aircraft All/Moving/Active Only/None
Built-in Model Tint Color tint for generic models White/Light Blue/Tan/Yellow/Orange/Gray
Aircraft Silhouettes Black outlines on built-in models (high GPU cost) On/Off
Orientation Emulation Aircraft pitch/roll physics simulation On/Off
Emulation Intensity Strength of pitch/roll effects 25%-150%
Show Aircraft Panel Toggle nearby aircraft list On/Off

Graphics & Weather Tab

Setting Description Options
Max Framerate Limit rendering framerate 30/60/120/144/Unlimited
MSAA Samples Anti-aliasing quality 1x/2x/4x/8x
Terrain Quality Level of terrain detail Low to Ultra (5 levels)
Terrain Flattening Flatten runways/taxiways for smooth ground movement On/Off
Terrain Blend Distance Transition zone between flat and natural terrain 25-100 m
Show 3D Buildings OpenStreetMap 3D buildings On/Off
Building Quality LOD for 3D buildings Low/Medium/High
Time of Day Real-time or fixed local hour Real/0-24h
Enable Shadows Render terrain and aircraft shadows On/Off
Shadow Mode Which objects cast shadows All/Aircraft Only
Enable Fog METAR-based fog effects On/Off
Fog Intensity Fog opacity multiplier 0.5x-2x
Visibility Scale Fog distance multiplier 0.5x-2x
Enable Clouds Cloud layers at METAR ceilings On/Off
Enable Precipitation Rain/snow particle effects On/Off
Enable Lightning Lightning flashes during storms On/Off

Controls & Camera Tab

Setting Description Range
Default FOV Starting field of view 10-120°
Camera Speed WASD movement speed 1-10
Mouse Sensitivity Right-click drag rotation speed 0.1x-2x
Joystick Sensitivity Virtual joystick movement speed (touch devices) 1-10
Auto-Switch Airport Automatically switch to nearest airport when moving On/Off

Performance Tab

Setting Description Range
In-Memory Tile Cache Cached terrain tiles in memory 50-5000 tiles
Disk Cache Size Persistent tile cache on disk 0.1-10 GB
Aircraft Data Radius Data fetch radius (VATSIM/RealTraffic) 10-500 nm
Max Aircraft Count Limit displayed aircraft 10-1000
Max Replay Duration How far back replay can go 1-60 min
Max Parked Aircraft Max stationary aircraft (RealTraffic only) 0-200

Advanced Tab

Setting Description Options
Theme Light or dark interface Light/Dark
Interpolation Debug Logs Log aircraft position calculations On/Off
Debug Coordinate Overlay Show camera coordinates on screen On/Off

Performance Tips

  • Lower terrain quality for smoother performance on older hardware
  • Disable 3D buildings if experiencing frame drops
  • Reduce label visibility distance to decrease rendered aircraft
  • The application uses Service Worker caching for tile persistence

Troubleshooting

Globe Not Loading

  • Verify your Cesium Ion token is correct and has default permissions
  • Check your internet connection

No Aircraft Showing

  • Ensure you've selected an airport
  • Check the connection status in the top bar
  • Verify VATSIM network is online

Low Frame Rate

  • Reduce terrain quality in settings
  • Disable 3D buildings
  • Close other GPU-intensive applications
  • On touch devices: apply the suggested device optimization preset when prompted

Remote Access Not Working

  • Ensure the desktop app is running on your PC
  • Verify both devices are on the same local network
  • Check firewall settings aren't blocking port 8765
  • Try accessing using your PC's IP address instead of hostname
  • On Windows, run ipconfig to find your IPv4 address

CI/CD

This project uses GitHub Actions for continuous integration and releases:

  • Build workflow: Runs on every push and PR to main - builds the app and runs ESLint
  • Release workflow: Triggered by version tags (e.g., v0.0.6) - creates GitHub releases with installers

To create a new release:

git tag v0.0.6
git push origin v0.0.6

License

GPL-2.0 License - See LICENSE file for details.

Acknowledgments

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •