Skip to content

Traffic Advisory Update if not seen. Wrong "O'Clock" quadrant added. #864

Open
Jud6969 wants to merge 1 commit into
mmp:masterfrom
Jud6969:traffic-advisory-phraseology
Open

Traffic Advisory Update if not seen. Wrong "O'Clock" quadrant added. #864
Jud6969 wants to merge 1 commit into
mmp:masterfrom
Jud6969:traffic-advisory-phraseology

Conversation

@Jud6969

@Jud6969 Jud6969 commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Referenced from issue #824

Add two pilot-response variants:

  • Wrong-quadrant: when no traffic matches the reported o'clock but there's real traffic within 5 NM / 1000 ft whose actual bearing is within 2 hours of the reported position, the pilot reports it at the corrected clock position ("is that the traffic at our 4 o'clock" / "traffic at our 4 o'clock in sight"). Sets TrafficInSight.
  • Follow-up after 30–60 s of "looking" with no sighting: the pilot continously asks for an update ("where's that traffic" / "request update on that traffic" / "we still don't have the traffic"). Fires once per advisory.

Comment thread sim/control.go Outdated
Comment thread sim/control.go Outdated
Comment thread sim/control.go Outdated
Comment thread sim/control.go Outdated
Comment thread sim/control.go Outdated
Comment thread sim/control.go Outdated
@mmp

mmp commented Apr 20, 2026

Copy link
Copy Markdown
Owner

(Also, please run gofmt -w . from the top-level for consistent code formatting.)

@Jud6969

Jud6969 commented Apr 20, 2026

Copy link
Copy Markdown
Contributor Author

code should be formatted, from my end it is at least, let me know it if it is not

@Jud6969 Jud6969 marked this pull request as draft April 26, 2026 04:03
@Jud6969

Jud6969 commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

Converting this to a draft since there were a lot of changes to the traffic advisory functions.

Re-implements the original 5-commit traffic-advisory phraseology stack
on top of upstream's refactored event-queue + UnseenTrafficCall model.
Squashed (the original commits were chained edits to code that no
longer exists upstream).

What's added:

- aviation/intent.go: TrafficResponseWrongQuadrant + ActualOclock field
  on TrafficAdvisoryIntent. Render uses the assertive form
  ("traffic at our N o'clock in sight"); no question form.

- sim/commands.go handleTrafficAdvisory: single-pass findAdvisoryTraffic
  helper that classifies into exact / wrong-quadrant / none. Exact
  unchanged. Wrong-quadrant records sighting and emits the new intent.
  None schedules a "where's that traffic" follow-up via the
  UnseenTrafficCall.WhereAskFireTime field.

- sim/aircraft.go: WhereAskFireTime added to UnseenTrafficCall. No new
  queue or struct — piggy-backs on the existing per-call carrier.

- sim/sim.go updateState: per-tick check for elapsed WhereAskFireTime,
  emits PendingTransmissionTrafficWhere. Also adds the missing
  `continue` after the far-away-aircraft cull so the new check doesn't
  run on a freshly-deleted pointer.

- sim/radio.go: PendingTransmissionTrafficWhere enum value and
  GenerateContactTransmission case ("where's that traffic"...).

- sim/visual_approach_test.go: existing test assertion updated to allow
  the where-ask UnseenTrafficCall (was: nil; now: just not the prior
  DAL456 stale call).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jud6969 Jud6969 force-pushed the traffic-advisory-phraseology branch from 52bbe9c to 6a14d0b Compare April 26, 2026 04:13
@Jud6969

Jud6969 commented Apr 26, 2026

Copy link
Copy Markdown
Contributor Author

updated with the main branch. did some testing by putting two aircraft next to each other going the same altitude and direction, then had one guy behind trying to find one of the aircraft. testing worked.

@Jud6969 Jud6969 marked this pull request as ready for review April 26, 2026 13:57
@Jud6969 Jud6969 requested a review from mmp April 26, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants