Rust and Raspberry Pi Tide Clock
thefuntastic.com
thefuntastic.com
One issue I ran into was the irregularities described in this article. The other was that the tidal data available through NOAA’s API was from NOAA tidal stations which were (at the time) kind of sparsely placed. I ended up fielding a lot of support email due to what I’ve come to call “the Florida problem”:
As TFA notes, the Gulf of Mexico has weird tides. Also, most of Florida is a long thin peninsula. So let’s say (I forget the real locations) that NOAA has one tidal station in St. Augustine (northern FL on the Atlantic side) and one in Sarasota (mid-to-southern FL on the Gulf of Mexico side). You’re using my app in Ft. Lauderdale (southern FL on the Atlantic side). The St. Augustine location probably better reflects the tides you’ll be seeing, but the Sarasota station is closer, so the app would pull tides from there.
Solving this problem well would probably require establishing “coast domains” based on where each station is accurate (which strikes me as a nontrivial task) and you’d also need to solve for degenerate cases like if someone uses the app from somewhat inland (if they’re planning a trip to a beach a few hours away for instance).
My guess is that in the intervening 8 years someone has taken the Dark Sky approach of aggregating tidal data, figuring these things out, and selling access to an API. And that person deserves whatever money they’re making.
The kicker here is that tides don’t necessarily transition smoothly as you walk the coastline, they can have sharp discontinuities, and so you need to manually figure out where those are and put “search barriers” on them.
Gloss indeed, I think you'd be find just doing the straight line distance between stations. Possibly radius' if it's a long way. We just need the relative distance to/from places not that actual surface area.
If that's not good enough it'd be time to skip re-inventing the wheel and use the secondary port calculation.
That still leaves you the problem of the place you're interested in being halfway between two sensors that disagree about tide times. I'd think you'd have a similar problem in Puget Sound (long, narrow, oriented north-south), unless there are more sensor locations (which I bet there are).
Sarasota is on the western part of the FL Peninsula (on the Gulf of Mexico), St. Augustine is on the eastern part of the FL Peninsula.
Ft. Lauderdale is on the eastern coast of the peninsula but it's way closer to Sarasota than it is to St. Augustine so you'd be getting tide info for the completely wrong coast, not just the wrong part of your own coast.
i live on the coast of the Baltic sea. no tides at all. never actually understood what the fuss is about until I've been to a hotel by the ocean.
Cool DIY project nonetheless. Makes me want to dust off one of the Pis I have sitting around. I've never used the GPIO for anything, and it sounds like I'm missing out.