juancarlostinoco / ardupilot-mega

Automatically exported from code.google.com/p/ardupilot-mega
0 stars 0 forks source link

Wrong GPS coordinates when using plain NMEA module #714

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Connect a plain NMEA GPS module to APM.
2. Connect Mission Planner.
3. Have the GPS module report a latitude of 52.199617 deg.

What is the expected output? What do you see instead?
Exptected output: 52.3326950 deg.
Seen instead:     52.3217725 deg.

What version of the product are you using? On what operating system?
ArduCopter 2.6

Please provide any additional information below.
I think there's an error in method AP_GPS_NMEA::_parse_degrees in 
AP_GPS_NMEA.cpp. 
The local variable frac_min is declared as unsigned int. 
This var receives for digits of the fraction part of the minutes value and is 
further multiplied by ten. 
This leads to an overflow if the fractional part of the minutes value is 
greater than 6,535. 

Original issue reported on code.google.com by fsiebe...@gmail.com on 17 Aug 2012 at 2:40