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 250Control 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:
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
Aircraft Spawning
Aircraft enter the simulation from three sources:
Entry Points (Overflights): Aircraft spawn at sector entry waypoints, already at cruise altitude and immediately controllable. These represent traffic transiting through your airspace.
Airports (Departures): Aircraft spawn on airport runways and take off. During climb-out (below 10,000 feet), departures are not controllable - they follow standard departure procedures automatically. Once reaching 10,000 feet, they check in on frequency and become controllable.
Entry Points (Arrivals): Aircraft destined for airports in your sector spawn at entry waypoints at cruise altitude. You must descend them, vector them to the ILS, clear them for approach, and hand them off to tower for landing. See Arrivals & ILS Approaches for details.
When a departure becomes controllable, you'll hear the pilot check in (e.g., "American one two three with you, 10,000 feet") and the onDepartureControllable event fires.
Traffic Intensity: Control how frequently aircraft spawn by hovering over the Spawn button in the toolbar. A slider appears where you can set traffic intensity from 0% (no auto-spawn) to 100% (maximum rate). At 100%, aircraft spawn approximately every 2 minutes. Lower values increase the interval between spawns, giving you more time to manage traffic. Your setting is saved automatically.
Event Handlers
Your code responds to events:
onSpawn()- Called when new aircraft enter your sector (overflights and arrivals)onDepartureControllable()- Called when a departure reaches 10,000ft and becomes controllableonTick()- Called every simulation tick (~0.5s) for continuous managementonConflict()- Called when aircraft are predicted to lose separationonApproachCleared()- Called when aircraft is cleared for ILS approachonILSEstablished()- Called when aircraft establishes on localizeronLanding()- Called when aircraft touches down
Safety and crashes
DANGER
Crashes can occur in two situations:
Midair collision: If two aircraft get too close (less than 0.5nm lateral AND less than 200ft vertical), they will collide. Both aircraft are lost, and a crash screen appears. Always maintain proper separation (5nm lateral or 1000ft vertical).
Weather crash: If you deny a deviation request and the aircraft flies into severe weather, it will be lost. Weather deviations exist for safety - approve them unless you have a very good reason not to.
Crashes are rare but catastrophic. The simulation emphasizes the critical importance of separation and proper weather avoidance.
Aircraft Control
Control aircraft using methods:
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
aircraft.clearILS("27L") // Clear ILS runway 27L
aircraft.contactTower() // Hand off to tower
aircraft.goAround() // Instruct go-aroundWaypoint Events
React to aircraft reaching waypoints:
// 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:
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 outputUse 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
- Start the simulation - Aircraft will begin spawning in your sector
- Try the default script - See how basic traffic management works
- Modify the code - Experiment with different control strategies
- 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+Spacein 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!