Updated from hmc5883l fork