feat(decode): a Blastware file's identity, battery and trigger settings
Group A of the file-only decode, every field matched against every DL2 report (2026-11-03): - Identity block before the setup name, what the live read gets from SUB FE: serial k-202, firmware k-147, DSP version k-138, calibration date k-132 + 'by' k-128, manufacturer k-94, model k-72, firmware minor k-193. Event.device_info (DeviceInfo gains calibration_date / calibrated_by). Serial, Version and Calibration 69,983 / 69,983. - Battery: uint16 hundredths of a volt at k-190 (Event.battery_volts). 69,729 exact; the other 254 are Blastware rounding half up. - Trigger source: the two bytes between the embedded event record's lead and fe 80, a bitmask (0x01 Tran 0x02 Vert 0x04 Long 0x08 MicL 0x200 Manual): 6,493 / 6,493. Event.triggered_by. - Trigger settings in Series IV's 0x1A layout: sources bitmask k-19, stop mode k-31 (0 = Fixed), each channel's float32 level at label+30 (geo in/s, mic psi), mic type code at MicL+4 (2 = Linear Weighting). Geo level 6,447 / 6,447, mic 4,403 / 4,403; Blastware prints a level when its channel is a trigger source and the event was not Manual. The mic level's dB uses 6895 Pa/psi (4,272 / 4,272 against 4,271 at 6894.757). - .h5 attrs for all of them (additive). - Checker: SFM's side reports the ten fields; the mic trigger level follows the report's dB/psi. Carve-out units-is-a-display-preference: dB or psi is Blastware's PC setting when it wrote the report -- DL2's reports switch fleet-wide in 61 clean runs by write time, and no byte of the file separates them. Two tests that pinned BatteryLevel / Calibration as blank now pin the match. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
1 parent
be5bab4787
commit
6c2eda5f63
14 files changed
+8384
-15
No files matched your search
@@ -106,4 +106,25 @@ INTERVAL_COUNT_IS_DURATION = Carveout(
|
||||
applies=_interval_count_is_duration,
|
||||
)
|
||||
|
||||
CARVEOUTS: tuple[Carveout, ...] = (SATURATION, INTERVAL_COUNT_IS_DURATION)
|
||||
_MIC_UNITS = ("in/s and dB(L)", "in/s and psi(L)")
|
||||
|
||||
|
||||
def _units_is_a_display_preference(sfm: SfmSide, ref: XmlReport, res: FieldResult) -> bool:
|
||||
"""Both sides say the event has a mic; they differ only in dB against psi."""
|
||||
return (" ".join((res.bw or "").split()) in _MIC_UNITS
|
||||
and sfm.values.get("Units") in _MIC_UNITS)
|
||||
|
||||
|
||||
UNITS_IS_A_DISPLAY_PREFERENCE = Carveout(
|
||||
id="units-is-a-display-preference",
|
||||
fields=("Units",),
|
||||
evidence=("dB(L) or psi(L) is Blastware's display preference on the PC when it wrote the "
|
||||
"report, not the unit's: in report-write order (the _XML.XML mtimes) DL2's 70,034 "
|
||||
"reports switch fleet-wide in 61 clean runs, every unit at once, and no byte or "
|
||||
"bit of the event file separates the two (k-240 .. k+520, nor the 1.2 KB before "
|
||||
"the footer). 2026-11-03."),
|
||||
applies=_units_is_a_display_preference,
|
||||
)
|
||||
|
||||
CARVEOUTS: tuple[Carveout, ...] = (SATURATION, INTERVAL_COUNT_IS_DURATION,
|
||||
UNITS_IS_A_DISPLAY_PREFERENCE)
|
||||
Reference in new issue
Block a user