Commit 6da56fc
DEV-793 Support midday/midnight splits of LSM6DSV tagged-FIFO data blocks
The gen-1 accelerometers (LIS2DW12/LSM6DS3) get midday/midnight CSV splits through the generic fixed-size-packet path: each split half byte-advances by dataPacketSize*sampleCount. The LSM6DSV tagged FIFO cannot be walked that way (its raw layout interleaves accel/gyro/mag/timestamp entries behind a count prefix), which is why the byte-offset walk carried a deliberate fail-loud IllegalStateException for split LSM6DSV blocks.
Replaces the guard with an entry-aware split: both halves of a split block are handed the SAME raw block bytes - the LSM6DSV entry parser selects each half's aligned-sample range from the part's metadata-time sampleCount (first half = leading range, second half = trailing range), mag entries are assigned to halves by FIFO arrival order relative to the aligned boundary, and the byte walk advances by nothing for the first half and by the raw on-disk size for the second, keeping every subsequent block aligned. The metadata-time sample-split already worked in the aligned-sample domain and is unchanged.
Validated with an RWC-shifted copy of the DEV-793 B9 recording (GSR 128 Hz + accel 60 Hz straddling 00:00 device time): accel CSV ends 23:59:59.985 / resumes 00:00:00.001 and GSR ends 23:59:59.995 / resumes 00:00:00.003 (one sample period each), and the concatenated split output is byte-for-byte identical to the unsplit parse (58,752 GSR + 26,705 accel rows). Full ASM_PC_00005 suite green (130 tests) - all existing LSM6DSV references bit-identical through the parser refactor.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 0381fe4 commit 6da56fc
2 files changed
Lines changed: 56 additions & 14 deletions
File tree
- ShimmerDriver/src/main/java/com/shimmerresearch/verisense
- payloaddesign
Lines changed: 45 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2027 | 2027 | | |
2028 | 2028 | | |
2029 | 2029 | | |
| 2030 | + | |
| 2031 | + | |
| 2032 | + | |
| 2033 | + | |
| 2034 | + | |
| 2035 | + | |
| 2036 | + | |
| 2037 | + | |
| 2038 | + | |
2030 | 2039 | | |
2031 | 2040 | | |
2032 | 2041 | | |
| 2042 | + | |
| 2043 | + | |
2033 | 2044 | | |
2034 | 2045 | | |
2035 | 2046 | | |
| |||
2038 | 2049 | | |
2039 | 2050 | | |
2040 | 2051 | | |
2041 | | - | |
| 2052 | + | |
| 2053 | + | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
2042 | 2057 | | |
2043 | 2058 | | |
2044 | 2059 | | |
2045 | 2060 | | |
2046 | | - | |
2047 | | - | |
2048 | | - | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
2049 | 2075 | | |
2050 | | - | |
2051 | | - | |
| 2076 | + | |
| 2077 | + | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2052 | 2088 | | |
2053 | 2089 | | |
2054 | 2090 | | |
| |||
2078 | 2114 | | |
2079 | 2115 | | |
2080 | 2116 | | |
2081 | | - | |
| 2117 | + | |
2082 | 2118 | | |
2083 | 2119 | | |
2084 | 2120 | | |
| |||
2092 | 2128 | | |
2093 | 2129 | | |
2094 | 2130 | | |
2095 | | - | |
| 2131 | + | |
2096 | 2132 | | |
2097 | 2133 | | |
2098 | 2134 | | |
| |||
2112 | 2148 | | |
2113 | 2149 | | |
2114 | 2150 | | |
2115 | | - | |
| 2151 | + | |
2116 | 2152 | | |
2117 | 2153 | | |
2118 | 2154 | | |
| |||
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
427 | 434 | | |
428 | | - | |
429 | 435 | | |
430 | 436 | | |
431 | 437 | | |
| |||
0 commit comments