fix(adif): round-trip satellite and IOTA fields on import/export - #231
Merged
Merged
Conversation
… and IOTA fields The contacts table stores prop_mode, sat_name, band_rx, freq_rx and iota, but the ADIF import/export path never touched them: exported satellite QSOs lost their bird and propagation identity (breaking LoTW/eQSL satellite awards and GridTracker/SatPC32 interop) and IOTA references never round-tripped. - generateAdif now emits PROP_MODE, SAT_NAME, BAND_RX, FREQ_RX, IOTA (designators/bands uppercased like BAND and GRIDSQUARE). - insertAdifRecord persists the same fields on import, deriving BAND_RX from FREQ_RX when only the receive frequency is supplied (mirrors FREQ->BAND). - /api/adif/export SELECT now returns the five columns; the search-results export already used SELECT * so it inherits them. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Problem
Every contact row carries
prop_mode,sat_name,band_rx,freq_rxandiotacolumns, but the ADIF import/export path ignored all five:PROP_MODE=SAT,SAT_NAME,FREQ_RXorBAND_RX, so LoTW/eQSL couldn't credit it toward satellite awards and downstream loggers (GridTracker, SatPC32, N1MM) saw a bare terrestrial QSO.IOTAreference lost it the moment they re-exported.Solution
Extend the shared ADIF serializer/parser used by every import and export path:
generateAdif()now emitsPROP_MODE,SAT_NAME,BAND_RX,FREQ_RXandIOTA. Designators and bands are uppercased to match the existingBAND/GRIDSQUAREhandling.insertAdifRecord()persists the same five fields on import, and derivesBAND_RXfromFREQ_RXwhen only the receive frequency is present — mirroring the existingFREQ → BANDfallback so satellite ops who send just the downlink frequency still land on the right receive band.AdifExportContactgains the five typed fields./api/adif/exportadds the columns to its explicitSELECT. The search-results export (/api/contacts/search?export=true) already usesSELECT *, so it inherits them automatically.No schema change — the columns already exist. Fully backwards compatible: contacts without these fields export exactly as before (empty values are omitted by
adifField).Testing
npm run typecheck— cleannpm run lint— cleannpm run build— succeedsnpx playwright test adif-generate adif-parse— 16 passed, including two new cases:<prop_mode:3>SAT,<sat_name:5>SO-50,<band_rx:4>70CM,<freq_rx:7>435.795,<iota:6>NA-001)Future follow-up
insertAdifRecordcovers the import mapping but is DB-backed, so it isn't unit-tested here; an integration test against a seeded DB would guard the round trip end-to-end.🤖 Generated with Claude Code