1 #ifndef MARNAV_AIS_RATE_OF_TURN_HPP
2 #define MARNAV_AIS_RATE_OF_TURN_HPP
13 using value_type
= int8_t;
17 more_5deg_per_30s_abs
= 127,
18 more_5deg_per_30s_right
= +more_5deg_per_30s_abs
,
19 more_5deg_per_30s_left
= -more_5deg_per_30s_abs
,
20 no_information_available
= -128
23 rate_of_turn() = default;
25 rate_of_turn(const rate_of_turn
&) = default;
26 rate_of_turn
& operator=(const rate_of_turn
&) = default;
28 rate_of_turn(rate_of_turn
&&) = default;
29 rate_of_turn
& operator=(rate_of_turn
&&) = default;
31 explicit rate_of_turn(double deg_per_minute
);
33 explicit rate_of_turn(value_type raw_value
)
40 value_type
raw() const noexcept
{ return value_
; }
42 operator double() const { return value(); }
44 bool available() const noexcept
{ return value_
!= no_information_available
; }
45 bool is_not_turning() const noexcept
{ return value_
== not_turning
; }
46 bool is_more_5deg30s_right() const noexcept
{ return value_
== more_5deg_per_30s_right
; }
47 bool is_more_5deg30s_left() const noexcept
{ return value_
== more_5deg_per_30s_left
; }
50 value_type value_
= no_information_available
;