Data Source
Helicopter data comes from the ADS-B Exchange API (adsb.lol), which aggregates real-time transponder data from ground-based receivers.API Endpoint
Query Parameters
The 25-nautical-mile radius covers all five boroughs plus surrounding airspace, capturing helicopters at JFK, LaGuardia, Newark, and Manhattan heliports.
Helicopter Type Detection
The system filters for known helicopter ICAO type codes:- B prefix: Bell (206, 407, 412, 429, etc.)
- EC/AS prefix: Airbus/Eurocopter (H125, H135, H145)
- S prefix: Sikorsky (S-76, S-92, UH-60 Black Hawk)
- R prefix: Robinson (R22, R44, R66)
- AW prefix: AgustaWestland (AW139, AW189)
- MD prefix: MD Helicopters (MD500, MD600)
Filtering Logic
Altitude Sorting
Helicopters are sorted by altitude to prioritize low-flying aircraft:State Interface
Smooth Interpolation System
Helicopters move smoothly between position updates using linear interpolation over a 12-second window.Position Tracking
Update Logic
Calculate Current Position
Interpolate between previous position and new target based on elapsed time
RAF Animation Loop
The RAF loop only starts when helicopters are present and stops when the viewer is destroyed. This prevents wasted CPU cycles when no aircraft are visible.
Directional Rotation
Helicopter emojis are flipped horizontally based on heading to indicate direction of travel:Rotation Logic
- Track 0°-90°: Heading north/northeast → face right (default)
- Track 90°-270°: Heading south/southwest → face left (flipped)
- Track 270°-360°: Heading northwest → face right
Why scaleX(-1) instead of CSS rotate?
Why scaleX(-1) instead of CSS rotate?
The helicopter emoji (🚁) naturally faces right. Using
scaleX(-1) creates a horizontal mirror when the aircraft is heading west/south, providing a clearer directional indicator than rotation.CSS rotate() would require calculating exact bearing angles and dealing with upside-down text when heading south.