Quick question for you guys. I have been trying to get rid of the inconsistent compass message for a couple days now. I am new to the Pixhawk came from librepilot, so I am learning. Anyway I had to mount my pixhawk sideways. So in relation to the front of the copter it is rotated 270 degrees clockwise. So I set AHRS_ORIENTATION to yaw 270. Then I re-calibrated everything. Then I got to thinking. The gps is pointed arrow to the front. I am using a uBloxNeo M8N. Compass 1 under Initial setup--->Compass is set to Rotation_Roll_180, obviously because the mag is on the bottom of the chip.
Should the compass be pointed the same direction as the pixhawk? Or, should I change/can I change the rotation of the compass to match the pixhawk? The other option is I am just way off base here and need to be slapped.
Any help is appreciated.
Replies
OK as long as it is not necessary I guess I will just leave it disabled. The only time I have the compass variance message is when the internal compass is enabled. Otherwise Its fine.
The internal compass is not really necessary and because it is usually closest to DC power cables it often has higher offsets or gets affected when in flight. The external compass however is necessary and the copter will fly fine with it as long as it's separated from power cables or power sources. Early APM's only had an onboard compass and there were lots of problems, "toilet-bowling" being the main one.
Not sure about getting rid of the compass variance problem, enabling compass_learn sometimes helps, otherwise just experimenting with rotation. Note that even without a compass the HUD compass bearing will still appear to be working due to inertial navigation functioning even for yaw.
No one has any thought on this?
So I've learned that with the pixhawk you do not have to set Rotation to Roll-180 for units that have the compass upside down. When I first set up the pixhawk it automatically set the rotation to roll 180. So after setting it to none external compass works correctly.
That being said if I enable the internal compass I get the compass variance message and cannot arm. So I have to keep the internal compass disabled which I really would like to have it enable for redundancy, also it just seems inappropriate to disable a sensor. I have the pixhawk mounted at the very top of my quad so it is away from major sources of EMF. it sits about 2 inches lower than my GPS puck. I dont have any issue with EMF and the external mag.
All that being said what do I need to do to get rid of the compass variance so I can use both compasses? If I cannot get it working can you notice any change in flight stability? Does it affect the quads ability to hold a heading in any way? Or anything else?
One more thing. I have even tried to disable the internal compass. Now I get a green flashing led but as soon as I move the quad it displays a compass variance message. If I keep the quad pointed north EKF stays white and no errors. As soon as I move it away form north its goes bad. I am even getting a fast flashing greet which i guess is SBAS.
I have checked the mag inside the GPS and it is pointed in the correct position the arrow is really the front. I am confused why am I still getting a compass variance with internal compass unchecked?
I was reading the wiki and it said "If your external compass is in a non-standard orientation, you must manually select the orientation in the combo box (change from
ROTATION_NONE
). Compass orientations are relative to the flight controller, not the airframe!"So my compass is set in the standard orientation "arrow point forward" But it also says that orientation are relative to flight controller not frame. So if that is the case then it would be 90 degrees clockwise......is my thinking correct?