Hello, I’m working on a thesis about automatic control and I’m using Eclipse, but I’m not sure if the readings I’m getting from the pixhawk are the best I can get, I think they would improve if the accelerometer is calibrated. I’m also getting drift from the yaw angle.
I have these questions.
If I calibrate the accelerometer using mission planner and then, I upload my code, the calibration will not work, right?
Is there a way to calibrate the accelerometer without using mission planner?
I mean, a simple code, using the functions from the library “AP_AccelCal”, I read it several times, but I didn’t undertand it very well, I’m not very good at programming.
This is the code I’m using to get the angles.
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER;
static AP_InertialSensor ins;
AP_AHRS_NavEKF ahrs(ins, barometer, gps, sonar);
AP_AHRS_DCM ahrs(ins, barometer, gps, sonar);
static AP_InertialNav_NavEKF inertial_nav(ahrs);
void loop ()
roll = ToDeg(ahrs.roll);
pitch = ToDeg(ahrs.pitch);
yaw = ToDeg(ahrs.yaw);
gyro = ins.get_gyro();
phd = ToDeg(gyro.x);
thd = ToDeg(gyro.y);
psid = ToDeg(gyro.z);
Thanks in advance, I’m sorry if I didn’t express myself very well.