Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add GPS UART module with NMEA parsing and checksum validation #600

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

yousefyasser
Copy link

@yousefyasser yousefyasser commented Jan 18, 2025

  • Added checksum validation for incoming NMEA strings
  • Added parsing of NMEA strings of type GPRMC to extract needed information, such as: latitude and longitude

Co-authored-by: @RasheedAtia
Co-authored-by: @SeifAbbas

Co-authored-by: NightsThunder <saifomaster4@gmail.com>
Co-authored-by: RasheedAtia <rasheedatia@hotmail.com>
@lurch
Copy link
Contributor

lurch commented Jan 21, 2025

There doesn't appear to be a main() function here which calls uart_gps_init or process_gps_data() ? 😕
The examples in pico-examples generally include at least one "standalone example" that creates a UF2 file that can be flashed to a Pico and actually "does something". If this is purely "library code" rather than a "standalone executable example", perhaps https://github.com/raspberrypi/pico-extras would be more suitable?

@yousefyasser
Copy link
Author

Hello @lurch, ok I will add the main function right now

@lurch
Copy link
Contributor

lurch commented Jan 21, 2025

Hello @lurch, ok I will add the main function right now

Thanks! Could you also please clarify which licence this code is released under?

@yousefyasser
Copy link
Author

yousefyasser commented Jan 21, 2025

Hello @lurch, ok I will add the main function right now

Thanks! Could you also please clarify which licence this code is released under?

Sure, this code is released under the MIT license

@lurch
Copy link
Contributor

lurch commented Jan 21, 2025

Sure, this code is released under the MIT license

A comment in the source-code saying that (for the benefit of future readers) would be great.

@peterharperuk
Copy link
Contributor

What hardware are you using to test this? I've only seen i2c gps modules so far (I haven't looked too hard).

@yousefyasser
Copy link
Author

What hardware are you using to test this? I've only seen i2c gps modules so far (I haven't looked too hard).

I used the Neo-6M GPS module.

Copy link
Contributor

@peterharperuk peterharperuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterharperuk
Copy link
Contributor

Too many printfs - you can't see the results for all the output

This was failing to read whole lines for me. And for some reason my
device is putting zeros on the head of strings.
This seem unnecessary.
Make the results clearer.
Comment on lines +22 to +23
#define UART_TX_PIN 4
#define UART_RX_PIN 5
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@peterharperuk Is it worth putting these in the pico_binary_info thingy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants