Here's the HTML-formatted response: ```html Man Overboard Safety System for Seastead

A Cheap, Open-Source Man Overboard (MOB) System

How Many People Die from Man Overboard Each Year?

Exact global numbers are hard to pin down because MOB events are logged differently across jurisdictions, but here are the commonly cited figures:

So yes — this is a real problem affecting hundreds to thousands of lives per year, and a cheap software solution could meaningfully reduce it.

Your System Design — Review

Your design is well thought out. Let me address each part:

Phone-based "heartbeat" check-in

This is a very sound approach. Key strengths:

Zero-G / fall detection as optional feature

Correct — continuous high-rate accelerometer sampling drains battery noticeably. But iOS and Android both have low-power motion coprocessors (Apple's Motion Coprocessor, Android's Sensor Hub) that can run fall-detection heuristics with minimal main-CPU wakeups. Apple Watch already does this commercially. On a phone it's feasible with maybe 5–15% extra daily battery drain.

Can you prevent the OS from sleeping the app?

Yes, but with caveats:

Battery impact

ModeApproximate extra daily drain
BLE heartbeat every 1 s, no GPS on phone2–5%
Wi-Fi heartbeat every 1 s (as fallback)8–15%
Add continuous accelerometer via sensor hub+3–8%
Add continuous accelerometer via main CPU+20–40% (bad — avoid)

Verdict: most phones will easily make it through a full day on one charge with the BLE-first design. Your fallback-to-Wi-Fi plan is correct.

Door sensor without phone nearby

Good optional add-on. A $5 ESP32 with a reed switch + BLE scanner can detect "door opened" and "no registered phone within X meters" and raise an alert. Very cheap to add.

What about phone going dead?

Yes — treat "missed check-ins for > N seconds" and "phone reported low battery" as separate states. The app should nag at 30% and warn the base station at 15%. The base station should escalate to a non-emergency alert (not a crash-stop) if a phone goes offline while the user is known to be inside.

Can AI Write This Today?

Yes, absolutely. This is well within what Claude Code, Cursor, or similar tools can produce. A working prototype is probably 1–2 weekends of effort with AI assistance.

Recommended tooling

"Hello World" for a Flutter app today is literally flutter create myapp && flutter run. With an AI pair-programmer, you can go from zero to a functioning heartbeat prototype in a few hours.

Would Existing Yachts Have a Computer to Run This?

Many already do:

For boats without any computer, a $50–$100 Raspberry Pi + siren + small touchscreen would be a complete solution. The software being free/open-source means the total cost to add MOB protection to any boat is under $150.

Has This Been Done Before?

Yes — there are several commercial and a few open-source efforts. Important to know, so you don't reinvent everything:

Commercial products

Open-source / DIY

Gap / opportunity: There does not appear to be a well-maintained, free, open-source, phone-based MOB system that integrates with open marine platforms like SignalK. Your project would fill a real niche.

Things to Be Careful About

  1. False alarms kill trust. The #1 reason existing systems get turned off. Tune the timing carefully, allow a "going below decks" mode, and make silencing easy but logged.
  2. RF dead zones on the boat. Metal masts, engine rooms, and the galley can block BLE/Wi-Fi. Test with real hardware; plan for multiple BLE access points / Wi-Fi APs.
  3. OS battery killers. iOS and aggressive Android OEMs will sleep background apps. Bake a "health check" into the app so the base station knows if a phone is misconfigured.
  4. Phone waterproofing. Modern phones are IP68 but only for brief immersion. Good news: you only need the signal to drop — the phone doesn't need to survive.
  5. Auto-stop safety. Automatically stopping and reversing a vessel can itself be dangerous (propeller strike risk if the person is near the boat). Consider: alarm first, stop only, and require human confirmation before reversing. Your 3 s alarm / 6 s stop timing is fine; be more cautious about automated reversing.
  6. Single point of failure. If the base station crashes, everyone is unprotected silently. Add a watchdog and a "heartbeat to the heartbeat" — e.g., one phone also monitors whether the base is alive.
  7. Clock skew. Phones and base must agree on time to within ~1 s. Use NTP.
  8. Privacy / logging. Record positions locally; don't ship them to a cloud unless the user opts in.
  9. Cold water. Even a 30-second recovery is tight in <10 °C water. Your seastead operating area matters.
  10. Regulatory: Don't market it as a replacement for SOLAS-mandated equipment (PLBs, AIS MOB). It's a supplement.

Summary

This is very much worth doing, and worth doing before the seastead is built — it's a standalone gift to the boating community.

```