Farmer Field Helper
Farming happens where the signal is worst, so this app keeps all data on the device in an embedded database and only goes online for map tiles and weather. A farmer describes their operation (fields, crops, seasons, machinery, workers and work types), starts a job, records its GPS track in the background, and can follow AB-line parallel guidance with a live lightbar.





How it works
- 1GPS stream
2 Hz location updates at best accuracy, running as an Android foreground service so recording continues with the screen off.
- 2Persist every fix
Each fix (position, time, speed, heading, accuracy) is written to Isar as it arrives, so a killed app never loses the track.
- 3Guidance engine
Pure functions compute the cross-track distance on the sphere (great-circle formula) to the nearest parallel pass.
- 4Lightbar
15 segments with a numeric readout: green within 20 cm, yellow within 80 cm, red beyond, on a ±2 m range.
- 5Live map
Mapbox satellite map with the tractor marker, recorded path, AB line and parallel lines.
- Mark point A, drive, mark point B: the app derives the master line and every parallel pass at multiples of the implement width
- Geodesic maths keeps the guidance correct over long passes
- Testable without a tractor using an emulator with a simulated GPS route
- Fields picked on a satellite map or from the current location, with the closest field found by haversine distance
- Seasons with many-to-many crop assignments per field
- Machinery, workers and work types with hourly rates
- Season cost overview: cost, hours and job count, where each job costs hours × (machine rate + work-type rate)
- Home dashboard with local weather and a 5-day forecast (OpenWeatherMap)
Design decisions
Fast embedded NoSQL with typed queries and links; no network needed in the field.
Compile-safe dependency injection and reactive state; providers cascade, e.g. season → assignments → filtered fields.
Android kills plain background work; a foreground-service location stream reliably keeps a job recording.
No Flutter or I/O dependencies, so it is trivial to unit test; it listens to the tracker’s position without the two features knowing about each other.
Jobs are an append-heavy log, so referencing fields, workers and machines by id keeps writes cheap and lets a track survive later edits.
Each feature owns its UI, state and logic; widgets only watch providers and all I/O lives in notifiers and services.
- Calculate coverage area from the recorded path × working width
- Unit tests for the guidance engine
- Draw the map’s parallel lines with the geodesic engine instead of a flat approximation