Skip to content

Commit

Permalink
Fix wrong naming: coarse => course
Browse files Browse the repository at this point in the history
  • Loading branch information
MaJerle committed Mar 29, 2020
1 parent dbada6f commit a87c079
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/test_code.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ run_tests() {
RUN_TEST(FLT_IS_EQUAL(hgps.latitude, 39.1226000000));
RUN_TEST(FLT_IS_EQUAL(hgps.longitude, -121.0413666666));
RUN_TEST(FLT_IS_EQUAL(hgps.altitude, 646.4000000000));
RUN_TEST(FLT_IS_EQUAL(hgps.coarse, 360.0000000000));
RUN_TEST(FLT_IS_EQUAL(hgps.course, 360.0000000000));
RUN_TEST(INT_IS_EQUAL(hgps.dop_p, 1.6000000000));
RUN_TEST(INT_IS_EQUAL(hgps.dop_h, 1.6000000000));
RUN_TEST(INT_IS_EQUAL(hgps.dop_v, 1.0000000000));
Expand Down
4 changes: 2 additions & 2 deletions gps_nmea_parser/src/gps/gps.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ parse_term(gps_t* gh) {
gh->p.data.rmc.speed = parse_float_number(gh, NULL);
break;
case 8: /* Process true ground coarse */
gh->p.data.rmc.coarse = parse_float_number(gh, NULL);
gh->p.data.rmc.course = parse_float_number(gh, NULL);
break;
case 9: /* Process date */
gh->p.data.rmc.date = (uint8_t)(10 * CTN(gh->p.term_str[0]) + CTN(gh->p.term_str[1]));
Expand Down Expand Up @@ -331,7 +331,7 @@ copy_from_tmp_memory(gps_t* gh) {
#endif /* GPS_CFG_STATEMENT_GPGSV */
#if GPS_CFG_STATEMENT_GPRMC
} else if (gh->p.stat == STAT_RMC) {
gh->coarse = gh->p.data.rmc.coarse;
gh->course = gh->p.data.rmc.course;
gh->is_valid = gh->p.data.rmc.is_valid;
gh->speed = gh->p.data.rmc.speed;
gh->variation = gh->p.data.rmc.variation;
Expand Down
4 changes: 2 additions & 2 deletions gps_nmea_parser/src/include/gps/gps.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ typedef struct {
/* Information related to GPRMC statement */
uint8_t is_valid; /*!< GPS valid status */
gps_float_t speed; /*!< Ground speed in knots */
gps_float_t coarse; /*!< Ground coarse */
gps_float_t course; /*!< Ground coarse */
gps_float_t variation; /*!< Magnetic variation */
uint8_t date; /*!< Fix date */
uint8_t month; /*!< Fix month */
Expand Down Expand Up @@ -238,7 +238,7 @@ typedef struct {
uint8_t month; /*!< Current UTC month */
uint8_t year; /*!< Current UTC year */
gps_float_t speed; /*!< Current spead over the ground in knots */
gps_float_t coarse; /*!< Current coarse made good */
gps_float_t course; /*!< Current course over ground */
gps_float_t variation; /*!< Current magnetic variation in degrees */
} rmc; /*!< GPRMC message */
#endif /* GPS_CFG_STATEMENT_GPRMC */
Expand Down

0 comments on commit a87c079

Please sign in to comment.