"Short" trailer testfiles
I simply adapted the testfiles to the new trailer size with this
def shaveOrbitTrailer(ifile):
fout = open(ifile.replace(".dat", "_short_trailer.dat") ,'wb')
if ifile != 'stdin':
fin = open(ifile, 'rb')
else:
fin = sys.stdin.buffer
try:
while True:
h_raw = fin.read(4)
if (len(h_raw)==0):
print('Reached end of file')
fin.close()
break
if struct.unpack('<I', h_raw)[0]==0xbeefdead:
print("Orbit trailer found", hex(struct.unpack('<I', h_raw)[0]))
otrailer = h_raw + fin.read(4*(7+15*8))
fin.read(4*8)
fout.write(otrailer)
continue
frame = h_raw + fin.read(4*7)
fout.write(frame)
except Exception as ex:
print(f"exception: {ex}")
sys.exit(1)
However, in the meanwhile I noticed that the test files are pretty much screwed and they cause (in every case, see here) a lot of packet skips.
This is normal since the input files where collected when the system still had few bugs that are now solved (might be a good idea to create an issue with all the problems).
I can manually code something to "fix" the data while we wait for new data to acquire in PASSTHROUGH
(which would a more realistic test). As you prefer.
Rocco