Add Label 5Z AA/US Airways Variant 1 decoder plugin#405
Add Label 5Z AA/US Airways Variant 1 decoder plugin#405thepacket wants to merge 1 commit intoairframesio:masterfrom
Conversation
New plugin registered in official.ts and MessageDecoder.ts.
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 55 minutes and 36 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
kevinelliott
left a comment
There was a problem hiding this comment.
Summary
Adds a Label_5Z_AA plugin for AA/US Airways "OS" downlinks (in-range, clear, ALT-altimeter, FTM free-text). Coexists with the existing United Label_5Z_Slash via an explicit text.startsWith('/') early-out. Registered in MessageDecoder.ts and official.ts.
Verdict
Changes requested — no tests, plus a couple of consistency / dispatch concerns.
Must Fix
- No tests. Please add coverage for the four documented shapes:
OS KPHX /CLR,OS KSFO /IR KSFO0312,OS KDFW/ALT00001930, and anOS KAUS/FTM\r\nLAST MINUTE REQ…free-text. Include a negative test for/-prefixed messages so the United routing can't regress. subCommandDescriptionsmis-labels several entries.OUT/OFF/ON/INare listed under "subcommand", but those are themselves separate ARINC label-44 movement events; they are not known sub-codes for the AA OS variant in the body. Either document the actual AA observed list (IR/CLR/ALT/FTM) and drop the rest, or cite the source. As-is the table will mislead consumers.
Should Fix
- Coexistence with
Label_5Z_Slashis fragile. Both plugins now registerlabels: ['5Z'].Label_5Z_Slashfilters withpreambles: ['/'], butLabel_5Z_AAhas no preamble qualifier — so for/-prefixed messages it still runs (and self-rejects viatext.startsWith('/')). Cleaner: add a preamble qualifier to exclude/, or invert it (preambles: ['OS ']). This also lets the framework skip you faster on non-OS 5Z traffic. - Duplicate / non-standard time keys. You set both
raw.estimated_arrival_time(aHH:MMstring) andraw.eta_time(viaResultFormatter.eta, seconds-since-midnight). Pick one; the seconds-of-day form is the convention used elsewhere. raw.altimeter_rawis unusual. If it’s genuinely raw/unparsed, preferremaining.textor omit. The "may be padding" comment suggests this should not be exposed unless meaningful.- HHMM range validation.
convertHHMMSSToTod(time + '00')does no bounds check —2599would silently produce a wrong TOD. Validatehh < 24 && mm < 60before calling, consistent with other plugins. raw.airline = 'American Airlines / US Airways'as a single combined string is a bit lossy — the format also describes "AA Variant 1" but stores both carrier names jointly. If known, use IATA/ICAO carrier code(s) per the message header, or split.
Nits
freeTextis built by joiningbodyLineswith\nafter stripping\r— make sure the test for FTM checks both\r\nand\nseparators don't break the match.m.groupsdestructuring withaltIcao || timeA …is fine but a small jsdoc on the regex would help future maintainers (the alternatives are dense).- "Out-Safe" is an unusual gloss for "OS" — Operational Status is by far the more common reading. Consider dropping the "Out-Safe" parenthetical.
Tests
Missing. See Must Fix.
Notes
- Registration LGTM (added to MessageDecoder pluginClasses and re-exported via official.ts).
- CodeRabbit hit a rate limit and did not actually review; the warning can be ignored.
Thanks @thepacket!
Adds a decoder for American Airlines / US Airways label 5Z 'OS' downlinks (Variant 1 — Airline Designated Downlink).
Wire format
Coexists with existing
Label_5Z_Slash(United Airlines variant) via leading-/guard.npm run buildpasses.