58 static const Speed Invalid;
79 constexpr
Direction(const MathSize value, const
bool is_radians) noexcept
80 :
Index(is_radians ?
util::to_degrees(value) : value)
125 [[nodiscard]]
constexpr MathSize
heading()
const
171 constexpr Wind(
const Wind& rhs)
noexcept =
default;
209 [[nodiscard]]
constexpr MathSize
heading() const noexcept
217 [[nodiscard]]
constexpr MathSize
wsvX() const noexcept
225 [[nodiscard]]
constexpr MathSize
wsvY() const noexcept
256 return speed_ < rhs.speed_;
264 static const Wind Invalid;
368 [[nodiscard]]
constexpr const Wind&
wind() const noexcept
A wrapper around a MathSize to ensure correct types are used.
Definition Index.h:15
constexpr MathSize asValue() const noexcept
Returns value as a MathSize.
Definition Index.h:84
constexpr Index() noexcept
Construct with a value of 0.
Definition Index.h:28
Direction with access to degrees or radians.
Definition Weather.h:64
constexpr MathSize heading() const
Heading (opposite of this direction)
Definition Weather.h:125
constexpr Direction(Direction &&rhs) noexcept=default
Move constructor.
Direction & operator=(const Direction &rhs) noexcept=default
Copy assignment.
~Direction()=default
Destructor.
Direction & operator=(Direction &&rhs) noexcept=default
Move assignment.
constexpr Direction() noexcept=default
Construct with Direction of 0 (North)
constexpr Direction(const Direction &rhs) noexcept=default
Copy constructor.
static const Direction Zero
Direction of 0 (North)
Definition Weather.h:132
constexpr MathSize asDegrees() const
Direction as degrees, where 0 is North and values increase clockwise.
Definition Weather.h:117
constexpr MathSize asRadians() const
Direction as radians, where 0 is North and values increase clockwise.
Definition Weather.h:109
Precipitation (1hr accumulation) (mm)
Definition Weather.h:287
static const Precipitation Zero
Accumulated Precipitation of 0 mm.
Definition Weather.h:295
Relative humidity as a percentage.
Definition Weather.h:34
static const RelativeHumidity Zero
0% Relative Humidity
Definition Weather.h:42
Speed in kilometers per hour.
Definition Weather.h:49
static const Speed Zero
0 km/h
Definition Weather.h:57
Temperature in degrees Celsius.
Definition Weather.h:19
static const Temperature Zero
0 degrees Celsius
Definition Weather.h:27
Collection of weather indices used for calculating FwiWeather.
Definition Weather.h:302
constexpr Weather(const Weather &rhs) noexcept=default
Copy constructor.
constexpr const Temperature & temp() const noexcept
Temperature (Celsius)
Definition Weather.h:352
constexpr Weather() noexcept=default
Constructor with no initialization.
virtual ~Weather()=default
Destructor.
Weather & operator=(const Weather &rhs)=default
Move assignment.
constexpr const Wind & wind() const noexcept
Wind (km/h)
Definition Weather.h:368
constexpr const RelativeHumidity & rh() const noexcept
Relative Humidity (%)
Definition Weather.h:360
Temperature temp_
Temperature (Celsius)
Definition Weather.h:384
constexpr Weather(Weather &&rhs) noexcept=default
Move constructor.
RelativeHumidity rh_
Relative Humidity (%)
Definition Weather.h:388
Wind wind_
Wind (km/h)
Definition Weather.h:392
constexpr const Precipitation & prec() const noexcept
Precipitation (1hr accumulation) (mm)
Definition Weather.h:376
Precipitation prec_
Precipitation (1hr accumulation) (mm)
Definition Weather.h:396
Weather & operator=(Weather &&rhs) noexcept=default
Move assignment.
Wind with a Speed and Direction.
Definition Weather.h:139
Direction direction_
Direction (degrees or radians, N is 0)
Definition Weather.h:277
MathSize wsv_y_
Wind speed vector in Y direction (North is positive)
Definition Weather.h:273
constexpr const Direction & direction() const noexcept
Direction wind is coming from.
Definition Weather.h:201
~Wind()=default
Destructor.
constexpr const Speed & speed() const noexcept
Speed of wind (km/h)
Definition Weather.h:193
static const Wind Zero
Wind with 0 Speed from Direction 0.
Definition Weather.h:263
constexpr bool operator==(const Wind &rhs) const noexcept
Equals to operator.
Definition Weather.h:243
Wind & operator=(const Wind &rhs) noexcept=default
Copy assignment.
constexpr Wind(Wind &&rhs) noexcept=default
Move constructor.
constexpr MathSize wsvY() const noexcept
Y component of wind vector (km/h)
Definition Weather.h:225
constexpr MathSize heading() const noexcept
Direction wind is going towards.
Definition Weather.h:209
Wind(const Direction &direction, const Speed speed) noexcept
Constructor.
Definition Weather.h:160
constexpr MathSize wsvX() const noexcept
X component of wind vector (km/h)
Definition Weather.h:217
Wind & operator=(Wind &&rhs) noexcept=default
Move assignment.
constexpr bool operator<(const Wind &rhs) const noexcept
Less than operator.
Definition Weather.h:252
Speed speed_
Speed (km/h)
Definition Weather.h:281
constexpr Wind() noexcept
Construct with 0 values.
Definition Weather.h:148
MathSize wsv_x_
Wind speed vector in X direction (East is positive)
Definition Weather.h:269
constexpr Wind(const Wind &rhs) noexcept=default
Copy constructor.
constexpr bool operator!=(const Wind &rhs) const noexcept
Not equal to operator.
Definition Weather.h:234