Skip to content

What is radarcontrol.io?

radarcontrol.io is an interactive air traffic control simulation that runs in your browser. Manage aircraft like a real controller - issue clearances, maintain separation, and coordinate traffic through busy airspace sectors.

You can control aircraft in two ways:

  • Manually - click aircraft, type commands, issue clearances in real-time
  • With code - write Javascript to automate traffic management

This is an early preview and is under heavy development by balintb. Expect logic, API, styling issues.

Overview

The simulation provides a realistic ATC environment with two control modes:

Interactive Mode: Take direct control like a real ATC controller - click aircraft, type commands like AAL123 cfl200 s400 dr KMART, or use control buttons for quick actions.

Code Mode: Write Javascript that automates traffic management - perfect for handling complex scenarios with multiple aircraft.

Both modes provide:

  • Real aircraft types with accurate performance characteristics
  • Waypoint-based routing through defined airspace sectors
  • Separation requirements (5nm lateral or 1000ft vertical)
  • Real-time radar display with conflict prediction

How It Works

Interactive Mode

Take direct control of aircraft - click them on the radar, type commands, or use the control panel:

Text Commands:

AAL123 cfl200 s400 dr KMART    # Climb FL200, speed 400, direct KMART
DAL456 c10000ft s250           # Descend 10,000ft, speed 250

Control Panel:

  • Click an aircraft to select it
  • Use the altitude, speed, and routing buttons for quick commands
  • Type commands with autocomplete for waypoints and callsigns

Perfect for hands-on control and learning real ATC procedures.

Code Mode

Use the built-in editor (same as VS Code) to write your traffic management logic:

javascript
onSpawn((aircraft) => {
  // Initial clearances for new aircraft
  aircraft
    .climb(fl(aircraft.plan.cruiseFL))
    .speed(420);

  // Set up handover at exit
  aircraft.over(aircraft.plan.exitPoint, (ac) => {
    ac.handover();
  });
});

onTick(({ traffic }) => {
  // Manage spacing between aircraft
  const flights = traffic.all();

  for (let i = 0; i < flights.length - 1; i++) {
    const lead = flights[i];
    const trail = flights[i + 1];

    const dist = distance(trail.pos, lead.pos);

    if (dist < 8) {
      trail.speed(Math.max(lead.targetIASKts - 30, 320));
    }
  }
});

Click "Load Script" or press Ctrl+Enter to run your code. Aircraft appear and follow your coded instructions automatically.

Core Concepts

Event Handlers

Your code responds to events:

  • onSpawn() - Called when new aircraft enter your sector
  • onTick() - Called every simulation tick (~0.5s) for continuous management
  • onConflict() - Called when aircraft are predicted to lose separation

Aircraft Control

Control aircraft using methods:

javascript
aircraft.climb(fl(350))        // Climb to FL350
aircraft.descend(fl(240))      // Descend to FL240
aircraft.speed(420)            // Set speed to 420 knots
aircraft.direct("KMART")       // Direct to waypoint
aircraft.offset(2)             // Offset 2nm right
aircraft.handover()            // Clear for handover

Waypoint Events

React to aircraft reaching waypoints:

javascript
// Execute action when aircraft reaches waypoint
aircraft.over("KMART", (ac) => {
  ac.climb(fl(380));
});

// Execute action before reaching waypoint
aircraft.before("MERGE", 30, (ac) => {
  ac.speed(320);
});

// Ensure constraint is met at waypoint
aircraft.reach("EXIT").altitude(fl(240));

Helper Functions

Utility functions for calculations:

javascript
distance(ac1.pos, ac2.pos)     // Distance in nm
headingTo(from, to)            // Heading in degrees
fl(350)                        // Convert FL to feet (35000)
log("message")                 // Activity panel output

Use Cases

Basic Traffic Management

Maintain separation between aircraft using speed control and altitude assignments.

Conflict Resolution

Detect and resolve potential conflicts before they become separation violations.

Sequencing & Metering

Sequence aircraft at merge points with precise timing and spacing.

Custom Procedures

Implement custom arrival/departure procedures, holding patterns, or flow control.

Getting Started

  1. Start the simulation - Aircraft will begin spawning in your sector
  2. Try the default script - See how basic traffic management works
  3. Modify the code - Experiment with different control strategies
  4. Check the API reference - Learn about all available methods and properties

Tips

  • Use log() to debug and understand what your code is doing
  • Start simple, add complexity gradually
  • Radar display shows predcted tracks (dotted lines) to help anticipate conflicts
  • Press Ctrl+Space in the editor for autocomplete suggestions

What's Next?

  • Read the API Reference for complete documentation
  • Experiment with different traffic patterns
  • Try implementing advanced separation techniques
  • Share your scripts and strategies

Ready to start? Head over to radarcontrol.io and begin managing air traffic!