/* Apply stored offset values to sensor reading. 
This function applies stored calibration offsets to the "input" vector of magnetometer values (the magnetic field vector) and returns the modified values. The offsets are calculated based on sensitivity-adjusted readings, so this function should be used after the values that have been adjusted using hmc5883l_apply_sensitivity(). */
static void hmc5883l_apply_offset(vector3_t *input)
/* Apply stored offset values to sensor reading. 
This function applies stored calibration offsets to the "input" vector of magnetometer values (the magnetic field vector) and returns the modified values. The offsets are calculated based on sensitivity-adjusted readings, so this function should be used after the values that have been adjusted using hmc5883l_apply_sensitivity(). */
static void hmc5883l_apply_offset(vector3_t *input)
{
	input->x -= cal_data.offsets.x;
	input->y -= cal_data.offsets.y;
	input->z -= cal_data.offsets.z;
}