Gyro and North

I need to know the value angle of device wrt the north (only yaw rotation on y axis in unity).

I know there is a compass in unity, but its value is affected by noise.

My question is: The Input.Gyro include also the compass? And so, its value is an absolute value wrt north direction?

If yes, how can correctly use the gyro with its attitude output vector?

Thanks!

No… a gyro just logs rotational information for the device; e.g. it has no knowledge of absolute directions and it’s relative rotation to them. That’s literally what the compass functionality is for. It’s affected by noise because that’s what the sensors are actually receiving. Any real world input is going to have noise to account for.