Skip to content

Add Label 52 AGM (Ground UTC Request) decoder plugin#403

Open
thepacket wants to merge 1 commit intoairframesio:masterfrom
thepacket:plugin/label-52
Open

Add Label 52 AGM (Ground UTC Request) decoder plugin#403
thepacket wants to merge 1 commit intoairframesio:masterfrom
thepacket:plugin/label-52

Conversation

@thepacket
Copy link
Copy Markdown

Adds a decoder for label 52 Ground UTC Request uplinks. Only the three confirmed fields (YY, MM, DD) are surfaced; the trailing time/status portion is undocumented and intentionally ignored.

Wire format

2604201091039
  • 26 → year 2026
  • 04 → April
  • 20 → day 20

npm run build passes.

New plugin registered in official.ts and MessageDecoder.ts.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@thepacket has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 55 minutes and 38 seconds before requesting another review.

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 38 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 142a0737-6317-48b7-acf7-2890172f8db6

📥 Commits

Reviewing files that changed from the base of the PR and between 10f9f69 and 4bb1fdb.

📒 Files selected for processing (3)
  • lib/MessageDecoder.ts
  • lib/plugins/Label_52_AGM.ts
  • lib/plugins/official.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@kevinelliott kevinelliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

Adds Label_52_AGM for a ground-to-air UTC request uplink, decoding the leading YYMMDD calendar-date fields and intentionally leaving the trailing portion unparsed. Registers in MessageDecoder.ts and lib/plugins/official.ts.

Verdict

Tight, conservative scope and the date validation is the strongest in this batch. Main gap is the missing test. A couple of consistency items below.

Must Fix

  • No companion Label_52_AGM.test.ts. Every plugin in lib/plugins/ has a Jest test file. Please add one — at minimum, the 2604201091039 example, plus negative cases (<6 chars, invalid month 13, invalid day 32).
  • Trailing payload is dropped. The PR description correctly notes the trailing 1091039 is undocumented and intentionally not parsed — but right now it disappears from the result entirely. Convention is to surface it via ResultFormatter.unknown(decodeResult, text.substring(6)) or decodeResult.remaining.text = text.substring(6) so downstream consumers can still see it. Otherwise you've gone from decoded:false (with text preserved) to decoded:true (with text silently dropped), which is worse for diagnostics.

Should Fix

  • Use ResultFormatter.month(...) and ResultFormatter.day(...). result_formatter.ts:440 and :450 provide canonical helpers with code:'MSG_DAY' / code:'MSG_MON' and proper raw fields. Your custom chips (code:'YEAR', code:'MONTH', code:'DAY') work but diverge from convention. The stringified "04 (April)" value is helpful display; consider keeping a pretty chip in addition to the canonical one, or moving "April" into raw and letting the consumer format.
  • raw.year and raw.date aren't in RawFields (allowed by index signature). RawFields.month and RawFields.day exist as numbers — your assignment matches that. ISO raw.date is plugin-specific; fine, but document that it's a derived convenience field.
  • Day-per-month validation. dayN <= 31 allows e.g. February 30. Probably fine for an opportunistic decoder; flag if you want stricter validation.

Nits

  • The Direction chip (Uplink (ground → aircraft)) is non-standard and not used elsewhere — consider dropping or moving to raw only.
  • Message Type chip duplicates formatted.description.

Tests

Missing — please add Label_52_AGM.test.ts.

Notes

  • Registration: confirmed in lib/MessageDecoder.ts and lib/plugins/official.ts. Good.
  • HHMM/anchor validation here is the cleanest of the five PRs in this series — nice.

Thanks @thepacket!

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