FireSTARR
Loading...
Searching...
No Matches
StartPoint.h
1/* SPDX-License-Identifier: AGPL-3.0-or-later */
2#ifndef FS_STARTPOINT_H
3#define FS_STARTPOINT_H
4#include "stdafx.h"
5#include "Point.h"
6#include "Settings.h"
7namespace fs
8{
9using settings::Settings;
13class StartPoint : public Point
14{
18 array<tuple<DurationSize, DurationSize>, MAX_DAYS> days_;
19
20public:
26 StartPoint(MathSize latitude, MathSize longitude) noexcept;
27 ~StartPoint() noexcept = default;
28 StartPoint(const StartPoint& rhs) noexcept = default;
29 StartPoint(StartPoint&& rhs) noexcept = default;
30 StartPoint& operator=(const StartPoint& rhs) = default;
31 StartPoint& operator=(StartPoint&& rhs) noexcept;
37 [[nodiscard]] constexpr DurationSize dayStart(const size_t day) const
38 {
39 return get<0>(days_.at(day));
40 }
46 [[nodiscard]] constexpr DurationSize dayEnd(const size_t day) const
47 {
48 return get<1>(days_.at(day));
49 }
50 // private:
51 // /**
52 // * \brief Offset from UTC (hours)
53 // */
54 // MathSize utc_offset_;
55};
56}
57#endif
A geographic location in lat/long coordinates.
Definition Point.h:11
constexpr MathSize latitude() const noexcept
Latitude (decimal degrees)
Definition Point.h:30
constexpr MathSize longitude() const noexcept
Longitude (decimal degrees)
Definition Point.h:35
A Point that has sunrise and sunset times for each day.
Definition StartPoint.h:14
constexpr DurationSize dayStart(const size_t day) const
Sunrise time.
Definition StartPoint.h:37
constexpr DurationSize dayEnd(const size_t day) const
Sunset time.
Definition StartPoint.h:46
array< tuple< DurationSize, DurationSize >, MAX_DAYS > days_
Array of tuple for sunrise/sunset times by day.
Definition StartPoint.h:18
StartPoint(MathSize latitude, MathSize longitude) noexcept
Constructor.
Definition StartPoint.cpp:124