Commit c923383
authored
docs: Comprehensive examples and API documentation improvements (#39)
* docs: Clarify multi-log API and add multi_flight_export example
IMPROVEMENTS:
1. New Example: multi_flight_export.rs
- Demonstrates how to export ALL flights from a BBL file
- Shows proper use of parse_bbl_file_all_logs()
- Displays flight numbering and automatic suffixing
2. Updated Examples/README.md
- Added quick-start section with usage for both single/multi-flight cases
- Clear explanation of when to use each example
- API pattern guide showing correct usage
- Common mistakes section with dos/don'ts
- Flight numbering table explaining suffixes
3. Updated csv_export.rs Comments
- Added prominent note about multi-log handling
- Reference to multi_flight_export example
- Clarified that this exports only first flight
4. Enhanced CRATE_USAGE.md
- Added warning section about parse_bbl_file() vs parse_bbl_file_all_logs()
- Renamed sections for clarity (Single-flight, Multi-flight)
- Best practices: Handle both cases with parse_bbl_file_all_logs()
- New Flight Numbering section with detailed explanation
- Suffix rules documentation
- Production code recommendation
This addresses the issue where users might accidentally use parse_bbl_file() on multi-flight files and only export the first flight. The new example and documentation make the distinction clear.
* docs: Remove export_demo duplication in examples/README.md
Consolidated duplicate content:
- Removed brief 3-line description of export_demo (lines 72-77)
- Replaced with single cross-reference to the comprehensive section below
- Comprehensive section (Features, Usage, Example Output, Implementation Notes)
remains intact at line 148+
- Anchor #export_demo-example correctly links from line 73
Improves readability and reduces redundancy while maintaining complete documentation.
* docs: Remove csv_export duplication in examples/README.md
Consolidated duplicate documentation:
- Removed redundant csv_export block from 'Additional Export Examples' section
- Replaced with single cross-reference to comprehensive entry in 'Available Examples'
- Anchor links correctly reference sections above
- Reduces file length by 11 lines while maintaining complete documentation
Improves readability by centralizing example documentation.
* docs: Clarify CLI vs Library API in examples/README.md
Addressed ambiguity about bbl_parser CLI tool usage:
Changes:
1. Removed confusing CLI fallback references from gpx_export and event_export
- Deleted: 'Use CLI: bbl_parser --gps flight.BBL'
- Deleted: 'Use CLI: bbl_parser --event flight.BBL'
2. Added new 'CLI Tool vs Library Examples' section explaining:
- What the CLI binary is (src/main.rs in the crate)
- When to use CLI (command-line processing, batch operations)
- When to use library API (Rust integration, programmatic access)
- How to build/install the CLI
- Relationship between library, examples, and CLI
This clarifies that:
- bbl_parser CLI is part of the crate (not separate tool)
- It's a convenience wrapper on the library API
- Readers should choose based on their use case
- Examples focus on library integration patterns
* docs: Correct GPS and Event export implementation status
Fixed inaccurate documentation:
Test Results (BTFL_KWONGKAN_10inch_0326_00_Filter.BBL):
- gpx_export: ✅ Successfully exported 833 GPS coordinates
- Includes home position, elevation, timestamps
- Valid GPX format with proper structure
- event_export: ✅ Successfully exported 5 events
- Includes sync beep, flight mode, disarm, log end
- Proper timestamp collection
Documentation Updates:
- gpx_export status: ⏳ Partial → ✅ Fully functional
- event_export status: ⏳ Partial → ✅ Fully functional
- multi_export status: ⏳ Partial → ✅ Production Ready
- export_demo status: ⏳ Partial → ✅ Production Ready
- Removed misleading footnote about parser enhancement needed
- Updated implementation status table
GPS and Event data collection are fully functional in the parser module.
No parser enhancements are needed.
* docs: Update multi_export status to fully functional
- Changed multi_export status from 'Fully functional for CSV, ⏳ GPS/Event pending'
to '✅ Fully functional - Exports all available formats'
- Aligns with verified GPS and Event export functionality
* refactor: Simplify output logic in multi_flight_export.rs
- Removed unused 'suffix' variable
- Simplified conditional output with direct if/else branches
- Clearer output messages:
- Single flight: '✓ Exported'
- Multiple flights: '✓ Exported as .NN.csv'
- Reduces code complexity and improves readability
* docs: Add status indicator to export_demo section
- Added status line after Usage examples (line 171)
- Consistent with gpx_export, event_export, and multi_export examples
- Status: '✅ Fully functional - Exports all formats (CSV, GPX, events) with comprehensive logging'
- Improves visual consistency and clarity across all example sections
* fix: Add language identifiers to fenced code blocks
- Added 'text' language identifier to multi_flight_export example output (line 42)
- Added 'text' language identifier to export_demo example output (line 176)
- Improves syntax highlighting and markdown linting compliance
- All code blocks now properly labeled: bash, rust, or text1 parent ec21e39 commit c923383
4 files changed
Lines changed: 376 additions & 96 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
5 | 16 | | |
6 | 17 | | |
7 | 18 | | |
8 | | - | |
9 | | - | |
| 19 | + | |
| 20 | + | |
10 | 21 | | |
11 | 22 | | |
| 23 | + | |
12 | 24 | | |
13 | 25 | | |
14 | 26 | | |
| |||
31 | 43 | | |
32 | 44 | | |
33 | 45 | | |
34 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
35 | 49 | | |
36 | 50 | | |
37 | 51 | | |
| |||
40 | 54 | | |
41 | 55 | | |
42 | 56 | | |
43 | | - | |
| 57 | + | |
44 | 58 | | |
45 | 59 | | |
46 | 60 | | |
47 | 61 | | |
48 | 62 | | |
49 | 63 | | |
50 | | - | |
| 64 | + | |
51 | 65 | | |
52 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
53 | 70 | | |
54 | | - | |
| 71 | + | |
55 | 72 | | |
56 | 73 | | |
57 | 74 | | |
58 | 75 | | |
59 | 76 | | |
60 | 77 | | |
61 | 78 | | |
| 79 | + | |
62 | 80 | | |
63 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
64 | 104 | | |
65 | 105 | | |
66 | 106 | | |
| |||
69 | 109 | | |
70 | 110 | | |
71 | 111 | | |
72 | | - | |
| 112 | + | |
73 | 113 | | |
74 | 114 | | |
75 | 115 | | |
| 116 | + | |
| 117 | + | |
76 | 118 | | |
77 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
78 | 124 | | |
79 | 125 | | |
80 | 126 | | |
81 | 127 | | |
82 | 128 | | |
83 | 129 | | |
84 | | - | |
| 130 | + | |
85 | 131 | | |
86 | 132 | | |
87 | 133 | | |
88 | 134 | | |
89 | 135 | | |
90 | 136 | | |
91 | | - | |
| 137 | + | |
92 | 138 | | |
93 | 139 | | |
94 | 140 | | |
| |||
100 | 146 | | |
101 | 147 | | |
102 | 148 | | |
103 | | - | |
104 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
105 | 154 | | |
106 | 155 | | |
107 | 156 | | |
108 | 157 | | |
109 | 158 | | |
110 | | - | |
111 | | - | |
112 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
113 | 166 | | |
114 | 167 | | |
115 | 168 | | |
116 | 169 | | |
117 | 170 | | |
118 | 171 | | |
119 | | - | |
| 172 | + | |
120 | 173 | | |
121 | 174 | | |
122 | 175 | | |
| |||
128 | 181 | | |
129 | 182 | | |
130 | 183 | | |
131 | | - | |
| 184 | + | |
132 | 185 | | |
133 | | - | |
134 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
135 | 189 | | |
136 | 190 | | |
137 | 191 | | |
| |||
216 | 270 | | |
217 | 271 | | |
218 | 272 | | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
219 | 324 | | |
220 | 325 | | |
221 | 326 | | |
222 | 327 | | |
223 | | - | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
224 | 339 | | |
| 340 | + | |
225 | 341 | | |
226 | | - | |
227 | 342 | | |
228 | 343 | | |
229 | 344 | | |
| |||
234 | 349 | | |
235 | 350 | | |
236 | 351 | | |
| 352 | + | |
0 commit comments