Git Product home page Git Product logo

Comments (2)

jacketizer avatar jacketizer commented on June 8, 2024

The structure of the gprmc data is:

typedef struct {
	nmea_s base;
	nmea_position longitude;
	nmea_position latitude;
	struct tm time;
} nmea_gprmc_s;

And the members logitude and latitude:

typedef struct {
	double minutes;
	int degrees;
	nmea_cardinal_t cardinal;
} nmea_position;

This means that you should do the following to print the positions using printf:

printf("Longitude:\n");
printf("  Degrees: %d\n", gprmc->longitude.degrees);
printf("  Minutes: %f\n", gprmc->longitude.minutes);
printf("  Cardinal: %c\n", (char) gprmc->longitude.cardinal);
printf("Latitude:\n");
printf("  Degrees: %d\n", gprmc->latitude.degrees);
printf("  Minutes: %f\n", gprmc->latitude.minutes);
printf("  Cardinal: %c\n", (char) gprmc->latitude.cardinal);

from libnmea.

andrewhodel avatar andrewhodel commented on June 8, 2024

If 2 members of nmea_gprmc_s have the same typedef, why wouldn't they both print the same?

from libnmea.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.