Usable compass

I am developing an autonomous boat, using Navio2 which is looking OK except I cannot get the heading or the bearing the boat is pointing in. Is it easier to get a separate compass product to use with the Raspberry Pi or does the Navio2 have a working compass and I just not found it yet?

There are two compass onboard. Pay attention to place your navio board away from ferrous or magnetic parts and perform mandatory calibration.

Thanks for the advice. I am struggerling getting the calibration software to work as I use an Apple Mac. I do not have a Windows box. Have not found any links to run it on the Raspberry Pi or Apple Mac. Will keep looking.

QGroundControl should work. I will try later and keep you informed.

QGroundControl is fine:

After calibration

Heading is working

Capture d’écran 2020-11-05 à 19.04.43

1 Like

Hello, have QGroundControl working on Mac now. What has to run on the Raspberry Pi to allow connection. Not sure what port to set. Thanks

Follow https://docs.emlid.com/navio2/common/ardupilot/installation-and-running/

then when setting launch option open

pi@navio: ~ $ sudo nano /etc/default/ardurover

and use the IP of your Mac on the network.

Hi, have now figured it out thanks to your help. Am now working through calibration. Many thanks

Hi, now trying to figure out how to get the actual compass bearing. When I look at the Python example AccelGyroMag.py I get this
Accelerometer: [-0.19153613281249998, -0.6560112548828124, 9.662997900390625]
Gyroscope: [0.0010642242547425475, 0.02128448509485095, -0.0010642242547425475]
Temperature: 55.76529411764706
Magnetometer: [-5.956640625, 20.7421875, 33.074999999999996]
Not sure how to turn this result into a bearing. Using the QGroundContol I can see it works very well. Any advice?

Are you going to write your own control software, or do you want to use arduboat?

Hi. The boat will be fully autonomous and spending months at sea so need the boat to have its own software

Although using Navio2 is very help full. I do not need to worry about sorting out all the small bits which make up Navio2 so from a developer’s point of view, the HAT is great. I just need to figure out how to get the compass bearing. When I use the QGroundControl it shows the compass bearing perfectly so it must be possible from within Python3 to get the same level of accuracy. We plan to build and send a few hundred of these small autonomous boats into the oceans and it is easier to buy Navio2’s then all the little bits.

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