LOG parameters

13 parameters in the LOG family. ArduCopter 4.7 only — other vehicles share many of these names but not always the same ranges or meanings.

LOG_BACKEND_TYPE

AP_Logger Backend Storage type

Bitmap of what Logger backend types to enable. Block-based logging is available on SITL and boards with dataflash chips. Multiple backends can be selected.

User level

Standard

Bitmask

Value

Meaning

0

File

1

MAVLink

2

Block

LOG_BLK_RATEMAX

Maximum logging rate for block backend

This sets the maximum rate that streaming log messages will be logged to the block backend. A value of zero means that rate limiting is disabled.

Units

Hz

Range

0 to 1000

Increment

0.1

User level

Standard

LOG_DARM_RATEMAX

Maximum logging rate when disarmed

This sets the maximum rate that streaming log messages will be logged to any backend when disarmed. A value of zero means that the normal backend rate limit is applied.

Units

Hz

Range

0 to 1000

Increment

0.1

User level

Standard

LOG_DISARMED

Enable logging while disarmed

If LOG_DISARMED is set to 1 then logging will be enabled at all times including when disarmed. Logging before arming can make for very large logfiles but can help a lot when tracking down startup issues and is necessary if logging of EKF replay data is selected via the LOG_REPLAY parameter. If LOG_DISARMED is set to 2, then logging will be enabled when disarmed, but not if a USB connection is detected. This can be used to prevent unwanted data logs being generated when the vehicle is connected via USB for log downloading or parameter changes. If LOG_DISARMED is set to 3 then logging will happen while disarmed, but if the vehicle never arms then the logs using the filesystem backend will be discarded on the next boot.

User level

Standard

Values

Value

Meaning

0

Disabled

1

Enabled

2

Disabled on USB connection

3

Discard log on reboot if never armed

LOG_FILE_BUFSIZE

Logging File and Block Backend buffer size max (in kibibytes)

The File and Block backends use a buffer to store data before writing to the block device. Raising this value may reduce “gaps” in your SD card logging but increases memory usage. This buffer size may be reduced to free up available memory

Units

KiB

Range

4 to 200

User level

Standard

LOG_FILE_DSRMROT

Stop logging to current file on disarm

When set, the current log file is closed when the vehicle is disarmed. If LOG_DISARMED is set then a fresh log will be opened. Applies to the File and Block logging backends.

User level

Standard

Values

Value

Meaning

0

Disabled

1

Enabled

LOG_FILE_MB_FREE

Old logs on the SD card will be deleted to maintain this amount of free space

Set this such that the free space is larger than your largest typical flight log

Units

MB

Range

2 to 1000

User level

Standard

LOG_FILE_RATEMAX

Maximum logging rate for file backend

This sets the maximum rate that streaming log messages will be logged to the file backend. A value of zero means that rate limiting is disabled.

Units

Hz

Range

0 to 1000

Increment

0.1

User level

Standard

LOG_FILE_TIMEOUT

Timeout before giving up on file writes

This controls the amount of time before failing writes to a log file cause the file to be closed and logging stopped.

Units

s

User level

Standard

LOG_MAV_BUFSIZE

Maximum AP_Logger MAVLink Backend buffer size

Maximum amount of memory to allocate to AP_Logger-over-mavlink

Units

kB

User level

Advanced

LOG_MAV_RATEMAX

Maximum logging rate for mavlink backend

This sets the maximum rate that streaming log messages will be logged to the mavlink backend. A value of zero means that rate limiting is disabled.

Units

Hz

Range

0 to 1000

Increment

0.1

User level

Standard

LOG_MAX_FILES

Maximum number of log files

This sets the maximum number of log file that will be written on dataflash or sd card before starting to rotate log number. Limit is capped at 500 logs.

Range

2 to 500

Increment

1

Reboot required

Yes — the change takes effect after a reboot.

User level

Advanced

LOG_REPLAY

Enable logging of information needed for Replay

If LOG_REPLAY is set to 1 then the EKF2 and EKF3 state estimators will log detailed information needed for diagnosing problems with the Kalman filter. LOG_DISARMED must be set to 1 or 2 or else the log will not contain the pre-flight data required for replay testing of the EKF’s. It is suggested that you also raise LOG_FILE_BUFSIZE to give more buffer space for logging and use a high quality microSD card to ensure no sensor data is lost.

User level

Standard

Values

Value

Meaning

0

Disabled

1

Enabled