FireSTARR
Loading...
Searching...
No Matches
SpreadAlgorithm.h
1/* SPDX-License-Identifier: AGPL-3.0-or-later */
2#ifndef FS_SPREADALGORITHM_H
3#define FS_SPREADALGORITHM_H
4#include "stdafx.h"
5#include "FireSpread.h"
6namespace fs
7{
8using HorizontalAdjustment = std::function<MathSize(const Radians&)>;
9HorizontalAdjustment horizontal_adjustment(const AspectSize slope_azimuth, const SlopeSize slope);
11{
12public:
13 virtual ~SpreadAlgorithm() = default;
14 [[nodiscard]] virtual OffsetSet calculate_offsets(
15 HorizontalAdjustment correction_factor,
16 MathSize tfc,
17 const Radians& head_raz,
18 MathSize head_ros,
19 MathSize back_ros,
20 MathSize length_to_breadth
21 ) const noexcept = 0;
22};
24{
25public:
26 BaseSpreadAlgorithm(const MathSize max_angle, const MathSize cell_size, const MathSize min_ros)
27 : max_angle_(max_angle), cell_size_(cell_size), min_ros_(min_ros)
28 { }
29
30protected:
31 MathSize max_angle_;
32 MathSize cell_size_;
33 MathSize min_ros_;
34};
36{
37public:
38 using BaseSpreadAlgorithm::BaseSpreadAlgorithm;
39 [[nodiscard]] OffsetSet calculate_offsets(
40 HorizontalAdjustment correction_factor,
41 MathSize tfc,
42 const Radians& head_raz,
43 MathSize head_ros,
44 MathSize back_ros,
45 MathSize length_to_breadth
46 ) const noexcept override;
47};
49{
50public:
51 using BaseSpreadAlgorithm::BaseSpreadAlgorithm;
52 [[nodiscard]] OffsetSet calculate_offsets(
53 HorizontalAdjustment correction_factor,
54 MathSize tfc,
55 const Radians& head_raz,
56 MathSize head_ros,
57 MathSize back_ros,
58 MathSize length_to_breadth
59 ) const noexcept override;
60};
61}
62#endif
Definition SpreadAlgorithm.h:24
Definition SpreadAlgorithm.h:36
Definition SpreadAlgorithm.h:11
Definition SpreadAlgorithm.h:49
Definition Radians.h:21