Open GoogleCodeExporter opened 9 years ago
I have tried this with a EM408 and Venus634 gps modules, both have the same
result
Original comment by defy...@gmail.com
on 10 Feb 2011 at 3:34
The problem appears to be that the printf statement on line 148 of test.pde is
trying to format the number as an integer instead of a floating point.
Change line 148 of test.pde from:
Serial.printf_P(PSTR(" Alt: %dm, #sats: %d\n"), GPS.altitude/100, GPS.num_sats);
to:
Serial.printf_P(PSTR(" Alt: %4.1fm, #sats: %d\n"), GPS.altitude/100,
GPS.num_sats);
And tell me if that solves the problem. (I don't have an APM or a GPS so I
can't test it myself.)
Cheers.
Original comment by rvand...@gmail.com
on 16 Feb 2011 at 2:27
I currently don't have access to my ardupilot so I can't test, but would this
imply that the error is only within the test section of the CLI?
I need to include that I get the exact same result when the telemetry is being
sent down the telemetry com port, I get an altitude of roughly 250-300M when it
should be less than 30.
Original comment by defy...@gmail.com
on 23 Feb 2011 at 9:05
OK, I looked at this again. The REAL problem is on line 146 of
AP_GPS_NMEA.cpp. When the algorithm calls parsenumber() function the result is
the altitude in decimeters instead of meters.
The original coder then multiplies by 100 to convert to millimeters, and stores
the result in the GPS.altitude property. The problem is that GPS.altitude is
expecting centimeters (as defined in GPS.h)
So change line 146 of AP_GPS_NMEA.cpp to read:
altitude = parsenumber(parseptr, 1) * 10; // altitude in decimeters * 10 =
centimeters
and it should start working OK.
Original comment by rvand...@gmail.com
on 10 Mar 2011 at 6:56
That is great, thank you for finding the issue, any chance this can be fixed
perminantly in the next release?
Original comment by defy...@gmail.com
on 14 Apr 2011 at 3:45
It looks like the GPS libs have been completely revamped in the mainline. The
issue should be resolved if you download the latest.
Original comment by rvand...@gmail.com
on 14 Apr 2011 at 12:04
Current code may still be afflicted by GPS receivers providing different
numbers of decimal places on some fields, due to the way _parse_decimal is
coded.
Code attached to issue #416 is more flexible in handling precision variations
in NMEA output.
Original comment by greg.nas...@gmail.com
on 20 Sep 2011 at 2:16
Original issue reported on code.google.com by
defy...@gmail.com
on 10 Feb 2011 at 12:25