I have a question about raw data correctness. I read raw data from magnetometer. I reached following results after rotated this around Z axis in horizontal, flat plane, data are expressed in gauss:
Red - X data, Green - Y data, Blue - ellipse.
I know that this data set isn't correct. I see that parts of data set are flipped. When I converted it (moved parts of sine and cosine), I reached following results:
It looks more correctly than previous chart. What is the reason of data distortion from first picture? I used X-NUCLEO-IKS01A2 Motion MEMS and Environmental Sensor | Mbed to collecting data from sensor. I assumed that this library is correct.