Maybe this problem has been there all along and it’s now more visible with the new EKF monitoring. I have a flying wing with a Pixhawk. If you move the airplane around you can watch the compass monitor in Mission Planner bounce from green to amber to red. There is no rhyme or reason. It just changes. Eventually the Compass will go full red. It won’t return to green until you reboot. It’s like the Pixhawk has crashed. I tried 4 different compasses and a 3DR Pixhawk and HKPilot. I get the same results with all.
I’ve attached a flight log with this event. Although I can’t find the event in the PX4 log. The Mission Planner tlog shows the event.
magnetometer innovation that bad usually mean the orientation of the compass is wrong. I see you have your board set to an orientation of YAW_270, but the compass is set to external with no rotation. Is the compass pointing forward in the plane? Is the autopilot pointing left?
Sorry for the slow reply. I must not have notify of reply on here…
Yes the Pixhawk is mounted pointing to the left and the compass forward. I still see this problem a lot. Recalibrating seems to help, but I’m not sure I’ve solved anything. I switched to a Ublox 8 GPS (with the same compass I think) and I seem to have less issues with compass going in the red, but it does still happen. It seems to be completely random. The plane will usually stay on course, but sometimes it will fly away until the red calms down.
-Brian
Brian - I’m trying to get my mapper kit I bought from you a few weeks configured and flying and I’m running in to compass problems too. I was about to start a thread here and noticed you already had one.
Mine’s even more strange. I’m using two M8Ns (china specials) and a chinese pixhawk. I had the board working in a quad with a single gps/compass so I don’t believe there’s anything wrong with it.
For some reason, it’s not recognizing the two external compasses.
And with the internal one, when placed flat on the ground and not moved, on the flight data screen it will show the plan slowly rotating in a clockwise direction, even though the plane/board itself is not moving. It will make a full rotation in about 2 minutes on the screen.
I’m not sure if this is a case of my hardware being a little different than what you had used in the config file you gave me or if there’s something else screwy going on with the board/compass orientation or something.
Only plug one of the I2C cables from the GPS/Compasses into the I2C splitter. The Pixhawk does not support dual external compasses (although I’ve seen COMPASS_###_3 settings. Maybe future release?).
Make sure the forward arrow on the Pixhawk is pointing left, the compass arrow is forward, and AHRS_ORIENTATION is 6.
Hobbyking airspeed sensors don’t work with 3DR Pixhawks. So there seems to be some variation of digital airspeed sensors between the different manufacturers. Can you post a picture of your setup and the .param file you’re using?
Did you just complete revamp the layout on these? I noticed you had some new documentation and then noticed the pictures all show the camera in the rear and I’m digging the cleaner cable routing.
Thinking about it now, I just pulled a fresh copy of the param file from your website. Is that the same file I would have grabbed a few weeks ago?
I installed the the clean param file and did nothing else. Watching the compass on the Flight Data screen, everything seemed normal. The compass(es) seemed to be working.
I then calibrated the accels. and did the compass calibration and immediately the flight data screen shows the plane rotating clockwise at about 1 rotation every 90 seconds. This is with it sitting perfectly still on the ground.
All looks good but I can’t see if you have one or both of the I2C (4 pin) cables from the compasses plugged in. You can only have one at a time. The 6 pin cables go to the GPS port and Serial 4/5.
If you have both compasses plugged in, then that’s the problem. If you only have one plugged in then unplug it and try the other one.
Also, that param file does not have the second GPS turned on. You need to set GPS_TYPE2 to 1.
Yes, I updated the body on the UAV Mappers. They’re thicker now and an inch longer. Yours is setup properly.
Not really. It was still doing the “rotation” thing.
Now, after sitting for over an hour, EKF still shows it yellow, but the compass actually appears to be working. Still drifting a bit, but within tolerance.
I wonder if it’s worth trying to flash back to a previous version of plane? Getting sick of having to recalibrate every time I wipe and flash, but I’d love to get to the bottom of this and get this thing up in the air!
One thing I did do, after reading some other threads, was to manually input the declination. After I keyed it in, went to the flight data screen and then came back, I noticed it was making the minutes of my manual declination number negative. I put it back to auto.
Under compass_dec my value is now -0.1294453, which is correct for my location in central NC.
I read on some other forums that people are having problems with auto declination…now I’m wondering if that had something to do with it.
I’m starting to think we may have the same problem. I thought I may have fixed it the other day as it sat for nearly an hour and the compass held steady. Today, I’m back to the phantom rotation and the compass EKF is pegged red at the the very top of the chart.