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)