Function onboard_computer::application::run_gnss
source · fn run_gnss(rng: Rng<'static>) -> SpawnToken<impl Sized>Expand description
Exercise: Parse GNSS data from NMEA 0183 sentences
This task parses NMEA sentences simulated from a GNSS data log file
The task picks random sentences from a log file and looks out for GNS and GSV messages
Print the ID’s of satellites used for fix in GSA sentence and the satellites in view from the GSV sentence
nmea crate docs: https://docs.rs/nmea
- Add the
nmeacrate to theCargo.tomlof theonboard-computer
- You should exclude the
default-featuresof the crate, as we operate inno_stdenvironment - Alternate solution: You can add the crate to the
workspacedependencies of the project in theCargo.tomlof the project For more details see: https://doc.rust-lang.org/cargo/reference/workspaces.html#the-dependencies-table
- Use the
nmeacrate to parse the sentences - Print the parsing result (for debugging purposes) using
esp_println::println!() - Use a match on the result and handle the cases:
- GSA - print “The IDs of satellites used for fix: {x:?}” field
- GSV - print “Satellites in View: {x}” field
- Repeat this processes every 2 seconds.