Ardupilot Log Files

I am looking through the Ardupilot source code for some specifics on how it records data for the Pixhawk. The program uses the PX4 firmware to interact with the Pixhawk, so I suspect it uses the built in sdlog2 functionality.

http://ardupilot.org/dev/docs/learning-ardupilot-introduction.html

However Ardupilot uses a Dataflash system for its logging.

http://ardupilot.org/rover/docs/common-downloading-and-analyzing-data-logs-in-mission-planner.html

Which of these functions is used for logging data in this case?

I think you are wrong about the “sdlog2” functionality. I don’t think that is used.

The Dataflash is the correct place to look. Check out LogStructure.h, LogFile.cpp and other files inside libraries/DataFlash.

This also might be a useful page from the documentation: http://ardupilot.org/dev/docs/code-overview-adding-a-new-log-message.html

Thank you for the quick response. If you wouldn’t mind answering another question, I’m looking through the libraries and see the files are headed with “AC” and “AP” designations such as “AP_ADC” or “AC_AttitudeControl”. What do they mean exactly?

I don’t know the answer to that question. Does anyone else?

(My guess is that the prefixes are hold-overs from past times. I would guess AP_XXX labels the XXX library as “ArduPilot” or perhaps previously ArduPlane, while AC_YYY labels the YYY library as “ArduCopter”. But since much of Copter, Plane, and others have begun to share common code, the pre-fix may no longer be appropriate, or necessary. Also, one old library, APM_Control, has the outdated APM prefix.)

(But that is ONLY a guess.)