comparison notes.md @ 3:52b73912bf0b draft default tip

ckpt
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Sat, 04 Jul 2020 21:41:45 -0400
parents 63dfe6ae95f6
children
comparison
equal deleted inserted replaced
2:63dfe6ae95f6 3:52b73912bf0b
42 42
43 Finally, for each I/Q stream, we want a metadata stream with information 43 Finally, for each I/Q stream, we want a metadata stream with information
44 such as the center frequency, sample rate, and so on. 44 such as the center frequency, sample rate, and so on.
45 45
46 It is also possible to include other streams with data that is application 46 It is also possible to include other streams with data that is application
47 specific. For example, meteorological observations or raw GNSS packets. 47 specific. For example, meteorological observations near the antenna or raw
48 GNSS packet capture.
48 49
49 Global Metadata Stream 50 Global Metadata Stream
50 ---------------------- 51 ----------------------
51 52
52 The global metadata stream contains information that is valid for the entire 53 The global metadata stream contains information that is valid for the entire
53 container. Namely: 54 container. Namely:
54 55
55 * metadata format version number (e.g., 0) 56 * metadata format version number (e.g., 0)
56 * generator software ID string (e.g., "SigDigger v0.1.0-23-g828657f") 57 * `generator`: generator software ID string (e.g., "SigDigger v0.1.0-23-g828657f")
57 * date time of when the container file was created (not necessarily the same 58 * `datetime`: date time of when the container file was created (not necessarily the same
58 as when the I/Q samples were recorded) 59 as when the I/Q samples were recorded)
59 * hostname? 60 * `hostname`: hostname?
60 * explicit list of metadata stream unique IDs? 61 * `streams`: explicit list of metadata stream unique IDs?
61 62
62 I/Q Data Streams 63 I/Q Data Streams
63 ---------------- 64 ----------------
64 65
65 These are just I/Q samples without any additional headers. 66 These are just I/Q samples.
66 67
67 Per-I/Q Stream Metadata Streams 68 Per-I/Q Stream Metadata Streams
68 ------------------------------- 69 -------------------------------
69 70
70 * mime type of the I/Q stream (always "application/octet-stream") 71 * `type`: mime type of the I/Q stream (always "application/octet-stream")
71 * I/Q data stream unique id 72 * `ts`: date time of when the packet of samples was created (time of first sample)
72 * I/Q data format (e.g., "cf32" or "cu8") 73 * `iq/samples`: number of samples since last metadata update
73 * I/Q center frequency in Hz (e.g., 137500000) 74 * `iq/uniq`: I/Q data stream unique id
74 * I/Q sample rate in S/s (e.g., 2560000) 75 * `iq/fmt`: I/Q data format (e.g., "cf32" or "cu8")
75 * I/Q device (e.g., "RTL-SDR v3 00000...") 76 * `iq/fc`: I/Q center frequency in Hz (e.g., 137500000)
76 * I/Q antenna (e.g., "RTL-SDR dipole") 77 * `iq/fs`: I/Q sample rate in S/s (e.g., 2560000)
77 * LNA device 78 * `iq/dev`: I/Q device (e.g., "RTL-SDR v3 00000...")
78 * LNB device 79 * `iq/antenna`: I/Q antenna (e.g., "RTL-SDR dipole")
80 * `iq/???`: LNA device
81 * `iq/???`: LNB device
79 82
80 * date time of when the packet of samples was created (time of first sample) 83 TODO: what else? should some of the following be separate streams?
81 * lat/lon/alt 84 * ``: lat/lon/alt
82 * ground speed? azimuth? 85 * ``: ground speed? azimuth?
83 * antenna orientation? 86 * ``: antenna orientation?
84 * LNA gain? 87 * ``: LNA gain?
85 * LNB freq? 88 * ``: LNB freq?
86 89
87 Misc Data Streams 90 Misc Data Streams
88 ----------------- 91 -----------------
89 92
90 These are opaque byte streams with no particular format. The interpretation 93 These are opaque byte streams with no particular format. The interpretation
92 stream (see below) identifies the MIME type of this data. 95 stream (see below) identifies the MIME type of this data.
93 96
94 Per-Misc Data Stream Metadata Streams 97 Per-Misc Data Stream Metadata Streams
95 ------------------------------------- 98 -------------------------------------
96 99
97 * mime type of the data stream (e.g., XXX) 100 * mime type of the data stream (e.g., TODO)
98 * optional application specific key-value pairs 101 * optional application specific key-value pairs
99
100 * optional application specific key-value pairs
101
102 102
103 TODO: what's in a packet? what's in a stream? what streams are there? 103 TODO: what's in a packet? what's in a stream? what streams are there?
104 104
105 A typical session will contain only three streams: 105 A typical session will contain only three streams:
106 106
148 streams are serialized into a richer container. For example, suppose that 148 streams are serialized into a richer container. For example, suppose that
149 a recording session produces two files: 149 a recording session produces two files:
150 150
151 ``` 151 ```
152 sigdigger_20200520_010415Z_1024000_137500000_float32_iq.raw 152 sigdigger_20200520_010415Z_1024000_137500000_float32_iq.raw
153 sigdigger_20200520_010415Z_1024000_137500000_float32_iq.ogg 153 sigdigger_20200520_010415Z_1024000_137500000_float32_iq.meta
154 ``` 154 ```
155 155
156 The `.raw` contains the samples as before. The `.ogg` file contains the 156 The `.raw` contains the samples as before. The `.meta` file contains the
157 remaining streams serialized into an Ogg format. This would yield all the 157 remaining streams serialized into structured metadata format (e.g., Ogg +
158 benefits of having a richer format without the initial incompatibility with 158 CBOR). This would yield all the benefits of having a richer format without
159 other software. 159 the initial incompatibility with other software.
160 160
161 161
162 Other Existing Container Formats 162 Other Existing Container Formats
163 -------------------------------- 163 --------------------------------
164 164
165 Here are some other existing container file formats that I looked at and 165 Here are some other existing container file formats that I looked at and
166 decided that they are too cumbersome for some reason. 166 decided that they are too cumbersome for one or more reasons.
167 167
168 * RIFF: 32-bit file sizes, very messy spec 168 * RIFF: 32-bit file sizes, very messy spec
169 * RF64: 64-bit version of RIFF, very messy spec 169 * RF64: 64-bit version of RIFF, very messy spec
170 * MKV: requires EBML implementation 170 * MKV: requires EBML implementation