About logbitmask and logrotate

Hi everybody !

I recently start working on some scripts to analyse datas from dataflash logs (I need to be able to detect an event directly in the logs, and although to stock the logs in a database … anyway !).

I have several questions about thoose logs, I hope someone has an answer (I looked for answers but wasn’t able to find some in any topic of this forum).

  • First of all, I would like to know how to manage the logrotate, and the max size of a log file ?
    I saw a variable on the ardupilot manuel ( log.single_max_size = [size]) but I’m not sure how I can access to it. Is it possible by using a GCS like Mission PLanner or QGroundControl ?

  • Then, I tried top record a flight by reducing by far the bitmask (I wanted to get only CTUN, which is log_bitmask = 16). I obtained the following results.

  • The next pictures shows a variable named CTRL, and I don’t understand what this is. Can anyone explain it to me ?

Here is the definition of this variable :slight_smile:

If someone could although explain what is “Qffffff” ? I understood this is the measure unit, but I can’t find a match between those letters and the variables …

I thank you in advance !

Hello Axel,

The CTRL log comes from the attitude controller. It contains the outputs of a RMS filter applied on the P and D terms of the attitude controller.

The mask to activate CTRL logging is the same as the CTUN mask. It’s normal that both CTUN and CTRL are logged at the same type.

Here is the signification for the letters (found in ardupilot/libraries/DataFlash/LogStructure.h) :

Format characters in the format string for binary log messages
a : int16_t[32]
b : int8_t
B : uint8_t
h : int16_t
H : uint16_t
i : int32_t
I : uint32_t
f : float
d : double
n : char[4]
N : char[16]
Z : char[64]
c : int16_t * 100
C : uint16_t * 100
e : int32_t * 100
E : uint32_t * 100
L : int32_t latitude/longitude
M : uint8_t flight mode
q : int64_t
Q : uint64_t

1 Like

Thanks, that explains a lot ! :slight_smile:

Does anyone has an answer about the single_max_size variable in order to define which size the log files should reach before writing on another file ?