Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/locationd:fix-grammar-geoid into ~snappy-hwe-team/snappy-hwe-snaps/+git/locationd:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 9ac6a73ec477ec9576517b60b7d743840e7eb54d
Merged at revision: 0a87d5fd303cca7d54e1e7c00266692d05f32d01
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/locationd:fix-grammar-geoid
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/locationd:master
Diff against target: 52 lines (+8/-2)
2 files modified
src/location/nmea/grammar.h (+2/-2)
src/location/providers/ubx/_8/receiver.cpp (+6/-0)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Simon Fels Approve
Roberto Mier Escandon (community) Approve
Review via email: mp+332852@code.launchpad.net

Description of the change

Height of geoid above WGS84 can be negative. Additional fix for lp: #1715724.

To post a comment you must log in.
Revision history for this message
Roberto Mier Escandon (rmescandon) wrote :

a question inline

review: Needs Information
Revision history for this message
Simon Fels (morphis) :
review: Needs Fixing
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
Revision history for this message
Roberto Mier Escandon (rmescandon) :
review: Approve
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) :
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :

PASSED: Successfully build documentation, rev: 9ac6a73ec477ec9576517b60b7d743840e7eb54d

Generated documentation is available at https://jenkins.canonical.com/system-enablement/job/snappy-hwe-snaps-snap-docs/882/

Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/location/nmea/grammar.h b/src/location/nmea/grammar.h
2index 2223727..a9f86f5 100644
3--- a/src/location/nmea/grammar.h
4+++ b/src/location/nmea/grammar.h
5@@ -99,7 +99,7 @@ public:
6 hdop %= boost::spirit::qi::real_parser<float>();
7 vdop %= boost::spirit::qi::real_parser<float>();
8
9- latitude %= boost::spirit::qi::uint_parser<std::uint32_t, 10, 2, 2>() >>
10+ latitude %= boost::spirit::qi::uint_parser<std::uint32_t, 10, 2, 2>() >>
11 boost::spirit::qi::real_parser<double, FixedPrecisionRealPolicy<2, double>>();
12
13 longitude %= boost::spirit::qi::uint_parser<std::uint32_t, 10, 3, 3>() >>
14@@ -131,7 +131,7 @@ public:
15 >> -hdop >> field_separator
16 >> -(boost::spirit::qi::real_parser<float, boost::spirit::qi::strict_ureal_policies<float>>()) >> field_separator
17 >> -boost::spirit::qi::lit('M') >> field_separator
18- >> -(boost::spirit::qi::real_parser<float, boost::spirit::qi::strict_ureal_policies<float>>()) >> field_separator
19+ >> -(boost::spirit::qi::real_parser<float, boost::spirit::qi::real_policies<float>>()) >> field_separator
20 >> -boost::spirit::qi::lit('M') >> field_separator
21 >> -boost::spirit::qi::real_parser<float, boost::spirit::qi::strict_ureal_policies<float>>() >> field_separator
22 >> -boost::spirit::qi::uint_parser<std::uint32_t, 10, 2, 2>();
23diff --git a/src/location/providers/ubx/_8/receiver.cpp b/src/location/providers/ubx/_8/receiver.cpp
24index dce4abd..2b52af7 100644
25--- a/src/location/providers/ubx/_8/receiver.cpp
26+++ b/src/location/providers/ubx/_8/receiver.cpp
27@@ -1,6 +1,7 @@
28 #include <location/providers/ubx/_8/receiver.h>
29
30 #include <location/nmea/sentence.h>
31+#include <location/logging.h>
32
33 #include <iostream>
34
35@@ -70,12 +71,17 @@ void ubx::_8::Receiver::process_chunk(Buffer::iterator it, Buffer::iterator itE)
36 {
37 monitor->on_new_nmea_sentence(nmea::parse_sentence(nmea_scanner.finalize()));
38 }
39+ catch (const std::exception &e)
40+ {
41+ LOG(ERROR) << "Exception while processing: " << e.what();
42+ }
43 catch (...)
44 {
45 // Dropping the exception as there is hardly any reasonable measure
46 // we can take. Both scanners are designed to recover from issues, and we
47 // we just trap the exception here to guarantee that we keep on consuming the
48 // entire buffer.
49+ LOG(ERROR) << "Unknown exception while processing" << std::endl;
50 }
51 }
52 }

Subscribers

People subscribed via source and target branches