How to increase sdlog2 logging rate?

Hi all,

I am trying to a system identification of a custom airframe. How can I increase the log rate of ATT_* (body angles and body rates) and more importantly the control output OUT_*?

I am running v1.4.1 using make px4fmu_v2-default

I have attached the px4log plot showing ATT_pitch/roll/yaw and OUT_Out0. The logging rate is very different for ATT message and OUT0 message. You can see the servo logging is clearly insufficient to reconstruct the sine sweep.

This is my startup script \romfs\px4fmu_common\init.d\rcS

#

Logging

if ver hwcmp PX4FMU_V1
then
if sdlog2 start -r 30 -a -b 2 -t
then
fi
else
# check if we should increase logging rate for ekf2 replay message logging
if param greater EKF2_REC_RPL 0
then
if param compare SYS_LOGGER 0
then
if sdlog2 start -r 500 -e -b 18 -t
then
fi
else
if logger start -r 500
then
fi
fi
else
if param compare SYS_LOGGER 0
then
if sdlog2 start -r 100 -a -b 9 -t
then
fi
else
if logger start -b 12 -t
then
fi
fi
fi
fi

bump. Anybody can help?

There is a parameter in the sd log params (see the QGroundControl param list) to increase the base rate.

Firstly, the logging rate was set to 100Hz and works without any issue (both ATT and ATTC topics). However, as you can see ATTC seems to have a refresh rate < 100 Hz (2-3 points having exactly same value)

@LorenzMeier is this due to the fact that for fixedwing platform, PWM_RATE is set to 50Hz?