Get Sunrise & Sunset for a Specific Date (#4712)

* Update real_time_clock.cpp

* Update real_time_clock.h

* Update sun.h

* Update sun.h

* Update sun.h

* Enable the sunAtLocation to be used externally

* Enable the sunAtLocation to be used externally

* Update sun.h

* Update sun.h

* update

* update

* update to only use one function

* Update sun.h

* Update sun.cpp
This commit is contained in:
Rebbe Pod
2023-04-23 16:44:35 -04:00
committed by GitHub
parent 327cd662b4
commit 0a95f116fc
2 changed files with 17 additions and 5 deletions
+3
View File
@@ -59,6 +59,8 @@ class Sun {
optional<time::ESPTime> sunrise(double elevation);
optional<time::ESPTime> sunset(double elevation);
optional<time::ESPTime> sunrise(time::ESPTime date, double elevation);
optional<time::ESPTime> sunset(time::ESPTime date, double elevation);
double elevation();
double azimuth();
@@ -66,6 +68,7 @@ class Sun {
protected:
internal::HorizontalCoordinate calc_coords_();
optional<time::ESPTime> calc_event_(bool rising, double zenith);
optional<time::ESPTime> calc_event_(time::ESPTime date, bool rising, double zenith);
time::RealTimeClock *time_;
internal::GeoLocation location_;