41 num_t right_ascension_rad()
const;
42 num_t declination_rad()
const;
49 num_t elevation_rad()
const;
50 num_t azimuth_rad()
const;
87 double current = this->parent_->elevation();
88 if (std::isnan(current))
93 crossed = this->last_elevation_ <= this->elevation_ && this->elevation_ < current;
95 crossed = this->last_elevation_ >= this->elevation_ && this->elevation_ > current;
98 if (crossed && !std::isnan(this->last_elevation_)) {
101 this->last_elevation_ = current;
106 double last_elevation_{NAN};
112 TEMPLATABLE_VALUE(
double, elevation);
116 double elevation = this->elevation_.value(
x...);
117 double current = this->parent_->elevation();
119 return current > elevation;
121 return current < elevation;
internal::GeoLocation location_
The RealTimeClock class exposes common timekeeping functions via the device's local real-time clock...
void set_sunrise(bool sunrise)
A more user-friendly version of struct tm from time.h.
void set_longitude(double longitude)
This class simplifies creating components that periodically check a state.
time::RealTimeClock * get_time() const
void set_time(time::RealTimeClock *time)
Base class for all automation conditions.
void set_elevation(double elevation)
void set_above(bool above)
bool check(Ts... x) override
Implementation of SPI Controller mode.
time::RealTimeClock * time_
num_t longitude_rad() const
num_t latitude_rad() const
Helper class to easily give an object a parent of type T.
void set_latitude(double latitude)