Merge remote-tracking branch 'origin/baro2' into baro2

# Conflicts:
#	UAV-ControlSystem/src/drivers/accel_gyro.c
This commit is contained in:
johan9107 2016-11-21 11:19:19 +01:00
commit eb28c1bb75

View File

@ -588,8 +588,10 @@ void mpu6000_read_angle(accel_t* accel, gyro_t* gyro)
float a_PitchAngle = atan2( accelConv[1], sqrt(accelConv[2]*accelConv[2] + accelConv[0]*accelConv[0]))*180/M_PI;
//Check how much the accelerometer angle differs from the current calculated ange with the gyro. Add calculated factor to the real angle value
accel->rollAngle += (a_RollAngle - accel->rollAngle) / GYRO_ACC_DIV_FACTOR;
accel->pitchAngle += (a_PitchAngle - accel->pitchAngle) / GYRO_ACC_DIV_FACTOR;
}
}