22 explicit NotGGAException(
const std::string& context,
const std::string& details =
"") :
23 NmeaException(context,
"The sentence is not a GGA sentence", details) {}
60 GGA(std::string talkerId,
63 char latitudeDirection,
65 char longitudeDirection,
66 unsigned int gpsQuality,
67 unsigned int satellites,
71 double geoidalSeparation,
72 char geoidalSeparationUnits,
74 std::string dgpsReferenceStationId
80 GGA& operator=(
GGA&&) noexcept = default;
82 ~
GGA() override = default;
106 double getHdop() const noexcept;
136 bool operator==(const
GGA& other) const noexcept;
141 char latitudeDirection_{};
143 char longitudeDirection_{};
144 unsigned int gpsQuality_{};
145 unsigned int satellites_{};
148 char altitudeUnits_{};
149 double geoidalSeparation_{};
150 char geoidalSeparationUnits_{};
152 std::string dgpsReferenceStationId_{};
156 GGA(Message0183 baseMessage,
159 char latitudeDirection,
161 char longitudeDirection,
162 unsigned int gpsQuality,
163 unsigned int satellites,
167 double geoidalSeparation,
168 char geoidalSeparationUnits,
170 std::string dgpsReferenceStationId
173 static std::unique_ptr<GGA> create(std::unique_ptr<Message0183> baseMessage);
174 static std::string composeRaw(
const std::string& talkerId,
177 char latitudeDirection,
179 char longitudeDirection,
180 unsigned int gpsQuality,
181 unsigned int satellites,
185 double geoidalSeparation,
186 char geoidalSeparationUnits,
188 const std::string& dgpsReferenceStationId);
Defines a base class for NMEA messages, encapsulating common properties and behaviors.
Base exception class for all NMEA library errors.
Represents a parsed NMEA 0183 GGA (Global Positioning System Fix Data) sentence.
unsigned int getGpsQuality() const noexcept
Get GPS quality indicator.
double getLatitude() const noexcept
Get latitude in decimal degrees.
unsigned int getSatellites() const noexcept
Get number of satellites used.
std::unique_ptr< nmealib::Message > clone() const override
Create a polymorphic copy of this GGA message.
double getDgpsAge() const noexcept
Get age of DGPS data in seconds.
char getLongitudeDirection() const noexcept
Get longitude hemisphere indicator ('E' or 'W').
std::string getStringContent(bool verbose) const noexcept override
Return a human-readable string representation of this message.
char getAltitudeUnits() const noexcept
Get altitude units (typically 'M').
GGA(GGA &&) noexcept=default
char getGeoidalSeparationUnits() const noexcept
Get geoidal separation units (typically 'M').
GGA(std::string talkerId, double timestamp, double latitude, char latitudeDirection, double longitude, char longitudeDirection, unsigned int gpsQuality, unsigned int satellites, double hdop, double altitude, char altitudeUnits, double geoidalSeparation, char geoidalSeparationUnits, double dgpsAge, std::string dgpsReferenceStationId)
Construct a GGA message from individual field values.
std::string getDgpsReferenceStationId() const noexcept
Get DGPS reference station identifier.
GGA & operator=(const GGA &)=default
double getLongitude() const noexcept
Get longitude in decimal degrees.
char getLatitudeDirection() const noexcept
Get latitude hemisphere indicator ('N' or 'S').
double getGeoidalSeparation() const noexcept
Get geoidal separation value.
double getUtcTime() const noexcept
Get UTC fix time in hhmmss.ss numeric form.
double getHdop() const noexcept
Get horizontal dilution of precision.
double getAltitude() const noexcept
Get altitude value.
Represents an NMEA 0183 sentence.
Registry for message type creators.
Factory for creating typed NMEA 0183 message objects from raw sentence strings.
Exception thrown when a sentence is not a valid GGA sentence.
NotGGAException(const std::string &context, const std::string &details="")
Construct a NotGGAException with context and optional details.