No description
Find a file
jtricerolph 0b9ac16449 Interpolate period boundaries for historical consumption reports
Reports previously used the raw delta between whichever real readings
happened to fall nearest a period's start/end, un-prorated — accurate
only when readings land close to calendar boundaries. With sparse
readings this misattributes days on either side to the neighbouring
period instead.

getPeriodConsumption() now interpolates the meter's value at each
boundary between the readings bracketing it (linear by day-count),
then diffs those — equivalent to a "daily rate carried forward until
the next reading" spreadsheet approach, generalised across however
many sparse-reading gaps a period spans. Falls back to the old
nearest-reading behaviour when a boundary can't be interpolated (period
starts before the first-ever reading or ends after the latest one).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-28 13:51:10 +00:00
backend Interpolate period boundaries for historical consumption reports 2026-07-28 13:51:10 +00:00
frontend Convert gas meter volume readings to kWh for cost calculations 2026-07-28 13:25:03 +00:00
.gitignore Initial commit — utilities app (meter readings, tariffs, cost tracking) 2026-07-26 17:33:42 +00:00
docker-compose.yml Initial commit — utilities app (meter readings, tariffs, cost tracking) 2026-07-26 17:33:42 +00:00
seed-app.js Fix TOU rate-window mismatch and enforce fallback-split validation 2026-07-28 12:59:19 +00:00