39 num_t right_ascension_rad()
const;
40 num_t declination_rad()
const;
47 num_t elevation_rad()
const;
48 num_t azimuth_rad()
const;
82 double current = this->parent_->elevation();
83 if (std::isnan(current))
88 crossed = this->last_elevation_ <= this->elevation_ && this->elevation_ < current;
90 crossed = this->last_elevation_ >= this->elevation_ && this->elevation_ > current;
93 if (crossed && !std::isnan(this->last_elevation_)) {
96 this->last_elevation_ = current;
101 double last_elevation_{NAN};
107 TEMPLATABLE_VALUE(
double, elevation);
111 double elevation = this->elevation_.value(x...);
112 double current = this->parent_->elevation();
114 return current > elevation;
116 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)
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)
A more user-friendly version of struct tm from time.h.
Base class for all automation conditions.
void set_elevation(double elevation)
void set_above(bool above)
bool check(Ts... x) override
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)