Skip to content

Commit

Permalink
new laptop
Browse files Browse the repository at this point in the history
  • Loading branch information
walchko committed Nov 11, 2024
1 parent 8811ff6 commit 8bc5896
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/src/parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,9 @@ uint16_t gga_parser(const char* s, gga_t& msg) {
else return 6;
if (v[7][0] != '#') msg.num_sats = static_cast<uint8_t>(atoi(v[7]));
else return 7;
if (v[8][0] != '#') msg.hdop = atof(v[8]);
if (v[8][0] != '#') msg.hdop = (float)atof(v[8]);
else return 8;
if (v[9][0] != '#') msg.msl = atof(v[9]); // altitude
if (v[9][0] != '#') msg.msl = (float)atof(v[9]); // altitude
else return 9;
} catch (...) { return 10; }
return 0;
Expand Down Expand Up @@ -211,11 +211,11 @@ uint16_t gsa_parser(const char* s, gsa_t& msg) {
// msg.hdop = atof(v[end-2]); // horizontal dop
// msg.pdop = atof(v[end-3]); // spread of satellites

if (v[15][0] != '#') msg.pdop = atof(v[15]); // vertical dop
if (v[15][0] != '#') msg.pdop = (float)atof(v[15]); // vertical dop
else return 3;
if (v[16][0] != '#') msg.hdop = atof(v[16]); // horizontal dop
if (v[16][0] != '#') msg.hdop = (float)atof(v[16]); // horizontal dop
else return 4;
if (v[17][0] != '#') msg.vdop = atof(v[17]); // spread of satellites
if (v[17][0] != '#') msg.vdop = (float)atof(v[17]); // spread of satellites
else return 5;
} catch (...) { return 6; }

Expand Down

0 comments on commit 8bc5896

Please sign in to comment.