Still waiting for MacGyver to address the word structure from UT's post.
I was actually composing a post when I saw this. You'll have to be more specific in your question as I do not know what "word structure" issue arose (or who UT is without thumbing through previous posts).
Here's the post I just finished:
So in a fit of boredom I decided to read a few pages of the thread this one was split from. I expect it on any public forum, but it would be a lot easier if a mod would go through and remove all of the "Hey, what's up?" and "You're an idiot, but I won't explain myself!" posts. I imagine it would cut the number of pages down by a third.
Anyway, I came across a snippet (page 3 of the thread) of the Loral Fairchild 2100 FDR manual, explaining the basic data capture and storage routine. It makes things a bit more complicated than I was originally led to believe from the less-detailed posts found in
this thread (and this is why I expected numbers to change as more info came my way). Without reading and rereading to make sure I'm 100% accurate, this is what I gleaned from the manual:
1) Sensor data comes in as 12-bit words (we knew that already).
2) The 2100 model accepts a range of data rates, including 64, 128, 256, 512, and 1024 Words/sec... a prior post suggests Flight AA77 used 64 W/s for a subframe, with a frame consisting of 4 subframes.
3) A subframe and a frame both begin with a sync word (assumed to be 12-bit, as well), but the syncword appears to be
in addition to the 64 Words of subframe data (making a subframe actually 65 Words in length, and a frame 261 Words in length).
4) A failure to recognize sync words for 10 seconds or longer is characterized as a failure and any following sensor data is written in uncompressed form.
5) After baseline measurements are taken and a first frame of these baselines are created, all further frames are deltas to the prior frame.
6) All data is compressed using Huffman coding.
7) The output of the Huffman coder is bit-packed into 64-Word "pages" (again, a 12-bit Word is assumed)
8) Hamming error correction codes are added to each "page"
9) A read-after-write check is performed for each Word written to flash.
Notes:
For 3), there is supposedly a picture associated with this, but until some posts it I cannot verify. A more logical expectation is the subframe consists of 63 sensor data Words and one sync Word. This would still make for a 257-Word frame (includes the sync Word).
For 4), the term "uncompressed" was undefined. At the moment, I assume that to mean sensor data is no longer viewed as delta from the last frame but absolute readings.
For 6), we do not know the compression table used. Is it dynamic (most likely not)? Is it published?
For 8), do we know what the Hamming code length is?
For 9), nothing is specified as to the action taken should this read-after-write show an error has occurred. Is it flagged as a bad Word? Do we jump to a new block?
Neglecting my current gaps in information, the problem of decoding is significantly more complex than one would hope. Without the Huffman code table, reverse-engineering the actual data is challenging, to say the least. Without knowing the Hamming code length, same deal. Is there some form of protocol running on the recorder side in the case of failed attempts at writing Words? Does it add more bits, change future bits, etc.?
Adding in all of this info I
can say that the "packet" length is, by necessity of the Huffman coding, not fixed... that's a royal PITA! If you have the table, however, it's easy enough for a computer to chug through. I'm used to doing this stuff by hand one bit at a time. There is also nothing that says incoming serial data or even the compacted data cannot be affected by electrical transients before having the Hamming code added to it.