I'm really hoping that someone in the community can help a fellow drone hobbyist figure out this GPS mystery.
I have an Ardupilot Mega 2.0 (Ardupilot 2.50) with an external MediaTek MT3329 GPS (3DRobotics) to this point seemed to be working very well together. Yesterday I nearly avoided a crash when midway in a mission I started loosing my GPS lock and the plane really lost it's mind. Only by grabbing manual control (timestamp 3:49) was I able to regain some altitude and let it get it's GPS lock again. There was enough of a lock to resume the mission, but this loss of GPS really makes me worried about attempting some of the more aggressive projects I have planned. Normally I have a GPS lock of 9-10 satellites, and I'm not used to loosing GPS in the middle of a flight.
I made a video of the event and combined the Mission Planner, Telemetry, and Live View.
YT 01:59 - Cam 17:38:00 - MP 17:29:03 - Loss of GPS to 6 Sat
YT 02:49 - Cam 17:38:50 - MP 17:29:53 - Loss of GPS to 6 Sat
YT 03:14 - Cam 17:39:15 - MP 17:30:18 *** - Loss of GPS to 4 Sat
YT 03:49 - Cam 17:39:49 - MP 17:30:53 *** - Emergency Regain of Control
YT 03:50 - Cam 17:39:51 - MP 17:30:55 *** - Loss of GPS to 4 Sat
YT 04:13 - Cam 17:40:13 - MP 17:31:17 - Resume way-point mission
YT 09:17 - Cam 17:45:18 - MP 17:36:22 *** - Loss of GPS to 7 Sat
YT 09:40 - Cam 17:45:41 - MP 17:36:45 *** - Loss of GPS to 4 Sat
YT 10:36 - Cam 17:46:16 - MP 17:37:40 *** - Loss of GPS to 6 Sat
YT - YouTube / Cam - Camera Timestamp / MP - Mission Planner
Here is an image of my electronics pod:
After this near-incident I have a few questions:
Here is my telemetry log where the plane appeared to be flying "backwards" on the telemetry screen where I started loosing my satellites:
Any help would be GREATLY appreciated!
Yes, 2.60 fixes a bug that affected ArduPlane when GPS lock is lost. As for why GPS lock is being lost in the first place, I can only think that putting a huge radiating antenna right next to your GPS module isn't helping ;-)
Thanks - I'm sure someone was going to say something about that. I haven't found any recommendations on how far the 900MHz antenna should be away from any receivers, but maybe I'll just rotate it 90-180 degrees and try again.
I'm trying hard to follow when the 2.60 Dead Reckoning code will actually take over but it isn't clear. I guess I'll jump over the 2.60 Firmware announcement and ask there.
To test for electronic interference with your GPS just hook it up to a PC running MiniGPS and look at the SNR bars for the satellites. Does powering up your other electronics reduce the satellite SNR numbers? There's no need to guess or hope.
Note that you can have 9 satellites just barely (with little SNR head room) or 9 satellites with a lot of head room. The latter is much more robust.
Also, the way your aircraft seems to bank 45+ degrees you can easily loose several sats. If your electronics are weakening your GPS reception they may not come back as quickly - or at all - when you level out.
John - Thanks for the response.
Unfortunately my Google search of "MiniGPS" wasn't very productive. I WOULD be interested to see if there is a way I could graph Signal-to-Noise ratio on the signal strength, but I don't know what program you are referencing or how I could possibly interact directly with the MediaTek GPS.
Along those lines I DID try an go back to the Telemetry logs and find ANY SNR ratio or type of correlation between low GPS count and pitch / roll / servo values and this is what I came up with.
I took the plane back out and tried to do an extended plane orientation test with full electronics, but I was unable to replicate the loss of GPS regardless. The major difference between live and test of course was altitude, speed, and servos firing. I only once very-briefly ever dropped to 6 satellites.
John - If there is a way for me to get a signal strength, I would very much appreciate at as I'm not really sure where to go to continue testing.
Here's what you need:
MiniGPS software (ver. 1.7.1) for Windows.
Obviously this is for bench testing where you run all your other electronics and the GPS is only connected to a PC, but you'll be able to see if there is any reduction in SNR because of the proximity of other equipment.
It would be nice if autopilot developers allowed GPS SNR recording (NMEA sentence $GPGSV) - at least as an option for debugging. It tells you most everything you need to know about how well the unit is functioning.
I have no idea where you found this information but I sure do appreciate it. You right that it is a lot better than blind guessing what the problem could be - or trying random things while I putting all my working electronics at risk.
Thank you John!
Ah - I forgot that the Geo-fence has to be re-enabled with every flight so it really wasn't enabled for this fight. I guess I understand the reason, since it is possible to have the wrong geo-fence set when you are at another location, but I wish there were a more "elegant" solution in Mission Planner than going to the parameter section and changing the value to "1".
Maybe auto-enable 1 mile radius geo-fence for planes that do not have this feature explicitly configured? : )
Just watched you video. You are lucky it didn't end up in the trees. The reason I say this I watched for when you switched to manual and I only saw FBWA and STABILIZE. If the AHRS is giving a bad solution you need to go to full manual mode and fly visually(fpv or los).
Yup - Your right. Manual mode WOULD have been preferred.
Up to that point I had no idea that there was anything going wrong with the GPS until it decided to do a 360 above the way point and head into the woods. "Huh, I don't remember programming THAT."
I use a two-switch method for my flight modes and in the 3 seconds slapped the wrong one. My priority at that point way keeping line of sight once I felt I had some sort of manual control.
Lesson learned here is to remember the mission you planned, keep your eyes on the plane, and keep manual mode a simple switch away.
I had similar issues with gps lost on mid flight after installing a 808 key cam near to the mediatek! I think that those cameras produce interferences on gps reception.