feat(brief): support route input — Skywatch.brief(from:, to:) (#5)#21
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
from:+to:kwargs toSkywatch.briefandComposer#composefor airport-to-airport route briefsSkywatch::Brief::Analysis::RouteCorridorfor pure-math great-circle waypoint sampling, bearing, and distance (no RGeo buffer needed)destination:field (airport, coordinates, distance_nm, bearing_deg) andenroute_forecast:slot populated with corridor-intersecting adverse conditions (SIGMETs/AIRMETs/PIREPs/storms/smoke/alerts)destination_forecastTAF uses the to airport for route briefs (respectsdeparting_at:)--to AIRPORToption:skywatch brief KCDW --to KACY [--departing-at TIME]New files
lib/skywatch/brief/analysis/route_corridor.rb—RouteCorridor.waypoints,RouteCorridor.bearing_deg,RouteCorridor.distance_nmspec/brief/analysis/route_corridor_spec.rb— 14 specs covering waypoint count/spacing, endpoints, bearings, distanceTest plan
bundle exec rspec— 519 examples, 0 failures (was 477 before this sprint's PRs)bundle exec rubocop— no offensesRouteCorridor.waypointsreturns correct count, respects spacing, includes endpointsRouteCorridor.bearing_degcorrect for due-east, due-west, due-north, due-southComposer#compose(from:, to:)raises on: missing one of from/to, mixing with at:enroute_forecasthasavailable: true, corridor metadata, items/partial_failuresdestination_forecastTAF is for the to airportdeparting_atpasses through on route briefsBriefmodel:enroute_forecastinstance var overrides ENROUTE_UNAVAILABLE constantBriefmodel:destinationfield in to_h when set; omitted when nil--topasses from:/to: to Skywatch.brief; combines with--departing-atCloses #5
🤖 Generated with Claude Code