Skip to content

examples/gps: print units after measurements#3541

Open
nightt5879 wants to merge 2 commits into
apache:masterfrom
nightt5879:nightt5879/gps-example-units-3083
Open

examples/gps: print units after measurements#3541
nightt5879 wants to merge 2 commits into
apache:masterfrom
nightt5879:nightt5879/gps-example-units-3083

Conversation

@nightt5879

@nightt5879 nightt5879 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Print GPS example measurement units after the values instead of only in the output labels.
  • Keep fixed-point scale notes for latitude, longitude, and speed.
  • Print the GGA altitude value followed by the sentence-provided altitude unit.

Fixes #3083

Testing

  • git diff upstream/master...HEAD --check

@nightt5879 nightt5879 force-pushed the nightt5879/gps-example-units-3083 branch 2 times, most recently from 9ce452a to ed657b4 Compare June 15, 2026 13:58
Comment thread examples/gps/gps_main.c Outdated
The GPS example prints parsed measurements without explicit units. The RMC
floating-point speed path also used minmea_tocoord(), even though speed is
not a coordinate.

Add units to the output labels, print speed with minmea_tofloat(), and print
GGA altitude as a scaled value with the sentence-provided unit.

Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
@nightt5879 nightt5879 force-pushed the nightt5879/gps-example-units-3083 branch from 160e001 to 8c44fea Compare June 16, 2026 03:07
acassis
acassis previously approved these changes Jun 16, 2026
@nightt5879 nightt5879 changed the title examples/gps: show units in output examples/gps: print units after measurements Jun 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] GPS example units

4 participants