Skip to content

About

Streaming satellite imagery for X-Plane 12 flight simulator via FUSE virtual filesystem, built using Rust

Resources

Code of conduct

Contributing

Security policy

Stars

22 stars

Watchers

2 watching

Forks

Repository files navigation

X-Plane Earth Layer

High-quality satellite imagery for X-Plane, streamed on demand.

X-Plane Earth Layer flying over northern Spain

What It Does

X-Plane Earth Layer (XEarthLayer or XEL) delivers photo scenery to X-Plane without massive downloads. Instead of pre-downloading thousands of gigabytes of textures, XEarthLayer:

  1. Installs smaller regional packages (tens of gigabytes) containing terrain detail
  2. Streams textures on-demand as you fly, downloading satellite imagery from a variety of providers

The result: complete orthophoto scenery with less overall disk usage implemented in a fast, modern, memory safe language.

How It Works

Regional Package (base data)      XEarthLayer Service (running)
┌────────────────────────┐        ┌────────────────────────┐
│ Terrain definitions    │        │ Satellite Providers    │
│ (DSF, TER files)       │───────→│ (Bing, Google, Apple,  │
│ References textures    │        │  ArcGIS, MapBox, USGS) │
│ for download           │        │                        │
└────────────────────────┘        │ Generates DDS textures │
                                  │ on-demand              │
                                  └────────────────────────┘
                                             │
                                             ▼
                                  ┌────────────────────────┐
                                  │ X-Plane sees complete  │
                                  │ scenery with textures  │
                                  └────────────────────────┘

See How It Works for detailed architecture.

Features

  • Small regional packages (gigabytes, not terabytes)
  • On-demand texture streaming from multiple providers:
    • Bing Maps - Free, global coverage (recommended)
    • Google Maps - Via GO2 (free) or official API (paid)
    • Apple Maps - High quality, auto-acquires tokens
    • ArcGIS - Free, global coverage
    • MapBox - Requires access token
    • USGS - Free, US coverage only
  • Adaptive Prefetch System - Self-calibrating tile prediction
    • Flight phase detection: Ground (ring pattern) vs Cruise (track-based bands)
    • Performance calibration during X-Plane's initial scenery load
    • Automatic mode selection: Aggressive, Opportunistic, or Disabled
  • Two-tier caching for instant repeat visits
  • High-quality BC1/BC3 DDS textures with mipmaps
  • Multiple compression backends: ISPC SIMD (default), pure-Rust software, or GPU-accelerated via wgpu compute shaders
  • Real-time dashboard showing cache, download, and prefetch status
  • Works with Ortho4XP-generated scenery
  • Linux support

Quick Start

Install a prebuilt package (recommended)

Download the package for your distribution from the latest release: a .deb for Debian and Ubuntu, an .rpm for Fedora and RHEL, or the x86_64-linux.tar.gz tarball for everything else. Arch users can build from the AUR.

Prebuilt binaries require glibc 2.34 or newer, which covers Ubuntu 22.04 LTS, Debian 12 and RHEL 9 onwards. On an older distribution, build from source.

Or build from source

Building needs Rust 1.97.1 or newer and the FUSE 3 development headers. Install Rust through rustup, not your distribution's package manager: several dependencies require a recent compiler, and most distributions ship one that is too old. rustup also reads this repository's rust-toolchain.toml and selects the correct version automatically.

# Rust toolchain
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# FUSE 3 headers (Debian/Ubuntu; use fuse3-devel on Fedora)
sudo apt install libfuse3-dev

# Build and install to ~/.local/bin (no sudo required)
git clone https://github.com/samsoir/xearthlayer.git
cd xearthlayer
make install

Then

# Run the setup wizard (first-time configuration)
xearthlayer setup

# Install a regional package
xearthlayer packages install eu

# Start XEarthLayer
xearthlayer  # Defaults to 'run' command

# Fly!

See Getting Started for the complete guide.

Real-Time Dashboard

XEarthLayer provides a real-time terminal dashboard showing cache status, download activity, and prefetch progress:

XEarthLayer CLI Dashboard

XEarthLayer Regional Scenery Package Project

XEarthLayer requires regional scenery packages to be installed in order for it to work. XEarthLayer is creating a regional package library for general public use. It is possible for anyone to create and publish their own package server.

XEarthLayer Scenery Packages are hosted on Github.

Adaptive Prefetch System

XEarthLayer reduces scenery loading stutters by prefetching tiles ahead of your aircraft. The system automatically calibrates itself based on your network and system performance.

How It Works

  1. Performance Calibration: During X-Plane's initial scenery load (~12° × 12° area), XEarthLayer measures tile generation throughput to determine optimal prefetch mode.

  2. Flight Phase Detection: The system automatically switches between strategies:

    • Ground Strategy: Ring-based prefetch around your position (GS < 40kt)
    • Cruise Strategy: Track-based band prefetch ahead of your flight path (GS > 40kt)

Prefetch Modes

Mode Trigger When Used
Aggressive Position-based (0.3° into DSF tile) Throughput > 30 tiles/sec
Opportunistic Executor load below threshold Throughput 10-30 tiles/sec
Disabled Never Throughput < 10 tiles/sec

Telemetry

XEarthLayer connects to X-Plane automatically via the Web API -- no configuration required. Position, heading, and speed are read directly from the simulator.

See Configuration and Adaptive Prefetch Design for tuning options.

Documentation

User Guides

Guide Description
How It Works Architecture and system overview
Getting Started First-time setup and usage
Configuration All configuration options
Package Management Installing, updating, removing packages
Running the Service Streaming service options
Content Publishing Create packages from Ortho4XP

Developer Documentation

See Developer Documentation for architecture, design principles, and implementation details.

CLI Reference

# Setup & Configuration
xearthlayer setup                     # Interactive setup wizard (recommended for first-time users)
xearthlayer init                      # Create config file with defaults
xearthlayer config list               # View all settings
xearthlayer config set <key> <value>  # Change a setting

# Package Management
xearthlayer packages check            # Check available packages
xearthlayer packages install <region> # Install a package
xearthlayer packages list             # List installed packages
xearthlayer packages update [region]  # Update packages
xearthlayer packages remove <region>  # Remove a package

# Running
xearthlayer                           # Start streaming (defaults to 'run')
xearthlayer run                       # Mount all packages with real-time dashboard
xearthlayer run --airport KJFK        # Pre-warm cache around an airport

# Advanced: Single Package Mode
xearthlayer start --source <path>     # Start streaming for a single scenery pack

# Cache Management
xearthlayer cache stats               # View cache usage
xearthlayer cache clear               # Clear cache

# Content Publishing
xearthlayer publish init              # Initialize repository
xearthlayer publish add --source <path> --region <code>  # Create package
xearthlayer publish build --region <code>   # Build archives
xearthlayer publish release --region <code> # Release to library

Run xearthlayer --help for all options.

Requirements

  • X-Plane 12
  • Linux with FUSE support
  • Modern GPU with 8GB VRAM or higher, 16GB+ recommended (for X-Plane rendering)
  • Fast Internet connection for streaming imagery, recommended 800Mbps downstream or better

GPU Encoding: XEarthLayer includes built-in GPU-accelerated DDS encoding via wgpu compute shaders. This works with any wgpu-compatible GPU and is separate from the X-Plane GPU requirement above. Select it at runtime via texture.compressor = gpu in your config.

XEarthLayer is not tested with X-Plane 11, but should work in principle. The scenery packages that are provided by this project are designed for X-Plane 12 only. XEarthLayer using regional scenery packages published for X-Plane 11 should work without issue, your mileage may vary.

Contributing

# Install Rust via rustup.rs
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Clone and build
git clone https://github.com/samsoir/xearthlayer.git
cd xearthlayer
make init
make verify

See Developer Documentation for architecture and guidelines.

Credits

Architecturally influenced by AutoOrtho by kubilus1. XEarthLayer is an independent Rust implementation focused on performance and memory safety.

XEarthLayer Regional Scenery Packages created using Shred86 fork of Ortho4XP

Developed with assistance from Claude by Anthropic.

Made with ❤️ in California.

License

Licensed under the MIT License. See LICENSE for details.

About

Streaming satellite imagery for X-Plane 12 flight simulator via FUSE virtual filesystem, built using Rust

Resources

Code of conduct

Contributing

Security policy

Stars

22 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages