Ardupilot Calibration Information

Hello, suppose I calibrated Navio2 sensors using standard Ardupilot and Mission Planner software. Will the calibration data be saved and later used when I stop Ardupilot, then compile and run an Ardupilot example project (e.g. ardupilot/libraries/AP_AHRS/examples/AHRS_Test/AP_AHRS.cpp) or the calibration offsets have runtime lifetime (i.e. not save on flash)? If the data is not being saved by Ardupilot (and accessed by example projects), what is my best option to have calibrated sensors in this AHRS example project? Thank you.

The calibrations are saved in flash, so there is no need to recalibrate every time. I am not sure whether examples could read them from the .stg files or not, but you can manually extract the values by reading the full parameter list in Mission Planner and then find a way to pass them to the example.

Thanks, I’ll try to find those .stg files in Raspberry Pi and find out whether the example projects use them by some kind of file usage monitoring tool.

Hello there!

The calibration data is stored in a non-volatile memory (namely /var/APM/<vehicle>.stg) for sure! Otherwise you’d need to calibrate your vehicle on every launch.

Examples don’t use calibration data, though.

Hello! Thanks for the information! Do you happen to know an easy way of making the AHRS_Test.cpp example project to use the calibration data? I can guess it must be just some additional one or two function calls (for each sensor: gyro, compass, baro…) as the code is already there.