Receiving Parsed GPS Data Using FullDuplexSerial4Port
SteveWoodrough
Posts: 190
What is a good way to receive parsed data from a GPS using the FullDuplexSerial4Port (FDS4) object?
When I say parsed, I mean I want to get the heading data, the speed data, long, lat etc. at my discretion.
I have experience using GPS_IO_mini to retrieve specific data from the GPS message strings, but the GPS_IO object relies on a call to FullDuplexSerial_mini lanched into a separate cog. Since Im using FDS4 Id rather use a port and not launch FDSMini in a separate cog.
I have a basic understanding of FDS4 object and I can open ports and successfully simultaneously send data to an LCD at 19,600 baud or the PST at 115,200 baud. I have also opened a port to receive the GPS data within FDS4. I know the port settings for my GPS data are correct since I can receive GPS data and display on the LCD from the GPS module through GPS_IO_mini while running a separate cog running FDSMini.
Clearly GPS_IO is designed to run with FDS_mini. I tried to hack my way along and modify GPS_IO but Im out of my depth.
Thanks
Steve
When I say parsed, I mean I want to get the heading data, the speed data, long, lat etc. at my discretion.
I have experience using GPS_IO_mini to retrieve specific data from the GPS message strings, but the GPS_IO object relies on a call to FullDuplexSerial_mini lanched into a separate cog. Since Im using FDS4 Id rather use a port and not launch FDSMini in a separate cog.
I have a basic understanding of FDS4 object and I can open ports and successfully simultaneously send data to an LCD at 19,600 baud or the PST at 115,200 baud. I have also opened a port to receive the GPS data within FDS4. I know the port settings for my GPS data are correct since I can receive GPS data and display on the LCD from the GPS module through GPS_IO_mini while running a separate cog running FDSMini.
Clearly GPS_IO is designed to run with FDS_mini. I tried to hack my way along and modify GPS_IO but Im out of my depth.
Thanks
Steve
Comments
I posted a note in your earlier thread before I saw this specific question. Do take a look at Tim Moore's original OBEX object. It is embedded in a demo, gpstest.spin, which does show exactly how he parsed out the GPS data.
If you want to use DIO4port plus FDS4port, declare both as objects, and change the numerical conversion calls from uarts.dec(...) to dio.dec(...).
I tried using an hard coded port, and never bothered updating the start method to allow port definition. Anyway it works..
In the main program I simply add a port before the start method.
Please find attached the modified object.
Massimo
Regards
Steve