Skip to content

Emergencies

radarcontrol.io simulates in-flight emergencies that require controller intervention. Emergencies add realism and challenge, testing your ability to prioritize and handle critical situations while managing regular traffic.

Severity levels

Emergencies use standard aviation distress calls:

MAYDAY

The most serious distress signal indicating grave and imminent danger. Aircraft declaring MAYDAY receive absolute priority over all other traffic. Used for:

  • Rapid decompression
  • Engine failure
  • Fire or smoke
  • Fuel emergency

PAN PAN

Urgent situation that requires assistance but poses no immediate danger to the aircraft. Used for:

  • Medical emergencies (passenger illness)
  • Non-critical equipment failures

Emergency types

TypeSeverityDescriptionAction required
DecompressionMAYDAYCabin pressure loss at high altitudeImmediate descent to 10,000ft
Engine failureMAYDAYLoss of engine powerVectors to nearest airport
FireMAYDAYSmoke or fire indication in cabinImmediate descent, vectors to nearest airport
FuelMAYDAYMinimum fuel, cannot accept delaysNo delays, priority handling
MedicalPAN PANMedical emergency on boardExpedited handling, vectors to nearest airport

Emergency indicator

When an aircraft declares an emergency:

  • A red 7700 badge appears next to its callsign in the flight strips panel (left side)
  • The squawk code 7700 is the international transponder code for emergencies
  • An alert panel appears in the top-right corner with emergency details

Handling emergencies

Step 1: Acknowledge the declaration

When a pilot declares an emergency, an alert panel appears showing:

  • Severity - MAYDAY or PAN PAN with pulsing indicator
  • Callsign - Aircraft callsign (e.g., "QFA3")
  • Nature - Type of emergency (e.g., "Rapid decompression")
  • Pilot message - The full declaration message in quotes
  • Elapsed time - Timer showing how long since declaration

Click Acknowledge emergency to confirm receipt. The controller response includes:

  • Vectors to the nearest major airport (with heading and distance)
  • Descent clearance for emergencies requiring altitude change

MINIMIZE ALERT

If you need to clear the alert from view temporarily, click the minimize button (−) in the top-right corner of the alert. A badge indicator will appear showing the number of active emergencies. Click the badge to restore the full alert.

Step 2: Monitor descent (descent emergencies only)

For emergencies requiring descent (decompression, fire):

  • The button changes to Descending... as the aircraft descends
  • The status row shows altitude information (e.g., "Descending to FL100")
  • The aircraft will descend rapidly to the safe altitude

Step 3: Hand off or auto-resolve

For descent emergencies (decompression, fire):

  • The emergency auto-resolves when the aircraft reaches the target altitude
  • The alert disappears automatically once the aircraft is at the safe altitude

For non-descent emergencies (medical, engine failure, fuel):

  • After acknowledgment, the Handoff to approach button appears
  • Click to transfer the aircraft to approach control for continued handling

Handing off is the standard procedure for emergencies that require continued handling (diversion to alternate airport, medical assistance on the ground, etc.).

Radio phraseology

Pilot declaration

The pilot declares the emergency using standard phraseology:

"MAYDAY MAYDAY MAYDAY, QANTAS 3, we have a decompression, emergency descent to one zero thousand"

"PAN PAN PAN PAN PAN PAN, SPEEDBIRD 442, we have a medical situation on board, request priority handling"

Controller acknowledgment

After clicking Acknowledge emergency, the controller responds with vectors to the nearest airport:

"QANTAS 3, roger MAYDAY, descend flight level one zero zero, vectors to Kennedy heading two seven zero, airport four five miles"

Handoff to approach

When clicking Handoff to approach:

"QANTAS 3, contact approach"

The pilot confirms:

"Contact approach, QANTAS 3"

Tips for managing emergencies

  1. Prioritize immediately - MAYDAY aircraft take priority over everything else
  2. Clear the airspace - Other aircraft should be vectored away from the emergency aircraft's descent path
  3. Acknowledge promptly - Quick acknowledgment allows the pilot to begin emergency procedures
  4. Monitor progress - Watch the aircraft during descent
  5. Hand off when appropriate - Transfer responsibility to approach control for continued handling

CRITICAL

Never ignore an emergency declaration. Failing to acknowledge promptly can lead to unsafe situations. Emergencies are designed to test your prioritization skills - handle them first.

Scripting API

Emergency data is available through the scripting API for custom scenarios.

Emergency events

javascript
// Handle new emergency declarations
onEmergencyDeclared((event) => {
  console.log(`Emergency: ${event.emergency.callsign}`);
  console.log(`Type: ${event.emergency.type}`);
  console.log(`Severity: ${event.emergency.severity}`);
  console.log(`Nature: ${event.emergency.nature}`);
  console.log(`Pilot says: ${event.pilotMessage}`);
});

// Handle emergency status updates
onEmergencyUpdate((event) => {
  console.log(`${event.callsign}: ${event.previousStatus} -> ${event.newStatus}`);
});

// Handle resolved emergencies
onEmergencyResolved((event) => {
  const seconds = Math.round(event.resolutionTimeMs / 1000);
  console.log(`${event.emergency.callsign} resolved in ${seconds}s`);
});

Emergency methods

javascript
// Trigger an emergency for a specific aircraft
const emergency = center.declareEmergency('QFA3', 'decompression');
// Types: 'decompression', 'engine_failure', 'medical', 'fuel', 'fire'

// Acknowledge an emergency
center.acknowledgeEmergency(emergency.id);

// Get all active emergencies
const emergencies = center.getActiveEmergencies();

// Get emergency for a specific aircraft
const emg = center.getEmergencyForAircraft('QFA3');

// Set random emergency frequency (0-1 chance per minute per aircraft)
center.setEmergencyFrequency(0.02);  // 2% chance per minute
center.setEmergencyFrequency(0);     // Disable random emergencies

Emergency properties

PropertyTypeDescription
idstringUnique emergency identifier
typestringEmergency type (decompression, engine_failure, medical, fuel, fire)
severitystringMAYDAY or PAN_PAN
callsignstringAircraft callsign
naturestringHuman-readable description (e.g., "Rapid decompression")
statusstringCurrent status (declared, acknowledged, descending, resolved)
initialAltitudenumberAltitude when emergency declared (feet)
requestedAction.targetAltitudenumberTarget altitude for descent (if applicable)
declaredAtnumberTimestamp when emergency was declared
acknowledgedAtnumberTimestamp when acknowledged (if applicable)
resolvedAtnumberTimestamp when resolved (if applicable)

Example: Custom emergency scenario

javascript
// Create a scripted emergency scenario
onTick((ctx) => {
  // After 5 minutes, trigger a medical emergency on a random aircraft
  if (ctx.time > 300 && !scenarioStarted) {
    const aircraft = ctx.traffic.all();
    if (aircraft.length > 0) {
      const target = aircraft[Math.floor(Math.random() * aircraft.length)];
      center.declareEmergency(target.cs, 'medical');
      scenarioStarted = true;
    }
  }
});