I have something unusual going on with the drone. It’s a very random issue.
While the drone is flying, there seems to be sudden loss of GPS for around 12 seconds and then the GPS is regained.
Things I have tried:
After the first occurrence of above-mentioned event, I changed the GPS module.
After the second occurrence, I changed the pixhawk.
Double, triple checked the connection, and everything seems fine.
I have not been able to find the root cause of such issue. There have been such similar issues mentioned in this discussion forum, but no concrete reason has been provided. Just wondering could it be a firmware issue or some compatibility issue with this particular GPS module?
Can you confirm this by looking at the log? Why am I asking this because even if I move the GPS antenna and receiver away from other electronics and cables, how could I be sure that there won’t be any sudden loss of GPS further?
Can you explain this phenomena a bit more? Why there is only a interval of 12 seconds for which the GPS gets lost?
Perhaps updating the drone to the latest stable copter version and looking to more error messaging might able to help me to find the reason behind it but is there a way to diagnose the issue with the current firmware version. I mean by looking at the logs or by the past experience.
I looked at the logs. GPS Status and Sat count go to zero for longer than 5 seconds triggering EKF failsafe and Land. Then it reconnects. Faulty GPS, faulty connection, something in that old version of firmware, don’t know.
From looking at the log, you need to check the GPS internal settings with UBlox utility, Update the firmware of your GPS chip (2.0.1 to 3.01) set UART speed to 57600 or (better)115200.
On your Pixhawk, serial 3 (GPS) is set at 38400. That speed is too low to for the M8N with two satellites systems (GPS+GLONASS+SBAS) defaults. Your problem look like a buffer overflow. Set the serial speed the same as the GPS UART.
It should work like that but I am not sure about it being a generic message. If it is detecting 115200, then it must be fetching it from the GPS.
I was going through the source code of Ardupilot:
Lines (516 to 520) states that
running a uBlox at less than 38400 will lead to packet
corruption, as we can’t receive the packets in the 200ms
window for 5Hz fixes. The NMEA startup message should force
the uBlox into 115200 no matter what rate it is configured
I have experimented 2 things.
First, I tried connecting GPS directly through FTDI cable and checked Autobauding option in u-center. It was always connecting at 9600.
Then, I tried connecting via Pixhawk and checked again Autobauding option in u-center. It was always connecting at 115200.
Try stick aluminum foil under the GPS. We do this on all our production models and we find that it increases the GPS count by at least 5 sats.
Also update firmware to 4.07 if you are using arducopter.
I believe this helps as it addressed a memory issue.
The reasons can be of two types - internal and external (if there are guaranteed no mechanical defects and wire breaks). Airborne radio equipment emitting at frequencies (or their harmonics) GPS can disrupt the reception of satellite signals (video 1.2-1.3 GHz including). Also, now there are many civil and military systems for jamming GPS, you may have encountered them. What is absolutely certain - this is not a problem of firmware and bodrate.