Skip to content

feat(brief): support route input — Skywatch.brief(from:, to:) (#5)#21

Merged
jayrav13 merged 1 commit into
mainfrom
feat/brief-route-input
May 2, 2026
Merged

feat(brief): support route input — Skywatch.brief(from:, to:) (#5)#21
jayrav13 merged 1 commit into
mainfrom
feat/brief-route-input

Conversation

@jayrav13

@jayrav13 jayrav13 commented May 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds from: + to: kwargs to Skywatch.brief and Composer#compose for airport-to-airport route briefs
  • Introduces Skywatch::Brief::Analysis::RouteCorridor for pure-math great-circle waypoint sampling, bearing, and distance (no RGeo buffer needed)
  • Route briefs produce an origin-anchored Brief with destination: field (airport, coordinates, distance_nm, bearing_deg) and enroute_forecast: slot populated with corridor-intersecting adverse conditions (SIGMETs/AIRMETs/PIREPs/storms/smoke/alerts)
  • destination_forecast TAF uses the to airport for route briefs (respects departing_at:)
  • CLI gains --to AIRPORT option: skywatch brief KCDW --to KACY [--departing-at TIME]
  • All existing airport / coord / ETD flows are unchanged (backward-compatible)

New files

  • lib/skywatch/brief/analysis/route_corridor.rbRouteCorridor.waypoints, RouteCorridor.bearing_deg, RouteCorridor.distance_nm
  • spec/brief/analysis/route_corridor_spec.rb — 14 specs covering waypoint count/spacing, endpoints, bearings, distance

Test plan

  • bundle exec rspec — 519 examples, 0 failures (was 477 before this sprint's PRs)
  • bundle exec rubocop — no offenses
  • RouteCorridor.waypoints returns correct count, respects spacing, includes endpoints
  • RouteCorridor.bearing_deg correct for due-east, due-west, due-north, due-south
  • Composer#compose(from:, to:) raises on: missing one of from/to, mixing with at:
  • Route brief anchored at from airport; destination field has correct shape
  • enroute_forecast has available: true, corridor metadata, items/partial_failures
  • Corridor SIGMET that covers all waypoints appears exactly once (deduplication)
  • Per-source partial failures recorded in enroute_forecast (sigmet, airmet tested)
  • destination_forecast TAF is for the to airport
  • departing_at passes through on route briefs
  • Brief model: enroute_forecast instance var overrides ENROUTE_UNAVAILABLE constant
  • Brief model: destination field in to_h when set; omitted when nil
  • CLI --to passes from:/to: to Skywatch.brief; combines with --departing-at

Closes #5

🤖 Generated with Claude Code

Add from:/to: keywords to Skywatch.brief and Composer#compose enabling airport-to-airport route briefs.
Route briefs produce an origin-anchored Brief with: corridor adverse-conditions via RouteCorridor
waypoint sampling, destination TAF for the to-airport (respecting departing_at:), a destination field
with coordinates/distance/bearing, and enroute_forecast populated with SIGMETs/AIRMETs/PIREPs/storms/
smoke/alerts intersecting the buffered great-circle corridor. Adds RouteCorridor module for great-circle
math (waypoints, bearing, distance). Backward-compatible: existing airport/coord/ETD flows unchanged.
CLI gains --to option: skywatch brief KCDW --to KACY [--departing-at TIME].

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@jayrav13 jayrav13 merged commit da0ca8f into main May 2, 2026
3 checks passed
@jayrav13 jayrav13 deleted the feat/brief-route-input branch May 2, 2026 01:56
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.

Skywatch.brief: support route input (from:/to:)

1 participant