I was wondering whether anybody else has been experiencing weird offsets in either latitude or longitude coming from the mediatek GPS? Strangely, it only seems to occur when it runs in binary mode and with NMEA I get way better accuracy. In my case I run it with the libraries from the ArdupilotMega repository and using the DIY drones adapter board. I get a 0.4 degree longitude offset (approximately) when running in binary mode. That translates into an error of over 10km or so I think.

I understand that most of the code is still under heavy development but since I suppose feedback is welcome I thought I ask here. My first guess would be that there could be a problem in the GPS parsing code or on the mediatek firmware. On an unrelated note, my mediatek does not seem to store settings when powering down (although I use it with the adapter which has a battery on it).


Views: 2892

Reply to This

Replies to This Discussion


Is there anyone who has managed to resolve the incorrect coordinate issues with the MTK in binary mode?
And if not, is there a way to use the NMEA data in the Ardupilot Mega? That would be desirable because in that mode I do get the correct coordinates.

I have tried simply setting GPS protocol to 0 (NMEA) in the APM code, but that doesn't produce output in debug mode 4 (gps data)

In debug mode 5 (raw gps output) with the mediatek in NMEA mode I receive the


I believe this is hex which translated is:

$GPGGA,175717.000,5126.6341,N,00528.1306,E,1,5,1.45,52.7,M,47.3,M,,*60Ú ... That seems to contain the correct coordinates that I would like to use.

Ofcourse, ideally, a firmware upgrade for the mediatek would be desirable, but maybe until then we may just use the NMEA data, but I wouldn't have a clue as to how to do that :)

Another topic on this issue: http://diydrones.com/forum/topics/mediatek-ardupilot-imu?xg_source=...

Thanks in advance!

Oh btw; when I try to use the test program (GPS_MTK_test) included in the library in the subfolder AP_GPS I get a compiler error: D:\My Documents\Sketchbook\libraries\AP_GPS\AP_GPS_406.cpp:39: error: expected constructor, destructor, or type conversion before '=' token

Is that the test program I should be using, or should I use the one in the parent folder?

thanks again :)
Jordi has just received a firmware update from MediaTek which he has asked a few of us to try out. I'd expect it will be distrubuted shortly if acceptable.

that's great to hear!
It seemed that the porblems occured with people with a lon between -90 and 90. So you might want to check if that's the case with the testers.

Furthermore I'd be more than happy to test it and let you know how it functions here. Let me know if that would help.

For all people who are coming across this thread and have the same problem: the new firmware seems to fix the longitude-offset issue.
I have three of the MediaTek GPSs. Two of the modules are recent purchases and both report correct lat and long for my location in Texas. However the third module I purchased early on from the DIY Drones Store before the interface board had become available. I attached the module to an interface board and have reflashed the MediaTek GPS firmware twice. The problem I have is that the long reported by this module is -104 deg and should be -96 deg. Also, the altitude is off by around 10 to 20 meters. Do I have a flaky GPS or ?. Any suggestions?

Also, is this the latest MediaTek GPS firmware for DIY Drones use: AXN1.30_2278_3329_384.1151100.1_binary.bin?

If it is, I am still getting an offset in the long data when flashed with the above bin file.

Hi Thomas,

yes, this seems to be the one. Also see Jordi's blog entry. If this update does not fix the problem, maybe you discovered a new bug in the firmware? (just to check: there was this MTK tool which would show which version of the firmware you are running; IIRC it was part of the firmware update software. You might want to try that to verify that your update was successful)

I'm also testing the MediaTek (binary output) using ArduPilotMega 1.0 library test software, indoors in a single story wood frame house near a window facing south. I'm having difficult getting GSP lock, which indicates that the unit is not as sensitive as advertised. In addition to this, when I do get a solution, the reported latitude is right on the mark, however the longitude is more than 20 deg in error. I'm certain that Jordi's blog will provide the solution to this issue.

Reply to Discussion


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service