Skip to content

Commit 48d7cd3

Browse files
committed
update README.md
1 parent 99694f3 commit 48d7cd3

1 file changed

Lines changed: 71 additions & 75 deletions

File tree

‎README.md‎

Lines changed: 71 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
# **pyarinc — ARINC 717 / ARINC 767 decoding library**
22

3-
`pyarinc` is a modern, typed Python library for decoding ARINC 717 and ARINC 767
4-
flight‑data recorder formats. It provides deterministic bit‑extraction utilities,
5-
clean parameter models, PRM/VEC configuration parsing, and end‑to‑end decoding
6-
into pandas DataFrames.
3+
`pyarinc` is a modern, typed Python library for decoding ARINC 717 and ARINC 767 flight‑data recorder formats.
4+
It provides deterministic bit‑extraction utilities, clean parameter models, PRM/VEC configuration parsing, and end‑to‑end decoding into pandas DataFrames.
75

8-
The library is designed for analysis pipelines, automated QA tooling, and
9-
research workflows that require reliable, test‑covered decoding of FDR/QAR data.
6+
The library is designed for analysis pipelines, automated QA tooling, and research workflows that require reliable, test‑covered decoding of FDR/QAR data.
107

118
---
129

1310
## **Installation**
1411

15-
The package is not published on PyPI. Install locally:
16-
17-
### Local install
12+
### **Standard installation**
1813
```
1914
pip install .
2015
```
2116

22-
### Editable install (recommended for development)
17+
### **Editable installation (recommended for development)**
2318
```
2419
pip install -e .
2520
```
2621

27-
### Install with test dependencies
22+
### **Install optional extras**
23+
24+
#### **I/O support (Parquet, Arrow)**
25+
```
26+
pip install -e .[io]
27+
```
28+
29+
#### **Development tools (pytest, coverage, Arrow)**
30+
```
31+
pip install -e .[dev]
32+
```
33+
34+
#### **Test dependencies only**
2835
```
2936
pip install -e .[test]
3037
```
@@ -43,12 +50,12 @@ pytest -vv
4350

4451
Tests cover:
4552

46-
- Bit extraction (717/767, MSB‑first, cross‑byte)
47-
- Data‑type decoding (BNR, BCD, DISCRETE, PACKED, CHAR/ASCII, UTC, COB)
48-
- Frame reconstruction (717) and frame parsing (767)
49-
- Scheduling and superframes
50-
- PRM/VEC parsing
51-
- End‑to‑end decoding for both ARINC 717 and ARINC 767
53+
- Bit extraction (717/767, MSB‑first, cross‑byte)
54+
- Data‑type decoding (BNR, BCD, DISCRETE, PACKED, CHAR/ASCII, UTC, COB)
55+
- Frame reconstruction (717) and frame parsing (767)
56+
- Scheduling and superframes
57+
- PRM/VEC parsing
58+
- End‑to‑end decoding for both ARINC 717 and ARINC 767
5259

5360
---
5461

@@ -61,51 +68,51 @@ Tests cover:
6168
- Decodes BNR, BCD, DISCRETE, PACKED, CHAR/ISO, UTC
6269
- Applies rate‑based scheduling and superframe rules
6370
- Produces time‑indexed parameter values
64-
- Word‑based parameter indexing via:
71+
- Raw‑byte convenience decoding via `decode_raw_bytes()`
72+
- Word‑based parameter indexing:
6573
- `subframe`
6674
- `word`
67-
- `bit_offset`
68-
- Absolute bit indexing is *not* used for 717 parameters
75+
- `bit_offset`
76+
- Absolute bit indexing is **not** used for 717 parameters
6977

7078
### **ARINC 767**
7179
- Frame boundary detection (sync word, header, trailer)
7280
- Timestamp extraction with wrap‑around handling
7381
- Parameter extraction using **absolute bit indexing** (`start_bit`)
7482
- VEC/PRM‑based configuration
83+
- Raw‑byte convenience decoding via `decode_raw_bytes()`
7584
- Full data‑type support:
7685
- BNR (signed/unsigned)
7786
- BCD
7887
- DISCRETE
7988
- PACKED BITS
8089
- CHAR / ASCII
8190
- UTC
82-
- COB (Computed On Board) with formula evaluation
91+
- COB (Computed On Board)
8392
- Scheduling:
8493
- Timestamp‑based time axis (primary)
85-
- Rate‑based scheduling (fallback, 717‑compatible)
94+
- Rate‑based scheduling (fallback, 717‑compatible)
8695
- DataFrame output with:
87-
- time
88-
- parameter_name
89-
- value
90-
- frame_index
91-
- frame_id
92-
- valid
96+
- `time`
97+
- `parameter_name`
98+
- `value`
99+
- `frame_index`
100+
- `frame_id`
101+
- `valid`
93102

94103
---
95104

96105
## **Parameter Model (717 vs 767)**
97106

98-
`pyarinc` uses a unified `Parameter` class with explicit separation between
99-
ARINC 717 and ARINC 767 semantics.
107+
`pyarinc` uses a unified `Parameter` class with explicit separation between ARINC 717 and ARINC 767 semantics.
100108

101109
### **ARINC 717 parameters**
102-
- Use **word‑based indexing**:
110+
- Word‑based indexing:
103111
- `subframe`
104112
- `word`
105113
- `bit_offset`
106-
- `start_bit` must remain **unset** (`None`)
107-
- Decoded via `decode_from_frame()`
108-
- Created using:
114+
- `start_bit` must remain **unset** (`None`)
115+
- Decoded via `decode_from_frame()`
109116

110117
```python
111118
Parameter.from_717(
@@ -119,11 +126,9 @@ Parameter.from_717(
119126
```
120127

121128
### **ARINC 767 parameters**
122-
- Use **absolute bit indexing**:
123-
- `start_bit` (0‑based MSB‑first)
124-
- Optional `frame_id_767` for multi‑frame configurations
125-
- Decoded via `decode_raw_from_bytes()`
126-
- Created using:
129+
- Absolute bit indexing (`start_bit`)
130+
- Optional `frame_id_767` for multi‑frame configurations
131+
- Decoded via `decode_raw_from_bytes()`
127132

128133
```python
129134
Parameter.from_767(
@@ -135,15 +140,11 @@ Parameter.from_767(
135140
)
136141
```
137142

138-
This separation eliminates ambiguity and prevents accidental misdecoding.
139-
140143
---
141144

142145
## **Configuration Support**
143146

144-
The library parses PRM and VEC formats, including:
145-
146-
### ARINC 717 fields
147+
### **ARINC 717 fields**
147148
- subframe index
148149
- word index
149150
- bit offset
@@ -152,9 +153,9 @@ The library parses PRM and VEC formats, including:
152153
- superframe index
153154
- scale and offset
154155

155-
### ARINC 767 fields
156-
- **start_bit** (absolute bit index)
157-
- frame_id_767
156+
### **ARINC 767 fields**
157+
- `start_bit`
158+
- `frame_id_767`
158159
- bit length
159160
- rate
160161
- scale and offset
@@ -166,59 +167,54 @@ Both JSON and text formats are supported.
166167

167168
## **VEC Parsing Enhancements**
168169

169-
The VEC parser supports a richer and more consistent token set across ARINC 717
170-
and ARINC 767, improving configuration clarity while preserving full compatibility
171-
with existing decoders.
172-
173170
### **ARINC 717**
174-
- Support for `TYPE=`, `SIGNED=`, `SCALE=`, `OFFSET=`
175-
- Recognition of bare type tokens (`BNR`, `BCD`, `CHAR`)
176-
- Parsing of `CONV=` and `OPT=` (stored in mapping for future use)
177-
- No changes to the `Parameter.from_717` API
171+
- `TYPE=`, `SIGNED=`, `SCALE=`, `OFFSET=`
172+
- Bare type tokens (`BNR`, `BCD`, `CHAR`)
173+
- `CONV=` and `OPT=` tokens retained for future use
178174

179175
### **ARINC 767**
180-
- Support for bare type tokens (`BNR`, `BCD`, `CHAR`)
181-
- Parsing of `SIGNED=`, `SCALE=`, `OFFSET=`
182-
- Decimal `FID=` supported; hexadecimal `FID=0xNN` ignored
183-
- COB formulas stored without overriding the declared data type
184-
- Absolute bit indexing (`start_bit = word * 32 + bit_offset`) retained
176+
- Bare type tokens
177+
- `SIGNED=`, `SCALE=`, `OFFSET=`
178+
- Decimal `FID=` supported
179+
- COB formulas stored without overriding declared type
180+
- Absolute bit indexing preserved
185181

186182
### **General**
187183
- Unified token handling across 717/767
188-
- Expanded test coverage for all supported tokens and legacy behaviors
189-
- No changes to the public `Parameter` API
184+
- Expanded test coverage
185+
- No changes to the public `Parameter` API
190186

191187
---
192188

193189
## **Workflow**
194190

195-
Typical decoding flow:
196-
197191
1. Load raw data (aligned, bitstream, or ARINC 767 frames)
198-
2. Convert bitstream to aligned frames if needed (717)
192+
2. Convert bitstream → aligned frames if needed (717)
199193
3. Load PRM or VEC configuration
200194
4. Construct parameters using `from_717()` or `from_767()`
201-
5. Decode parameters using scheduling and superframe rules
202-
6. Produce a pandas DataFrame
195+
5. Decode using scheduling and superframe rules
196+
6. Export DataFrame to CSV or Parquet
197+
198+
Reference examples:
199+
200+
- `examples/process_flight.py` (ARINC 717)
201+
- `examples/process_flight_767.py` (ARINC 767)
203202

204203
---
205204

206205
## **Reference Source**
207206

208-
This project is a clean rewrite inspired by the decoding logic in the original
209-
FlightDataDecode repository:
207+
This project is a clean rewrite inspired by:
210208

211-
[https://github.com/osnosn/FlightDataDecode](https://github.com/osnosn/FlightDataDecode)
209+
<https://github.com/osnosn/FlightDataDecode>
212210

213-
`pyarinc` re‑implements the core logic with a modern architecture, strict typing,
214-
and full test coverage. No legacy scripts or `.dat` formats are included.
211+
`pyarinc` re‑implements the core logic with a modern architecture, strict typing, and full test coverage.
215212

216213
---
217214

218215
## **Notes**
219-
220216
- No Lua integration
221-
- No custom `.dat` format
222-
- No print() statements — uses Python logging
217+
- No legacy `.dat` formats
218+
- No `print()` statements — uses Python logging
223219
- Fully typed (Python 3.12+)
224220
- Deterministic, testable, modular design

0 commit comments

Comments
 (0)