Can't use second compass in ArduPlane

Hi,

I am working with the Raspberry Pi 3 and Navio 2 and I am using a 2m glider. So, I followed all the steps from the docs,but I had a problem running ArduPlane, when it get GPS signal, ArduPlane crashes. To validate this problem, I start the program inside a building without GPS signal and all works fine, but when I take out from the building the glider and when it received GPS signal, the program crashes. Vehicles like ArduCopter-quad is running normal without problem.

Also, when I tested Arduplane without GPS signal, I only see one compass (compass 1) and the Mag calibration stops at 99%, so looking in this forum I found a similar problem but with ArduRover, so I update and upgrade and also download the ArduPlane.elf, but both problems continue.

Regards, Jorge.

Hi! We’ll try to repeat the issue. Meanwhile, could you please make a log when this happens and upload it here?

Hi, Thank you for your support, I am trying to upload the tlog file, that I get it from Mission Planer, but I can’t do it, because the page give me a message “Sorry, new users can not upload attachments”, also, I don´t know from where to download the log file from raspberry, sorry about that.

Looking more in to the problem, by the finally of the telemetry log I listen “U-blox0 is not mainteinig the 5 Hertz of data”, after this message ArduPlane Crash.

@jlhernandez log files on Raspberry are located in /var/APM/logs directory. You can upload files to Google Drive or Dropbox and give us a link.

Hi @mikhail.avkhimenia, here is the link for the telemetry log, I looked for the logs in the Raspberry but there aren’t any file. I will make new tests, trying to obtain the logs files from the Raspberry.

@jlhernandez we tried to reproduce the issue with current version of ArduPlane from our deb package and it does not crash when obtaining the fix from GNSS receiver. Could you please take another SD card, write our image, upgrade it and run ArduPlane again?

@mikhail.avkhimenia I took another SD card and I repeated all the process since the begining. All was ok even with the GPS fix and Arduplane didn’t crash, after this I started to make the mandatory hardware, first I did the accel calibration (it was succesful) after this I did the compass but when I did it, I had the next error

After this message, I had the same problem when GPS adquired, ArduPlane crashed. When I was calibrating the compass, I selected as primary compass, the compass 2 and then I click the Start button in Onboard Mag Calibration tab, when I did it the message appear.

Issue with Mission Planner seems unrelated. I suggest upgrading and reporting the bug to MP bugtracker if the problem persist even after upgrade.

It’d be very helpful if you could share with us how exactly the program crashes (some kind of screenshot would be nice).

I’m looking into the compass calibration problem as soon as possible.

@george.staroselskiy Here are some screenshots of the process that I did, First, I format completely the SD card and made all the procedure, as you can see in the image below, all is function ok and the GPS is fixed.

But when I started making the compass calibration, in this case I deselected “Use this compass” in Compass #3 block, and also I think that I do not have the compass 2.

After few seconds of begining with this calibration, the program crash like the next image.

When I tried to run it again, it just stop after few seconds.

Again I formated the sd card and written a image when all is function, but this time I sended the telemetry data with the uart port, all works good and the gps is fixed, as you can see.

In this case when the program crash, it just send the word Putty several times, and when I tried to run the program again, it started normally as you can see in the image below and then the program crash and send me the word that I told you.

Hoping this screenshots, will be useful, and again thank you for your support.

The ArduPilot definitely cannot output “Putty”, it must be coming from the computer’s side where Putty is running and seems that it sends symbols on itself which may be a cause of such behavior.
Could you please try another SSH client?

@mikhail.avkhimenia I tasted another SSH client (KiTTY), the results are similar but instead of saying Putty , it output Kitty, also I tried ArduCopter-quad and all works great. I did a fast compass calibration and it go fine, the program didn’t crash during or after the calibration.

Ending with that test, I tried to do the same with ArduPlane and the results are the similar the programm crash.

Also I initialized ArduCopter-quad sending the telemetry from the UART port and it didn’t output Putty, I attached some screenshots.

AFAIK Kitty is a fork of Putty so it may be having the same problem. Run ArduPlane with & in the end of the command - it should go to the background and stop accepting anything that is typed in the terminal.

I suggest running like this:

sudo nohup ArduPlane -A <> &

This is a more proper way to run a background process and ignore the input.

I ran ArduPLane, with the command you suggested and it started good but it have the same problem, after few seconds of initialized the program crash, like in the past. Also I tried to run ArduPlane with Ubuntu, ArduPlane crash in the same way, after executing some kind of compass calibration and after that and rebooting Arduplane, it stops after few seconds, below I insert a screenshot using Ubuntu.

In the other hand, I still running ArduCopter-quad as a comparison, to be sure its not a hardware issue.

I made some test and I observed that when I activated compass 2 as primary reciever is when ArduPlane crash, because when I used compass 1 for that function ArduPlane works correctly. I couldn’t make a good calibration the offset values are too high, also when I did the onboard calibration it stops in 0.99%, this are some screenchots.

@mikhail.avkhimenia @george.staroselskiy, I made some new test with the navio 2. I can use the on board mag and the live calibration but just with the compass 1. It seems that the compass 2 don’t send data.

Also, I used the ArduCopter-quad version, in order to test some hardware errors and I could obtain the both compass measures.

I have a question, Can I fly with just one compass or is too risky?

You could even fly Arduplane without a compass.
Since an airplane always moves forward it can use GPS course to get a heading. Only Arducopter and Ardurover need a compass, because they can hover/ stand still and, in case of Arducopter, move in any direction, so they reliably need to know where the nose of the vehicle is pointing.