Hello,
I want to read gps coordinates over UART process them and then perform actions depending on the position.
This means that there are few "subsystems" involved:
* read a line
* pass this line to a nmea parsing library
* process the coordinates (find out if any actions should be taken)
* possibly do something based on the location.
As exercise I assume that every step could take an infinite amount of time.
Contrary to most (all?) examples I would like to discard intermediate values and always work on the latest received coordinates.
Also (again mostly as exercise) my goal is to avoid copying data as much as possible.
The data passed is:
- single characters from the UART to the line reader.
- a line from the line reader to the nmea parsing lib.
- gps coordinates from the nmea parsing lib to the processing code
What primitives would you use?
Regars
Christian
only keep newest message
- RoccoMarco
- Posts: 655
- Joined: Wed Apr 24, 2013 4:11 pm
- Location: Munich (Germany)
- Has thanked: 83 times
- Been thanked: 67 times
- Contact:
Re: only keep newest message
Hi Christian,
I suggest you to take a look to Serial Driver (ChibiOS/HAL)... Do you have any experience with ChibiOS?
I suggest you to take a look to Serial Driver (ChibiOS/HAL)... Do you have any experience with ChibiOS?
Ciao,
RM
RM
Re: only keep newest message
Hi,
I think you might find this open-sourced firmware useful:
https://github.com/grantmd/ChibiCopter/ ... ster/GPS.c
It's not mine, but the character and line parsing you need to get started is found in there.
I think you might find this open-sourced firmware useful:
https://github.com/grantmd/ChibiCopter/ ... ster/GPS.c
It's not mine, but the character and line parsing you need to get started is found in there.
Who is online
Users browsing this forum: No registered users and 5 guests