FireSTARR
Loading...
Searching...
No Matches
StartPoint.h
1/* Copyright (c) Queen's Printer for Ontario, 2020. */
2/* Copyright (c) His Majesty the King in Right of Canada as represented by the Minister of Natural Resources, 2025. */
3
4/* SPDX-License-Identifier: AGPL-3.0-or-later */
5
6#pragma once
7#include <tuple>
8#include "Point.h"
9namespace fs
10{
11namespace topo
12{
16class StartPoint : public Point
17{
21 array<tuple<DurationSize, DurationSize>, MAX_DAYS> days_;
22public:
28 StartPoint(MathSize latitude, MathSize longitude) noexcept;
29 ~StartPoint() noexcept = default;
34 StartPoint(const StartPoint& rhs) noexcept = default;
39 StartPoint(StartPoint&& rhs) noexcept = default;
45 StartPoint& operator=(const StartPoint& rhs) = default;
51 StartPoint& operator=(StartPoint&& rhs) noexcept;
57 [[nodiscard]] constexpr DurationSize dayStart(const size_t day) const
58 {
59 return get<0>(days_.at(day));
60 }
66 [[nodiscard]] constexpr DurationSize dayEnd(const size_t day) const
67 {
68 return get<1>(days_.at(day));
69 }
70};
71}
72}
A geographic location in lat/long coordinates.
Definition Point.h:13
constexpr MathSize longitude() const noexcept
Longitude (decimal degrees)
Definition Point.h:59
constexpr MathSize latitude() const noexcept
Latitude (decimal degrees)
Definition Point.h:51
A Point that has sunrise and sunset times for each day.
Definition StartPoint.h:17
array< tuple< DurationSize, DurationSize >, MAX_DAYS > days_
Array of tuple for sunrise/sunset times by day.
Definition StartPoint.h:21
constexpr DurationSize dayStart(const size_t day) const
Sunrise time.
Definition StartPoint.h:57
constexpr DurationSize dayEnd(const size_t day) const
Sunset time.
Definition StartPoint.h:66
StartPoint(MathSize latitude, MathSize longitude) noexcept
Constructor.
Definition StartPoint.cpp:107