[nadc_tools] improved algorithm to repair corrupted L0 detector datapackages - state_id