1 #ifndef __MARNAV__NMEA__DBK__HPP__
2 #define __MARNAV__NMEA__DBK__HPP__
4 #include <marnav/nmea/sentence.hpp>
5 #include <marnav/utils/optional.hpp>
11 MARNAV_NMEA_DECLARE_SENTENCE_PARSE_FUNC(dbk
)
13 /// @brief DBK - Depth Below Keel
15 /// @note This sentence appears to be deprected, use @ref marnav::nmea::dpt "DPT" instead.
20 /// $--DBK,x.x,f,x.x,M,x.x,F*hh<CR><LF>
25 /// 2. Depth feet unit
28 /// 4. Depth meters unit
34 class dbk
: public sentence
36 MARNAV_NMEA_SENTENCE_FRIENDS(dbk
)
39 constexpr static const sentence_id ID
= sentence_id::DBK
;
40 constexpr static const char * TAG
= "DBK";
43 dbk(const dbk
&) = default;
44 dbk
& operator=(const dbk
&) = default;
45 dbk(dbk
&&) = default;
46 dbk
& operator=(dbk
&&) = default;
49 dbk(talker talk
, fields::const_iterator first
, fields::const_iterator last
);
50 virtual std::vector
<std::string
> get_data() const override
;
53 utils::optional
<double> depth_feet
;
54 utils::optional
<unit::distance
> depth_feet_unit
;
55 utils::optional
<double> depth_meter
;
56 utils::optional
<unit::distance
> depth_meter_unit
;
57 utils::optional
<double> depth_fathom
;
58 utils::optional
<unit::distance
> depth_fathom_unit
;
61 decltype(depth_feet
) get_depth_feet() const { return depth_feet
; }
62 decltype(depth_feet_unit
) get_depth_feet_unit() const { return depth_feet_unit
; }
63 decltype(depth_meter
) get_depth_meter() const { return depth_meter
; }
64 decltype(depth_meter_unit
) get_depth_meter_unit() const { return depth_meter_unit
; }
65 decltype(depth_fathom
) get_depth_fathom() const { return depth_fathom
; }
66 decltype(depth_fathom_unit
) get_depth_fathom_unit() const { return depth_fathom_unit
; }
68 void set_depth_feet(double t
) noexcept
;
69 void set_depth_meter(double t
) noexcept
;
70 void set_depth_fathom(double t
) noexcept
;