Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

GPS NMEA decoding

2016-01-26
2018-09-27
  • fixstuff555 - 2016-01-26

    Hello,

    Are there any libraries available to decode GPRMC packets from GPS? I figured I'd ask before I spent time writing something. Didn't see anything in the forum search.

     
  • eschwellinger

    eschwellinger - 2016-01-26

    Hi,

    could you add a link/more Information on which hardware is used?
    BR
    Edwin

     
  • fixstuff555 - 2016-01-26

    I used this GPS HAT board --> https://www.adafruit.com/products/2324, and followed Adafruit's guide here --> https://learn.adafruit.com/adafruit-ultimate-gps-hat-for-raspberry-pi/basic-test.

    I got it working by using the GPSD daemon, and a python script from here --> http://www.danmandle.com/blog/getting-gpsd-to-work-with-python/, along with Pymodbus from here --> https://github.com/bashwork/pymodbus, and a Modbus client/server connection to bring in the GPS data.

    I tried to use the SysProcess***ExecuteCommand feature with cat /dev/ttyAMA0, but I couldn't get it to work right. Every time I would run it, it would kill the Gpsd daemon and stop polling the GPS. (forum filtering)

    With Dan Mandle's python script, which uses this Gpsd daemon, I added several Modbus register write commands to transfer the GPS data. It's clunky, but I got it working. I would really like to skip the Modbus part, and just use the sysProcess feature - but this would require the decoding of the GPS data as well. With the method I used, I didn't end up needing the decoding libraries. That being said are there NMEA libraries available somewhere? Am I using SysProcess***ExecuteCommand (forum filtering) correctly? I used it similarly to the example.

    It works great anyways. What I did, might be useful to others for similar needs possibly. Using the Modbus capability, it truly enables lots of nifty Linux scripting code to bring data in to Codesys (with other, perhaps better methods unavailable)

     
  • CRISARTECH - 2016-04-15

    Hello!

    I'm quite new on the Forum. A little experience with Codesys 2.3 then 3.5 to adapt industrial display to light airplanes or racing cars. Not Raspberry, so I'm not sure, the post is at the right place?

    But my need is also to parse NMEA frames, from Garmin 18x5Hz, connected with RS232.

    The COM part is ok, I receive frames in a buffer, and I would like to parse with library or structured text...

    Thanks in advance for any help...

    Chris.

     
  • CanBohr - 2018-09-27

    Hi Chris,

    have you found a solution for your problem.
    If yes would you mind to share, as I am facing the same problem.

    Cheers,
    Xav

     

Log in to post a comment.