Adventures with a Reach M2 Intergration to Pixhawk

A few days ago i created a thread about my M2 purchase ( Reach M2 + LoRa and Reach RS2 Problem - #20 by tonyantzoulatos) that was busted out of the box.
Decided to get a second unit along with an emlid antenna just to see if we could make it work and dont need to cry also over the RS2 money we got with it.
Second unit worked, only to find that no matter what the docs and community said it simply did not want to work with a pixhawk. IT WOULD NEVER FIND IT AS GPS2.
After being at it for 3 days i decided to take the docs, trash them and DIY the s*** out of it in terms of ardupilot settings. After testing GOD knows how many combinations i finally got signal on GPS2.
I repeat my setting are not even close to the docs. Check the video Emlid Reach M2 - YouTube

At least on this thread i would appreciate a responce from emlid that makes sense.
P.S.: On my tests i tested cube black with std carrier board, orange with adsb, Cube purple with mini and a 3DR pixhawk as seen on the video. With this setup it worked with all.

And here is Test Two Emlid Reach M2 take Two - YouTube
My post was edited by emlid (i dont know why) but no one responded.

As an update to my post and also to the emlid ReachM2/Lora Documents, here are my two pennies.
(@rcdevil Read this post) Concerning M2 as a rover, tune the following:
a) Make sure that on Base setting its OFF.
b) Correction Input you setup lora properly (i use lora) and in case you want Telemetry for correction input serial with proper baud rate
c) Output set you Serial setting properly
This is M2 settings.
Ardupilot settings(i did my testing on Rover code):
a) GPS_TYPE2 ->1 blending and all other settings as per docs.
b)Serial4_Baud -> 57 (this is what i setup on M2)
c) Serial4_Protocol ->5
When you boot your Pixhawk, Cube or Orange, make sure you have open sky and you will see signal on GPS2 as soon as it has enough satellites for a FIX. If you test indoors you will not see an active GPS (most likely some firmware issue from emlid)
These are my finding and my posted videos are with these settings.

Hi @tonyantzoulatos,

We’re constantly tracking changes in ArduPilot software and our users’ reports so that we can keep our ArduPilot Integration guide up to date. We also test the changes before we push it to docs.

However, I’ve just noticed that in our guide we suggest choosing ERB in M2’s Position Output and NMEA in MP. I guess it might be the reason for the difficulties you faced and we’ll address them shortly.

Also, I’d like to comment on some points you outlined.

It’s indeed useful to turn off the Base settings on your rover device; however, it shouldn’t make any difference in terms of position output configuration.

May I ask you to clarify whether you set up ERB protocol in Reach M2 settings?

We usually recommend choosing the format that was specified in the Position output. For example, if you have chosen NMEA, you should specify 20 in this parameter.

Dear @tatiana.andreeva,
On my original video i simply said that i set seria4 protocol to GPS and Gps_type2 to 1 which is Auto.
Quoted from your docs about rover you say:
Now configure position output:

  • Select Position output tab
  • Select Serial
  • Choose UART or USB-to-PC as the device
  • Choose the desired baud rate (38400 for default)
  • Choose ERB as position output format
  • Hit Apply button button to save settings
    I did not say EBR, emlid did! and with emlid asking to set protocol on pixhawk to NMEA it was sure it would not work. My settings came out of being upset and pressed with time to make it work since weather will not be good in the following days and i needed to be able to test.
    And yes, as per your docs my M2 is set to ERB. As per your Reply: “We usually recommend choosing the format that was specified in the Position output. For example, if you have chosen NMEA, you should specify 20 in this parameter.” your docs clearly say ERB.

About Base setting, all the time it was ON. Nothing worked, so my guess is that it needs to be off.

I have a feeling that you did not watch my original video and did not read all my posts, or it was simply a bad explanation from my side because i can see that i said different things compared to what you say.
Last but not list, i have a different brand RTK and i can verify that nothing has changed to the ardupilot code concerning RTK, since those work flawlessly and as described on manufacturers wiki on the first try.
I can definitely say that in my case your docs are both wrong and missing info. Which is unacceptable the moment you ask almost 2.6k usd for your product.

Regards
Antonios

@tatiana.andreeva
Asan update i can say now that if you make the output NMEA (not ERB as per docs) and also ardupilot as NMEA, again it works. Still i dont see the 20+ sats that i can see on the emlid app, but i get rtkFloat.
Is there a way to see all sats on MP, under GPS2.

Hi Antonios,

Yes, as I’ve mentioned above, there was an inconsistency in our guide: we suggested to set up an ERB output at the beginning and then continued working with the NMEA. We’ve already fixed that in docs, so it should not mislead our users any further.

The configuration you suggested in the video should work fine too. We’ll add info about the possibility to use it in the future.

Could you share the screenshot from the rover’s Status Page? I’d like to check how many satellites the base sees.

@tatiana.andreeva if you need me to boot up again and make pictures i will sure try, but if you ever watched my videos, you would see that i am showing 8/9sats on MP and i do show Reachview screen showing 27 or something.

hello, what did you recommend here?


use best or blend?

hello, what did you recommend here?


use best or blend?

Make sure you either have set NMEA or ERB both on M2 and your pixhawk. as about autoswitch i have not tested outside but from past experience blend but at the moment i was using 2pcs of high quality M8N and i did not not to see my UAV jumping around depending which is best. Now that the primary is an M8N and the second is the RTK with position fix, and since i am testing on a Rover i will go for UseBest. Did this setup work for you?

Hey there!

@tonyantzoulatos,

We’re checking what might be wrong here, I’ll write back once we have any update.

@rcdevil,

I recommend working the Use best option.

Hi Antonios,

Both NMEA and ERB protocol’s messages contain the number of visible satellites by the receiver, although there’s no obvious way to display it in Mission Planner.

Mission Planner displays only the number of satellites involved in calculating the position. Not all the satellites visible in ReachView can pass applied SNR and angle masks to be considered reliable by the RTK engine.

Even though you had only 8 satellites involved in calculating the position that was enough to achieve a float solution, which means sub-meter precision.

@mikhail.goryachev Thank you for your reply. I must say that your explanation makes total sense to me.
My problem is that after being able to solve the emlid mistaken documentation and make it work, now i am facing a different problem.
On my MP i get a GPS2 status 1-2-3 or even 5 depending the status of the emlind but in 50% of the cases i get status 0, which means my pixhawk does not find the M2. 90% of the times this happens it does not find the m2 even after a total reboot. I tested with different M8N & P sesnors on my GPS2 and they were always found, which means that there must be some “bug” in the communications which triggers the problem. I tested speeds from 38400 all the way to 115200 but this 50-50 problem occurs. Any ideas on this?

Hi Antonios,

The GPS status depends on the solution calculated by Reach. When gpsstatus drops to zero, Reach has either no positioning solution or/and Pixhawk does not receive the positioning data.

One possible cause for this behavior is baud rate mismatch. Which protocol and baud rate do you use for position output on M2 and in Mission Planner? Can you try setting all baud rates to equal values (Serial 4 baud, M2 position output baud and Mission Planner connection baud) and see if it helps?

@mikhail.goryachev
Since I had originally typed the solution in order to correct the docs, I would suspect that I am using either nmea or erb. I have found nmea to be more stable. As about baud rate I always have equal and never mismatch of it’s 115 on m2 then I have the same on pixhawk. Same with 38 or 57.
Now if I have m2 connected to a base then in theory it needs base says to solve and give me the count. But if I have m2 as standalone, shouldn’t I be getting a simple gps fix and sat count?

Hi Antonios,

Yes, you are right. When the receiver has whatever solution it will output the position data. In Mission planner it’ll be at least 3 (Single). And the satcount will surely be greater than 0.

Can you try using the ERB output format at 57 baud, just to make sure? Also, the MP parameters:

  • GPS_AUTO_SWITCH = 3
  • GPS2_TYPE = 1
  • SERIAL4_PROTOCOL = 5
  • SERIAL4_BAUD = 57

Then we’ll see if the issue remains with an ERB option when the autopilot is using only GPS2.

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