Navio2 Compasses not available

UPDATE: I guess compass data is not displayed in the Compass setup page of MP. However, looking at my heading in Flight Data, I can see my rover rotating with pretty good repeatability (with GPS unplugged so I know the orientation is not from GPS). However, it has a constant 90deg offset and I can’t do a successfull calibration.

My main questions are:
For default Navio2 internal magnetometers, what are the recommended compass settings?

  • COMPASS_USE/2/3
  • COMPASS_ORIENT/2/3
  • COMPASS_OFS/2/3_X/Y/Z
  • COMPASS_CAL_FIT
  • COMPASS_OFFS_MAX

I can’t find any documentation on default compass setup for Navio2.

ORIGINAL POST:

Connecting to Mission Planner, I don’t see either compass data available (see screenshot below.) This is causing “Bad AHRS” and preventing Auto Mode.
(Connecting through UDP and I’ve enabled compasses and . No other devices connected except for the power board.)

When I run $i2cdetect -y 1 I only see one device on 0x77. Everything else is --.

However, the Python and C++ example for the IMU show mag data coming from both mpu and lsm, all checks pass running emlidtool test including lsm9ds1 and mpu9250, I see devices spidev0.0 through spidev0.3 in /dev/, and dmesg doesn’t contain any errors/warnings related to I2C or SPI, so In those regards I conclude that both devices are working and can communicate.
Also, the GPS is working just fine, as do SiK Radios when I plug them in.

In /etc/modules I have spi-bcm2835, i2c-bcm-2835, spi-dev and i2c-dev.

Other info:
Navio2 on Raspi3 running Ardurover 3.4 kernel 4.14.34-emlid-v7 RCIO FW 0xb09979ae

Outside I can get good GPS-based orientation, but it has a constant offset that I can’t get rid of, similar to: NAVIO2 - Inconsistent Compass Problems - #2 by mr337 and Compass orientation + AHRS Orientation

In the meantime I modified the Compass/AHRS thresholds as large as possible hoping to allow Flight mode change anyway - no luck.

I feel like I’m missing some very simple configuration somewhere. Ideas?

Hello,

I had a look at an old Navio2 log.

Compass_use is 1 for both
Compass orient is 0 for both
Compass_ofs are determined after compass calibration. One of the compass has high offset (>500). You can disable it when calibration is done (I did not).
Compass cal fit is 8
Compass offset max 850

RMK:
There is no compass in the GPS antenna,
Compass are not on the i2c bus (unless you plug an external one)
On the MP compass setting page, both compass 1 and 2 are internal (uncheck externally mounted) and there are no orientation change needed.

You need to calibrate compass (do reboot the card after calibration to save the values) to solve compass problems.

This is my latest param file with an external compass, with latest Emlid updates.

COMPASS_AUTODEC,0
COMPASS_CAL_FIT,16
COMPASS_DEC,0
COMPASS_DEV_ID,393730
COMPASS_DEV_ID2,262402
COMPASS_DEV_ID3,466441
COMPASS_DIA_X,0.9402956
COMPASS_DIA_Y,0.9787785
COMPASS_DIA_Z,1.029064
COMPASS_DIA2_X,1
COMPASS_DIA2_Y,1
COMPASS_DIA2_Z,1
COMPASS_DIA3_X,1.049581
COMPASS_DIA3_Y,1.002743
COMPASS_DIA3_Z,1.016993
COMPASS_EXTERN2,0
COMPASS_EXTERN3,1
COMPASS_EXTERNAL,0
COMPASS_LEARN,0
COMPASS_MOT_X,0
COMPASS_MOT_Y,0
COMPASS_MOT_Z,0
COMPASS_MOT2_X,0
COMPASS_MOT2_Y,0
COMPASS_MOT2_Z,0
COMPASS_MOT3_X,0
COMPASS_MOT3_Y,0
COMPASS_MOT3_Z,0
COMPASS_MOTCT,0
COMPASS_ODI_X,-0.02128154
COMPASS_ODI_Y,-0.006373678
COMPASS_ODI_Z,0.01618336
COMPASS_ODI2_X,0
COMPASS_ODI2_Y,0
COMPASS_ODI2_Z,0
COMPASS_ODI3_X,-0.0513324
COMPASS_ODI3_Y,0.002944919
COMPASS_ODI3_Z,0.01913787
COMPASS_OFFS_MAX,850
COMPASS_OFS_X,-300.7088
COMPASS_OFS_Y,7.723143
COMPASS_OFS_Z,-31.26195
COMPASS_OFS2_X,-259.3043
COMPASS_OFS2_Y,-576.1479
COMPASS_OFS2_Z,208.871
COMPASS_OFS3_X,-45.22305
COMPASS_OFS3_Y,27.51953
COMPASS_OFS3_Z,-61.37689
COMPASS_ORIENT,0
COMPASS_ORIENT2,0
COMPASS_ORIENT3,8
COMPASS_PRIMARY,2
COMPASS_TYPEMASK,0
COMPASS_USE,1
COMPASS_USE2,1
COMPASS_USE3,1

Marc

Hi @danfitz7,

Was @mlebret advice helpful?

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.