#include <Climate.hpp>
|
| void | push (double t_avg, double t_range) |
| | Append a daily temperature/range pair to the seven-slot circular history.
|
| |
| double | avg_temp () const |
| | Read the arithmetic mean of retained daily temperature samples.
|
| |
| double | avg_range () const |
| | Read the arithmetic mean of retained daily temperature ranges.
|
| |
|
| double | ta [7] = {} |
| | Daily average temps (deg F)
|
| |
| double | tr [7] = {} |
| | Daily temp ranges (deg F)
|
| |
| int | front = 0 |
| | Circular buffer write index.
|
| |
| int | count = 0 |
| | Number of values stored (max 7)
|
| |
◆ avg_range()
| double openswmm::climate::MovingAvg7::avg_range |
( |
| ) |
const |
Read the arithmetic mean of retained daily temperature ranges.
- Returns
- Fahrenheit difference over count entries, or zero when count==0. Requires count [0,7]; no finite/nonnegative filtering or history mutation occurs.
◆ avg_temp()
| double openswmm::climate::MovingAvg7::avg_temp |
( |
| ) |
const |
Read the arithmetic mean of retained daily temperature samples.
- Returns
- Fahrenheit mean over count entries, or zero when count==0. Requires valid count [0,7]; no filtering of negative/nonfinite values or history mutation occurs.
◆ push()
| void openswmm::climate::MovingAvg7::push |
( |
double | t_avg, |
|
|
double | t_range ) |
Append a daily temperature/range pair to the seven-slot circular history.
- Parameters
-
| t_avg | Finite daily mean Fahrenheit, stored without validation/conversion. |
| t_range | Finite daily Fahrenheit range, normally nonnegative; stored unchanged. Requires front in [0,6], count in [0,7]. Replaces oldest values after seven pushes, advances front modulo seven and caps count. No calendar/deduplication check; caller invokes once per desired sample and serializes access. |
◆ count
| int openswmm::climate::MovingAvg7::count = 0 |
Number of values stored (max 7)
◆ front
| int openswmm::climate::MovingAvg7::front = 0 |
Circular buffer write index.
◆ ta
| double openswmm::climate::MovingAvg7::ta[7] = {} |
Daily average temps (deg F)
◆ tr
| double openswmm::climate::MovingAvg7::tr[7] = {} |
Daily temp ranges (deg F)
The documentation for this struct was generated from the following files:
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydrology/Climate.hpp
- /home/runner/work/openswmm.engine/openswmm.engine/src/engine/hydrology/Climate.cpp