Logging dropouts, loss of camera_capture events, increasing default log buffer size

I am having problems with SDLogging dropouts, in some mission the logging dropouts causes the camera_capture events to be lost for some photos, making the process of georeferencing them impossible, due to the lack of coordinates for some of them.

I’m using a mRo x2.1 as the flight controller only logging the default params, SDLOG_PROFILE = 3. And I’m also using a “good” microSD card (SamDisk Ultra UHS-I A1 16Gb).

Finally, I’ve been trying to increase the default log buffer size. First, I’ve done this by changing the buffer size from the console, testing different sizes and seeing if this improves the dropouts problem. Then I changed the default value of 12kB in the code to a new value of 48kB, in src/modules/logger/logger.ccp .

dropout

But it doesn’t seem to work out the way I expected. When I boot up the copter and it begin the logging, the buffer size is 14kB. Then if I stop the logger via the console, logger off and logger stop, and then start it up again, logger start and logger on . The buffer size change to the new default of 48kB.

Why in the bootup of the copter the size of the buffer is initialized in 14kB instead of 48kB? Am I modifying something wrong with the code?

Also, could any of you have any idea how to avoid these dropouts?

It doesn’t matter how well the rest of the copter works if I can’t geo-tag the images I get.