Repository navigation
Traffic
English | Deutsch
get_traffic lists aircraft and helicopters nearby – AI traffic, live traffic and multiplayer, as far as enabled in the sim. Your own aircraft is excluded. The voice loop answers "Traffic check" the same way.
| Parameter | Default | Meaning |
|---|---|---|
radiusNm |
40 | search radius, max. 108 NM (SimConnect's limit) |
limit |
10 | at most this many targets, closest first (1–50) |
airborneOnly |
false | leave out aircraft on the ground |
ident/callsign, atcId, type, distanceNm, clock, relativeBearingDeg, bearingTrueDeg, altitudeFt, altitudeDiffFt (+ = above), verticalTrend, groundSpeedKt with groundSpeedSource, headingTrueDeg/headingMagDeg, onGround. The closest target has closest: true and a callout:
Traffic, 2 o'clock, 5 miles, 1000 feet above, descending
| Value | Notes |
|---|---|
| Callsign | airline + flight number if both are set (Lufthansa 123), otherwise the registration. Internal live-traffic numbers like 1432126 are not used as callsigns |
| Type | localization keys (ATCCOM.AC MODEL C441.0.tts) are cleaned up to C441
|
| Clock | relative to your heading, 30° each |
| Distance | horizontal (great circle) |
| Altitude difference | like TCAS: against your pressure altitude (1013.25 hPa), because live traffic reports flight levels. "AltitudeReference": "True" switches to true altitude |
| Ground speed | computed from position changes (5–120 s apart), because the SimVar is useless for live traffic; until then the SimVar with groundSpeedSource: "simvar"
|
| Trend | from vertical speed (±500 ft/min); if a target reports 0, derived from altitude changes |
No other aircraft → status: "no_traffic" (AI traffic or multiplayer usually off in the sim). MSFS not answering → no_response.
While the aircraft is flying, Duopilo scans within 6 NM every 3 s. An airborne target closer than 3 NM and within ±1000 ft triggers a caution with callout; then 60 s quiet. It rests below 500 ft AGL, on the ground and while paused.
Off: "DisabledRules": [ "TRAFFIC_PROXIMITY" ].
This is not TCAS: no resolution advisory, no prediction of the closest point of approach – just distance and altitude right now. Real TCAS RAs from the aircraft's FMA are called out separately (
TCAS_RA).
Traffic uses its own SimConnect connection directly via the native SimConnect.dll and only reads what each message actually contains (dwSize). This replaced the managed library for traffic after crashes in test flights. The background scan only queries numbers; callsign and type are known if get_traffic saw the target in the last 15 minutes.
Every response is logged to %LOCALAPPDATA%\Duopilo\logs\traffic-messages.csv (~250 KB per flight hour, rotated at 10 MB); get_traffic → messageCheck summarizes anomalies. Off: "MessageLog": false.
First step towards Duopilo's own traffic: traffic_test_start spawns one AI aircraft (DUO01) that flies a final approach by waypoints, lands and stops on the runway. Off by default – switch it on with "TrafficTest": { "Enabled": true } in appsettings.Local.json.
- A1: spawn 5 NM out with the gear down. A2: spawn 15 NM out, gear down at 10 NM.
-
traffic_test_statusshows the evaluation (touchdown, floating, speed, stop point), samples go to%LOCALAPPDATA%\Duopilo\traffic-tests\. -
traffic_test_stopremoves the aircraft (also after 15 minutes and when Duopilo exits).
Background and plan: research on own traffic.
duopilo.app · Repository · Report an issue / Fehler melden · This wiki is generated from wiki/ in the repository – edit it there via pull request. · Dieses Wiki entsteht aus wiki/ im Repository – Änderungen bitte dort per Pull Request.
English
Getting started
In the cockpit
- Pilot Monitoring
- Speech Output
- Voice Loop
- First Officer & Small Talk
- Input Module
- ATC
- Traffic
- SimBrief & Flight Plan
Reference
Help
Project
Deutsch
Einstieg
Im Cockpit
- Pilot Monitoring
- Sprachausgabe
- Sprachschleife
- First Officer & Smalltalk
- Eingabe-Modul
- ATC
- Verkehr
- SimBrief & Flugplan
Referenz
Hilfe
Projekt