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?
This is not a firmware issue, this is an electromagnetic interference issue. Move your GPS antenna and receiver away from other electronics and cables.
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?
All I see in the log is the GPS is re-detected well into the flight. Why don’t you update to latest Stable Copter, perhaps there will be more error messaging.
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.
Basically, you say that there is nothing solid to conclude anything from all the 4 logs and perhaps updating to the latest stable copter version is the only way to go?
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.
You have given a new dimension to the issue. But before that, I have few questions:
First of all, you asked to update the firmware from 2.0. to 3.01. Anything specific to this problem or just a general update?
I see that Serial3 baudrate has been set 38400 but when I see the log it says the GPS is detected at 115200. I am bit confused about it how exactly things are working.
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
for.
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.
I will set the Serial3 speed at 115200. But again coming back to the initial query, we have still not been able to find the root cause of the sudden loss of satellites for approx. 12 seconds.
Yes…seems like communication failure or GPS failure or could be anything…
I guess what @dkemxr has suggested (to update the firmware and check for more error messages) is the only hope left.
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.