Background
PR #6 implemented the export infrastructure (CSV, GPX, Event) for the BBL parser crate. However, GPS and Event frame parsing logic currently exists only in the CLI binary and needs to be migrated to the crate library for full functionality.
Current State
In the crate (src/parser/frame.rs):
- GPS/Event vectors are initialized as empty
- G/H/E frames are skipped rather than parsed (lines 223-232)
- Export functions exist but receive empty data
In the CLI (src/main.rs):
- Full G-frame parsing with GPS coordinate construction (line 2147+)
- Dedicated
parse_e_frame() function for Event frames (line 2491+)
- Complete Event frame construction with event descriptions (line 2649+)
Impact
Crate users calling parse_bbl_file() receive empty vectors for GPS/Event data, even when logs contain G/H/E frames:
- ✅ CSV export works (uses I/P/S frames)
- ❌ GPX export produces no data (empty
gps_coordinates)
- ❌ Event export produces no data (empty
event_frames)
Only the CLI binary currently provides full export functionality.
Required Work
-
Migrate GPS parsing from src/main.rs to src/parser/frame.rs:
- Implement G-frame parsing in the
'G' match arm
- Implement H-frame parsing in the
'H' match arm
- Populate
gps_coordinates and home_coordinates vectors
-
Migrate Event parsing from src/main.rs to src/parser/frame.rs:
- Move
parse_e_frame() logic or equivalent
- Implement E-frame parsing in the
'E' match arm
- Populate
event_frames vector with proper event descriptions
-
Testing:
- Verify GPX export produces correct output from crate
- Verify Event export produces correct output from crate
- Ensure CLI maintains compatibility
References
Background
PR #6 implemented the export infrastructure (CSV, GPX, Event) for the BBL parser crate. However, GPS and Event frame parsing logic currently exists only in the CLI binary and needs to be migrated to the crate library for full functionality.
Current State
In the crate (
src/parser/frame.rs):In the CLI (
src/main.rs):parse_e_frame()function for Event frames (line 2491+)Impact
Crate users calling
parse_bbl_file()receive empty vectors for GPS/Event data, even when logs contain G/H/E frames:gps_coordinates)event_frames)Only the CLI binary currently provides full export functionality.
Required Work
Migrate GPS parsing from
src/main.rstosrc/parser/frame.rs:'G'match arm'H'match armgps_coordinatesandhome_coordinatesvectorsMigrate Event parsing from
src/main.rstosrc/parser/frame.rs:parse_e_frame()logic or equivalent'E'match armevent_framesvector with proper event descriptionsTesting:
References