parallaxinc / Simple-Libraries

Contents of the SimpleIDE workspace folder and its Parallax Learn Simple Libraries subfolder.
http://learn.parallax.com/propeller-c-set-simpleide/update-your-learn-folder
21 stars 21 forks source link

Update gps parser for new NMEA protocol #182

Closed VonSzarvas closed 5 years ago

VonSzarvas commented 5 years ago

update required in : gps_run.c

GPS strings used to be in the format: $GPxxx (such as GPRMC)

But now they are: $Gxxxx (such as GPRMC, GNRMC, GARMC, GLRMC)

Ie. the second character defines which satellite system the data is coming from. It's seamless for the user, but the current code cannot parse strings which do not start $GPxxx.

// The first 2 chars after the $ sign in the NMEA message represent the Talker ID, representing the source of information: // GP: GPS; GL: Glonass; GA: Gallileo; GN: combinded GNSS systems.

Working modified file attached.

Refer to the new byte var : gpsType (which in retrospect would probably be better as "gpsSystem")

Could the gpsSystem also be made available as a parameter in gps_data, so users can query & display the currently active gps system when getting lat/lon/etc.. data ?

Note: I've not searched the entire GPS code base to see if parsing of NMEA strings is done anywhere else.... This is what I needed for a GPS module demo today, is all.

zfi commented 5 years ago

This seems like an issue in Simple Libraries. @VonSzarvas can you verify that this is a library issue? We will link this over to the Simple Libraries repository so @AndyLindsay can have a look at it.

MatzElectronics commented 5 years ago

This is a library issue, and I'll get it resolved soon. It does lend to a possible enhancement for a retrievable value that lets the user know the source (GPS, GLONASS, Galileo) of the incoming data.

On Wed, Feb 20, 2019 at 9:32 AM Jim Ewald notifications@github.com wrote:

This seems like an issue in Simple Libraries. @VonSzarvas https://github.com/VonSzarvas can you verify that this is a library issue? We will link this over to the Simple Libraries repository so @AndyLindsay https://github.com/AndyLindsay can have a look at it.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/parallaxinc/BlocklyProp/issues/1643#issuecomment-465678064, or mute the thread https://github.com/notifications/unsubscribe-auth/AS0quK2xhCsMEQq8daftuPdo2epXm9Z5ks5vPYaPgaJpZM4ahjLI .

VonSzarvas commented 5 years ago

This is a library issue, and I'll get it resolved soon. It does lend to a possible enhancement for a retrievable value that lets the user know the source (GPS, GLONASS, Galileo) of the incoming data. On Wed, Feb 20, 2019 at 9:32 AM Jim Ewald @.***> wrote: This seems like an issue in Simple Libraries. @VonSzarvas https://github.com/VonSzarvas can you verify that this is a library issue? We will link this over to the Simple Libraries repository so @AndyLindsay https://github.com/AndyLindsay can have a look at it. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/parallaxinc/BlocklyProp/issues/1643#issuecomment-465678064, or mute the thread https://github.com/notifications/unsubscribe-auth/AS0quK2xhCsMEQq8daftuPdo2epXm9Z5ks5vPYaPgaJpZM4ahjLI .

@MatzElectronics Any update on this task?

MatzElectronics commented 5 years ago

@VonSzarvas let us know how testing goes, and if/when we can close this one :)

VonSzarvas commented 5 years ago

Tested and approved for merge to main.

Summary:

All standard block functions tested ok : Date,Time,Lat,Lon,Alti,Heading,Speed,SatCount

Advanced function (gps_sources) for SatType tested ok : correctly getting "N" for Glonass/GPS combo in EU zone. Matt reported getting "P" from the US, which implies the new code for SatType parsing is reporting correctly.

VonSzarvas commented 5 years ago

I believe this issue can be closed / marked as resolved.

AndyLindsay commented 5 years ago

Thanks Michael. Closing now...