1 #ifndef __MARNAV__NMEA__GST__HPP__
2 #define __MARNAV__NMEA__GST__HPP__
4 #include <marnav/nmea/sentence.hpp>
5 #include <marnav/nmea/time.hpp>
6 #include <marnav/utils/optional.hpp>
12 MARNAV_NMEA_DECLARE_SENTENCE_PARSE_FUNC(gst
)
14 /// @brief GST - GPS Pseudorange Noise Statistics
19 /// $--GST,hhmmss.ss,x,x,x,x,x,x,x*hh<CR><LF>
23 /// 1. TC time of associated GGA fix
24 /// 2. Total RMS standard deviation of ranges inputs to the navigation solution
25 /// 3. Standard deviation (meters) of semi-major axis of error ellipse
26 /// 4. Standard deviation (meters) of semi-minor axis of error ellipse
27 /// 5. Orientation of semi-major axis of error ellipse (true north degrees)
28 /// 6. Standard deviation (meters) of latitude error
29 /// 7. Standard deviation (meters) of longitude error
30 /// 8. Standard deviation (meters) of altitude error
32 class gst
: public sentence
34 MARNAV_NMEA_SENTENCE_FRIENDS(gst
)
37 constexpr static const sentence_id ID
= sentence_id::GST
;
38 constexpr static const char * TAG
= "GST";
41 gst(const gst
&) = default;
42 gst
& operator=(const gst
&) = default;
43 gst(gst
&&) = default;
44 gst
& operator=(gst
&&) = default;
47 gst(talker talk
, fields::const_iterator first
, fields::const_iterator last
);
48 virtual std::vector
<std::string
> get_data() const override
;
52 double total_rms
= 0.0;
53 double dev_semi_major
= 0.0;
54 double dev_semi_minor
= 0.0;
55 double orientation
= 0.0;
61 decltype(time_utc
) get_time_utc() const { return time_utc
; }
62 decltype(total_rms
) get_total_rms() const { return total_rms
; }
63 decltype(dev_semi_major
) get_dev_semi_major() const { return dev_semi_major
; }
64 decltype(dev_semi_minor
) get_dev_semi_minor() const { return dev_semi_minor
; }
65 decltype(orientation
) get_orientation() const { return orientation
; }
66 decltype(dev_lat
) get_dev_lat() const { return dev_lat
; }
67 decltype(dev_lon
) get_dev_lon() const { return dev_lon
; }
68 decltype(dev_alt
) get_dev_alt() const { return dev_alt
; }
70 void set_time_utc(const nmea::time
& t
) noexcept
{ time_utc
= t
; }
71 void set_total_rms(double t
) noexcept
{ total_rms
= t
; }
72 void set_dev_semi_major(double t
) noexcept
{ dev_semi_major
= t
; }
73 void set_dev_semi_minor(double t
) noexcept
{ dev_semi_minor
= t
; }
74 void set_orientation(double t
) noexcept
{ orientation
= t
; }
75 void set_dev_lat(double t
) noexcept
{ dev_lat
= t
; }
76 void set_dev_lon(double t
) noexcept
{ dev_lon
= t
; }
77 void set_dev_alt(double t
) noexcept
{ dev_alt
= t
; }