I have been working with MPU6050 for a while now but I'm not able to understand the values that my gyro sensor gives me is with respect to what? I know its relative to something but with respect to what?
Moreover, I have read that magnetometer gives me absolute value, but I see that it gives the value of magnetic field along the three axes with respect to earth magnetic field, then this must be relative too, right?
Gyro measurements are meant to give you rotational velocity readings (angular velocity readings) of an object .... around a particular axis. Eg. change in an angle over some relatively short duration of time.
If you're on a merry-go-round spinning at some relatively constant angular speed, and the gyro located at the axis of rotation tells you some angular velocity, then usually it's relative to ZERO radian per second.
As for the magnetometer...... if you have three axes, and if the magnetometer is calibrated, then whatever field components that are measured will result in a 3-dimensional vector. If you move your magnetometer, that vector is certainly going to point in some other direction (relative to your magnetometer's local coordinate system). But if you don't move your magnetometer, then that vector will just stay put, unless the external magnetic field changes.