Closed fnoop closed 8 years ago
+1
+1
The dirty hack is just ignore prefix. (Copter-3.3 diff)
< const char AP_GPS_NMEA::_gprmc_string[] PROGMEM = "GPRMC";
< const char AP_GPS_NMEA::_gpgga_string[] PROGMEM = "GPGGA";
< const char AP_GPS_NMEA::_gpvtg_string[] PROGMEM = "GPVTG";
---
> const char AP_GPS_NMEA::_gprmc_string[] PROGMEM = "RMC";
> const char AP_GPS_NMEA::_gpgga_string[] PROGMEM = "GGA";
> const char AP_GPS_NMEA::_gpvtg_string[] PROGMEM = "VTG";
339c342
< if (!strcmp_P(_term, _gprmc_string)) {
---
> if (!strcmp_P(_term+2, _gprmc_string)) {
342c345
< } else if (!strcmp_P(_term, _gpgga_string)) {
---
> } else if (!strcmp_P(_term+2, _gpgga_string)) {
345c348
< } else if (!strcmp_P(_term, _gpvtg_string)) {
---
> } else if (!strcmp_P(_term+2, _gpvtg_string)) {
Fixed on master.
Great, thanks :)
Hi, it looks like ardupilot/libraries/AP_GPS/AP_GPS_NMEA.[cpp|h] only recognised GPS messages, not GLONASS or GNSS messages. The first two characters of the message determines the constellation type so GPGGA is the familiar GPS, GLGGA would be GLONASS and GNGGA is GNSS (eg. GPS+GLONASS). Some GPS receivers (I'm looking at Navspark) output GNGGA by default and while it's possible to change requires some manual setup to do so. If APM could recognise GL/GN messages as well as GP, it would automatically be compatible with a wider range of GPS receivers. In the case of the navspark, it works perfectly once the 'Talker ID' is forced to GP instead of GN.