Servers by jDrones

Log File Format

Hello. I try to reparse my log file (in *BIN format). At others topics I saw people recommended see source code. I looked for DFReader.py source. But unfortunately I’m nub in python. Please, help me. Can anyone explain me, how can i parse it in C? I wrote similar code for PX4 analyzing, as their log-file structure described very clear. But I still cannot understand the structure of *BIN.
At the beginning I see header and then ‘Type,Length,Name,Format,Columns’ string… Than I see named fields for each group of params (like GPS, ATT and others)
Where useful data begins for each group?
For example, how can I read value array for one param - BAT->Volt??
Thanks.

DataFlash logs use a self-describing format.
That is, there will be a few dozen of FMT-type messages which will define the format for the rest of the messages.
The important thing to remember is that each log is self-defined and you won’t find some standard described externally.

Another detail to keep in mind is that relatively recently new unit and multiplier messages were added to accompany each message type.

For example, what the first sentence “FMTBBnNZType,Length,Name,Format,Columns” says is that

  • The FMT message has 5 fields of type B,B,n,N,Z (see here for definitions)
  • Has a field Type giving the Type of the message defined
  • Has a field Length (in bytes) of the message defined
  • Has a field Name with the ASCII name of the message defined
  • Has a field Format with the field format of the message
  • Gives an ASCII list of the names of the contents of the message.

Ok. I understood it more clear. But at next step I try to find any value in my hex-editor.
In MissionPlanner I see the value for TimeUS (ex 2497176620). I m awaiting to find Q (uint64_t) - represented value in opened *BIN file through HEX-editor (0x94D7E42C = 2497176620). But nothing I can find. Search command returns fail (No such HEX value)
The same situation for ‘f’ (float) represented values anywhere
Is there any decoding need?

I don’t think I can explain it any better with words.
You could take a look on how I did it myself on Matlab.

Specifically,
Here is how a new FMT message is parsed to create a new message format and
here is how each new data message is parsed.

I hope that was more helpful.

Servers by jDrones