Coder Social home page Coder Social logo

Comments (6)

oxoocoffee avatar oxoocoffee commented on July 26, 2024 1

I have looked at this and try to understand it. After some testing and research here is what I was able to get.

Looks like it is consumer/producer problem with some units. Some vendors actually acknowledge this in their documentation. Here is one Hemisphere model A101 and A222 (User Guide Revision: A2 May 7, 2018) Page 39 section "Random binary data from A222" stats:

• Verify the baud rate settings match
• Potentially, the volume of data requested to be output could be higher than the current baud rate supports. Try either using a higher baud rate for communications or decreasing the number of messages and/or baud rates

So with my tastes and running such tests overnights I was able to get consistent problems reported here. If the baud rate is too slow for message rate messages from serial do come corrupt therefore CRC check fails.
Some other units I tested have the same issue but do not mention anything like that in their documentation. One unit I tested did not have that problem. I could set baud rate 4800 or 9600 and messages were coming with proper CRC. This would point to "problematic" firmware implementation of circular buffer or whatever buffering technique is used. Increasing baud rate is one part of the problem. If your CPU is overvalued for a long time the same problem will accrue with such units. Messages are not removed fast enough from UART. I was able to reproduce this as well with high baud rate and VERY high host CPU usage. But in this case, it does not happen that often. So if your unit does not support Flow Control and it has to be disabled, that is the reason problem with low baud rate vs message rate

Tested on:
Ubuntu 18.04
ROS(melodic)
pyserial(3.4)
nmea_navsat_driver(master cloned 2 week ago)

Baud Rates:
4800 - 19200

Message rates:
GPGGA: 1 - 20 Hz
GPRMC: 1 - 20 Hz
GPGST: 1Hz

from nmea_navsat_driver.

hoppss avatar hoppss commented on July 26, 2024

Thanks for a TsingHua university doctor , whos first name is GUANG.
This error is solved by redefine /opt/ros/indigo/lib/python2.7/dist.../libnmea_navstat_driver/parse.py
the function of "parse_nmea_sentence" 's regex part is fault.

def parse_nmea_sentence(nmea_sentence):
    # ( original code --- is invalid )Check for a valid nmea sentence
    #if not re.match('^\$GP.*\*[0-9A-Fa-f]{2}$', nmea_sentence):
    #    logger.debug("Regex didn't match, sentence not valid NMEA? Sentence was: %s"
    #                 % repr(nmea_sentence))
    #    return False
    
    #-----ke yong ----2018.3.30
    if nmea_sentence.find('GGA')<0:
        logger.debug("Regex didn't match, sentence not valid NMEA? Sentence was: %s"
                     % repr(nmea_sentence))
        return False
    else:
        print("GGA PAST")

    fields = [field.strip(',') for field in nmea_sentence.split(',')]

from nmea_navsat_driver.

evenator avatar evenator commented on July 26, 2024

Can you post an example of a NMEA sentence that fails to parse with the previous parser but passes with the changes?

from nmea_navsat_driver.

droter avatar droter commented on July 26, 2024

Example of bad checksum with binary data before nmea message:

L����*$GNRMC,150541.20,A,4832.56003,N,11753.56027,W,0.058,,240320,,,F,V*07
$GNGGA,150541.20,4832.56003,N,11753.56027,W,5,12,0.58,525.0,M,-17.0,M,0.2,0000*53
L����*$GNRMC,150541.30,A,4832.56003,N,11753.56027,W,0.037,,240320,,,F,V*0F
$GNGGA,150541.30,4832.56003,N,11753.56027,W,5,12,0.58,525.0,M,-17.0,M,0.3,0000*53
L����*$GNRMC,150541.40,A,4832.56003,N,11753.56027,W,0.039,,240320,,,F,V*06

from nmea_navsat_driver.

evenator avatar evenator commented on July 26, 2024

This would probably be fixed by #55, but I think the author of that PR has abandoned it.

from nmea_navsat_driver.

halqupati avatar halqupati commented on July 26, 2024

how you are connect your GPS with laptop?
This error means your devices are not in same band rate.

And the best solution is to use Arduino with GPS sensor.

from nmea_navsat_driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.