EKF2的Log文件回放

    This page shows you how you can tune the parameters of the EKF2 estimator by using the replay feature on a real flight log.

    • set the parameter EKF2_REC_RPL to 1. This will tell the estimator to publish special replay messages for logging.
    • You may need to format the SD card just before you want to record the log file.

    Once you have a real flight log then you can run a replay on it by using the following command in the root directory of your PX4 Firmware

    You can set the estimator parameter values for the replay in the file replay_params.txt located in the same directory
    as your replayed log file, e.g. build_posix_sitl_replay/src/firmware/posix/rootfs/replay_params.txt. When running the replay for the first time (e.g. after a make clean) this file will be autogenerated and filled with the default EKF2 parameter values taken from the flight log. After that you can change any EKF2 parameter value by changing the corresponing number in the text file. Setting the noise value for the gyro bias would require the following line.