CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Mon Nov 19, 2018 10:52 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 5 posts ] 
Author Message
 Post subject: GPS NMEA decoding
PostPosted: Tue Jan 26, 2016 4:58 am 
Offline

Joined: Mon Nov 24, 2014 9:16 pm
Posts: 37
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.


Top
   
 Post subject: Re: GPS NMEA decoding
PostPosted: Tue Jan 26, 2016 6:17 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 2958
Hi,

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


Top
   
 Post subject: Re: GPS NMEA decoding
PostPosted: Tue Jan 26, 2016 8:32 pm 
Offline

Joined: Mon Nov 24, 2014 9:16 pm
Posts: 37
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)


Top
   
 Post subject: Re: GPS NMEA decoding
PostPosted: Fri Apr 15, 2016 5:23 am 
Offline

Joined: Sat Apr 02, 2016 7:13 am
Posts: 1
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.


Top
   
 Post subject: Re: GPS NMEA decoding
PostPosted: Thu Sep 27, 2018 2:37 pm 
Offline

Joined: Tue Jan 09, 2018 11:41 am
Posts: 12
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


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 5 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited