Unable to see GPS2 when primary GPS is using CAN

Hello everyone,

I would like to know about the ability to use 2 GPS on Arducopter 4.05, one connected to via CAN and the other to Serial4/GPS2 on a Cube Orange on a Standard Carrier board.
It seems to me that using a primary GPS via UAVCAN and a secondary via Serial4/GPS2 does not work, while a primary GPS via GPS1 and a secondary via GPS2 works fine.

My setup and what I’ve tried so far :

My goal is to have a RTK GPS (Emlid Reach M2) as a secondary GPS on Serial4/GPS2, and a Here2/3 as a primary GPS.
The reach M2 is only connected to the autopilot using its RX/TX, while its power comes from an external 5V stable power source.
A Reach RS2 base is connected to a Wifi Hotspot and sends corrections to MP via the GPS/RTK Inject tab. Corrections are then sent to the autopilot via telemetry through a UDCPI connexion to a Herelink (which is also connected to the Wifi Hotspot).

I have achieved RTK positioning on GPS2 when the M2 is connected to serial4/GPS2 and the Here2 to GPS1. Quite simply, when the Hotspot/base/rover/Herelink/GCS are set, I can quickly see GPS1 and GPS2 on MP and the RTK Fixed status.

However, when following the same setup but using a Here3 connected via UAVCAN, MP does not detect any GPS2.
Its status stays at 0, and I cannot see any RTK corrections when connecting to the M2 via ReachView.
The GPS1 works fine though.

My research :


This thread in the Emlid Community Forum suggests that I am not the only one to have seen this problem.

Also, looking through the ArduPlane release notes, you can read : “fixed use of UAVCAN primary GPS with UART secondary GPS” (in the 4.0.1 release), which looks like my question being answered, but nothing similar can be found in the Arducopter release notes.

Final question :

Am I missing something in my params in order to achieve this ?
Is this a common problem and will it be fixed in the future ?
Am I doomed to use only Serial connexion for my primary GPS (that would be sad, seeing as the CAN connexion is the future) ?

Thank you for reading, I am looking forward to discussing this topic with you all.

Regards,

Baptiste

Please raise a bug on Github. I also had this issue and can confirm that this is a bug

Have you set the boot delay parameter? Just curious if it makes any difference.

I did not try (BRD_BOOT_DELAY =0) , but what change in behavior would you expect from this fix ?

Use about 3000 or 5000 to give 3 to 5 seconds boot delay. This was specifically added to allow external devices timeto boot up.

We did something similar like this and it worked. Apparently without main GPS configured on gps1 port you can’t clear failsafe. So what you can do is to uncheck GPS configuration from the checklist required to arm your drone.
Our problem was that our GPS port1 on cube black was damaged and we had no choice but to use GPS port two or CAN port. But we would get missing GPS configuration error. However the drone can perfectly get all satellite info using GPS port 2. But without GPS signal coming form port 1 we weren’t able to arm the drone. So we did unchecked GPS configuration.

Okay, I will try it, but I wonder why the M2 or Here3 would need more time to boot if it manages to do so without boot delay when the Here2 is on GPS1.
Anyway, I might be surprised !

If I understand correctly, you are suggesting that we try our setup like this :

  • Here3 connected to UAVCAN
  • Reach M2 connected to Serial 4
  • Cube params set to configure GPS1 and GPS2
  • removing the GPS check on the prearm checklist

From what I remember, when using Here3 via UAVCAN and having a prearm check on GPS, the drone would allow us to arm and takeoff, it was just not showing any GPS2.

I will also try your fix and let you know.

May I know what’s the value parameter GPS_type2? I’d suggest put both on auto and then see if you get GPS lock from both GPS on the main page. Also don’t remove GPS from prearm. uncheck GPS configuration only if you are getting missing gps1 configuration error