We are using a Reach RTK gps as a secondary GPS input to ArduCopter for positioning purposes on an Erle Brain 3.
We plugged in the primary GPS by USB using a ftdi (tested separately and working perfectly) and the Reach by UART.
Ardupilot confirms that it has two GPS, an Ublox one and an ERB one, both with a fix, and we saw on the Reach rover’s web interface that it had a fix before takeoff and during the flight.
The problem is that when using the Reach as a secondary GPS in LOITER mode the copter keeps shaking on all axes (roll, pitch and yaw), and starts moving erratically, in the shape of a spiral.
This problem doesn’t occur when in STABILIZE mode or in LOITER mode using only the primary GPS, but it does occur when using the two GPS at the same time or even using the Reach alone.
We read the entire docs several times and followed it to the letter, and the entire forum once.
Firmware image and ReachView version: v2.5.3-r0
ArduCopter version: 3.4.6
Thank you a lot, for this information and your work on the lib !
I am in the process of compiling your version of the RTKLIB at the next to last commit (22ee01a Fix make install paths) of your IAV branch.
If I understood correctly, I need to only compile the rtkrcv by running make in the app/rtkrck/gcc folder, adding a -march=atom to the CFLAGS variable in app/rtkrcv/gcc/makefile for compatibility with the Edison, and then replace the rtkrcv binary on the Edison by the one in ./app/rtkrcv/gcc/rtkrcv, am I right ?
I just did 4 flights today with perfect RTK GPS fix troughout the entire flights. ALL the steps are detailed in the post that I already told you about. To get this fixed faster, complain to Emlid, once they start testing and using these fixes in their official release it will get even better.
But of course: if your copter shakes and spirals with only the normal GPS then your problem has nothing to do with the secondary Emlid reach GPS
@deb0ch There is really no need to recompile anything. The spiraling issue should not be related to the Reach integration, as other users would be getting it as well. Maybe there is an issue with the Erle Brain setup?
A flight log could be helpful to diagnose the cause of your issue.
With only the normal GPS as primary the LOITER is perfectly smooth. In STABILIZE the flight is perfect as well.
What version of Ardupilot are you guys using ? I am using 3.4.6, in which ERB is supported.
What version do you guys recommend ?
Note that we are using a wifi udp link to transfer telemetry between the drone and the GCS. We could also not setup the base corrections injection with Mission Planner (followed the docs very carefully, Mission Planner was displaying the right things but the ReachRover just wasn’t receving anything), so we are sending the ReachBase corrections using 3DR radios between the two reaches directly.
Here is the log with the spirals, and the crash at the end:
Arducopter 3.4 can only hard switch between 2 GPSs. If the diffrence in position/altitude between the two GPSs is really big then the ArduCopter code thinks that the copter “jumped” and tries to correct that …
Arducoter 3.5 adds a blending algorithm where the two GPS positions get blendend for a period of 10 seconds. This allows the copter to gradually move the position between one GPS and the other avoiding jumps and instability.
But due to a bug in Emlid this blending algorithm does NOT work, accurracy information is not sent in some cases and the Arducopter GPS blending algorithm relies on that to do the decisions. This has been reported to Emlid a long time ago and I fixed it in a pull request already. That is why I told you to use my code. Is it clear now ?
By using a side channel for RTK injection, you do not loose any functionality that I described. I’ll update the docs now.