Help pixhawk & gps

Hi, I have some issues with my Pixhawk and I need your help!
1 - It is supposed that the gps contains a compass for orientation that is the one usually is used in flight apart from the Pixhawk, but when I turn the gps the orientation does not change, that is to say, that the only one is working is the compass of the Pixhawk. How can i set well the compass orientation of the gps?
2-The arrow that indicates the orientation is displacing slowly towards the north without me to move nothing, what it does that when I point another direction, is not pointing correctly because it has moved previously.
3-The arrow of the gps track (black arrow) moves constantly around the drone non-stop, I don’t know what does indicates this arrow, or if it affects to the flight somehow, but it seems strange.
4-The values of height, speed. . . change very much being the Pixhawk without any type of movement or vibration.
Here you have a short video to show you what I told:
PD: Sorry for my poor english

Not sure why your compass is not working, but I can answer your other questions.

2 - This is due to gyro drift. The gyros are not perfect, so they usually sense a very small rotation at all times. Other sensors are used to ‘trim’ the gyro readings to compensate for the drift - in this case, the compass would help keep the heading from drifting, but the Pixhawk is not getting good compass data, so it can only use the gyro.

3 - The GPS track will jump around a lot when you are sitting still because the GPS location moves around slightly. If you zoom in on your map, you will see the copter moving around a little bit, and the GPS track will point in the direction it moves. This will not affect flight, and the GPS track will be accurate when the copter is moving in flight.

4 - These numbers are partially based on GPS readings. They will change slightly as the Pixhawk sits still but the GPS location wanders around. This is normal, and the readings are quite accurate in flight.

EDIT: Are you getting any “Bad Compass Health” warnings?

No, I don’t have bad compass health.
Now I see that the offsets of the compass 1 are on red color and the offsets of compass 2 are on yellow color, why is that?
And how can I solve the orientation problem? (2)
Thanks for help.

I think Mission Planner color-codes the offsets based on how “good” they are. Lower numbers are better, but red or yellow does not necessarily mean that the compass won’t work, it just means that there may be magnetic interference from nearby electronics.

The orientation problem is not really a problem unless it is changing rapidly and continuously in one direction. The heading changes in your video seem normal, although maybe the video is too short to show what you are describing.

Also, I realize that I misunderstood your initial post. Your compass is probably working just fine. However, if you move the GPS module without moving the Pixhawk, you may not see a change in heading, because the Pixhawk is using both compasses, plus the gyros to sense heading changes. It is rejecting the GPS module’s compass readings because they do not agree with the gyros and Pixhawk compass. This should be visible by clicking the white “EKF” text in the mission planner HUD. In the window that appears, the Compass EKF meter will increase if you turn the GPS module while not turning the Pixhawk. This is a measure of compass variance - that is, how much the two compasses (and gyros) disagree.

If the compass calibration succeeds with both compasses enabled (you will see data points being collected for both during the calibration), then your GPS compass is working. To get better offsets, try to mount the GPS module far away from other electronics, this will reduce interference.

Here I send you an image of the compass offsets, but sometimes it changes color, don´t know why, and a video to see the stats of EKF when moving the gps compass (doesn´t work) and you can see the drift of the orientation I said.
The compònents are a Pixhawk PX4 v.2.4.5 and an Ublox M8n.

Ah, yes, I see. In the compass calibration screen, you can see the Compass #1 offsets are very big numbers. Generally, they should be smaller than ±400 or so, but it shows your offsets are 538158, 194091, etc. At the beginning of the video, it shows an error on your HUD: “Compass offsets too high.” Arducopter seems to realize that the compass offsets are bad, so it is probably not using that compass at all, which is why moving the GPS module around doesn’t affect anything.

I have never seen offsets like that before, so I’m not really sure what could solve the problem. Try calibrating the compass again, and make sure that the GPS module is not right next to any other electronics - taping it to the top of the Pixhawk like in your last video might cause interference with the magnetometer. You can tape them together with something between them like a block of wood or a small box.

If you can’t get the compass to calibrate with smaller offsets, then it may be a defective GPS module.

Hey Anubis, I calibrated well the compass and now it´s all working, but a few days ago, I did a test flight and the gps positioning is unusable. Why it may be caused? Here i show a video, and also you can see the sats signal variation:
Thanks for help,