I have been stairing at a problem for some time now; it's a personal project that I'm gong to release as freeware/donationware.
Given some tide data
and a given time "now", I need to determine the next low tide and the next high tide.
For some reason I keep stairing at it and can't come up with a solution that reliably works.
For each day; there are (typically) two lows & two highs; so I acn't just find teh lowest or highest value for that day; moreover, "now" could be 11pm which means that the next low or high tide could be the next day....
Any ideas?


