All one hundred eight build stories
Watercourse turn ledger
Irrigation rotation for shared channels, turn by turn
An irrigation rotation divides one canal or pump stream into agreed turns so households downstream receive their share instead of whatever water reaches the end late.
How to run a shared schedule on paper
When several farms share one watercourse, water rarely runs to every gate at once. The FAO surface irrigation design guide notes: "Water may be supplied on a continuous or a rotational basis in which the flow rate and duration may be relatively fixed." It adds: "In those cases, the flexibility in scheduling irrigation is limited to what each farmer or group of farmers can mutually agree upon within their command areas."
In a rotational irrigation system, equal clock minutes only bring equal volumes when the flow stays the same from head to tail. Writing about irrigation systems, the Utah State University Extension flow guide states: "Accurate flow measurement is essential in ensuring the equitable water distribution to water rights holders and shareholders within irrigation companies."
- Write down the physical gate order and agreed shares. List households from head to tail, noting any neighbors who open the same gate. Give each household a whole-number or fraction share agreed by the group before water arrives.
- Keep turns adjacent along the ditch. Move gate by gate down the channel, or start from the tail and work up. Jumping back and forth wastes water filling dry earth between distant plots.
- Record start time, finish time, and water level at the post. Write down when water reaches the gate, when it passes, and one simple depth mark at a gate post, with a neighbor's initials beside the line.
- Carry shortfalls into the next cycle. To keep rotation irrigation water distribution fair over a season, compare delivered turns against shares after each cycle and give shorted households an earlier or longer turn next time.
Why equal minutes can deliver unequal water
Suppose three equal-share gates on one small channel each open for 40 clock minutes in the same cycle, totaling 120 minutes. Gate 1 sees deep water near the knee, Gate 2 sees mid-calf depth, and Gate 3 sees low water just above the ankle. Using simple relative depth weights of 3, 2, and 1 calibrated against that cycle's average depth weight of 2, the calibrated multipliers are 1.5, 1.0, and 0.5.
| Gate | Gate mark | Clock time | Credited balance |
|---|---|---|---|
| Gate 1 | Near knee (weight 3) | 40 min | 60 (20 ahead) |
| Gate 2 | Mid-calf (weight 2) | 40 min | 40 (balanced) |
| Gate 3 | Above ankle (weight 1) | 40 min | 20 (20 short) |
Each gate ran for the same 40 minutes, yet Gate 1 received three times the credited water of Gate 3 in this relative channel scale. If every turn on a channel only ever ran above the ankle, that channel's own calibration would treat ankle depth as normal (factor 1). Mixed observations are what expose a drop in flow.
How Halinhinan tracks turns without a server
I built Halinhinan so households standing at a channel gate can log turns on their own Android phones and merge the record without internet access or a central account. One person enters two to forty households in physical gate order, sets each share, marks shared gates, and enters expected cycle minutes from 30 to 1,440. Neighboring phones join by scanning transfer codes and linking a local cryptographic key to their household name.
On the linked phone, the person at the gate picks Above ankle, Mid-calf, or Near knee, taps "Water reached my gate", and taps Water has passed when done. Elapsed duration comes from Android's monotonic timer, so changing the phone's calendar date or time does not alter a turn. A neighbor at the same gate or an adjacent gate can confirm with Yes or I did not see.
Every action becomes a signed event in an append-only log, keeping four plain states: Witnessed, Claimed (unwitnessed, still counted in full), Disputed, or Missed. If conflicting signed turn records exist, Halinhinan keeps every version visible and never averages them; one independent neighboring signer or the configured member threshold resolves which version counts. Phones exchange records directly on the same Wi-Fi or hotspot using Share nearby and Find nearby phone, or through a numbered chain of camera QR codes, and compare the schedule hash shown on screen. Closing a cycle updates the Carry-forward ledger so the next Head to tail or Tail to head rotation repays deficits within recent supply and an explicit uncertainty band.
- No location tracking or crop advice: Halinhinan records agreed gate order, signed turns, and carry-forward deficits. It does not map plots, measure physical flow in liters, advise on crops, handle money, or decide water rights.
- Local data and exchange care: Records stay on member phones with Android cloud backup turned off. Direct Wi-Fi packets and displayed QR codes are signed against tampering, not hidden from observers, so share only with intended neighbors. Read the Halinhinan data handling page.
- Clock reboot safeguard: If a phone restarts mid-turn, Android's monotonic timer resets and the app rejects closing that active turn rather than recording a false duration.
What was not checked
The release app was tested on two physical Android devices, an Infinix Note 8 and a Galaxy Tab S3, using the five-household West watercourse bench scenario (plus 27 automated unit tests and two emulator instrumentation tests). Both devices converged to identical schedule hashes without internet, kept a conflicting turn intact until resolved, survived force-stop mid-turn and a three-day wall-clock change, and tested household reporting and blocking. No field trial has been run with farmers on a real irrigation canal, no physical flow meter has compared the three depth bands against measured discharge, and channels up to 40 households have not been exercised on 40 phones. During the bench run, the fixed rig blocked the phone's rear camera, so live camera-to-screen QR capture between the two physical devices remains unverified; QR segmentation, pixel decoding, assembly, and merge passed using rendered QR images and emulator checks.