As an Easter present, I am releasing some Tide code and graphics to the WD community that I had programmed for me.
It displays in graphics and words the time until the next tide which I find easier to interpret than a table of tides. You can see it in operation on this page, as well as a 'mini" version on my Ajax dashboard on my home page.
Which tidal basin are/is it using or is it good any wherers including places that have only one tide per day. Think you need to say little more about it in those tems rather then download and it not work.
This is exactly what Ive been looking for…but I ve just tried it out and I’m running into problems…
When I first uploaded the script it parsed OK and generated an image: but it said that it would be 17 hours to the next full tide - which is impossible!
I realised I’d set the tideprediction.hmtl up wrongly (it was showing the default Florida station) so I set it up for a local station (Newlyn, Cornwall, UK) and now its saying that its 0 hours till the next tide and theres no graphic…
I see that your page is currently saying it is 25 hours to teh next high tide, so something isn’t right
I noticed the format of your tideprediction.html page is a little different to mine in relation to the dates displayed, have you set the following to “yes” as the default is no.
// If your tide dates include years (Monday 2008-09-10) change this to “yes” //
$yearDate = “no”;//
If that doesn’t work, I changed the date and time format within WX32Tide so that the year doesn’t display and neither does the time-zone. My dates display as follows:
I went into WXTIDE and changed the settings so the times were 24hr clock and the year didnt show and that sorted it…
Ive experimented with my own little graphic that looks rubbish at the moment but will look better if/when I animate it! The idea of course is that the page fills with water as the tide comes in…
Which brings me to my next question: presumably it is possible to use .gifs not .jpegs…I just wonder how the code would need rewriting…I’ll have a look later.
The issue for me is that it would be nice if I could get the page to autorefresh. I understand this code should be sufficient but I’m not sure where it should go in the document…
Sorry I’m answering myself here…but Ive realised the html metatag is just as good…so Ive added it
but Ive noticed another problem: the script predicted the high tide at 9.30 this evening, but is now missing the next low tide and high tide and predicting the low tide tomorrow afternoon (in 18hrs and 15 mins - which isnt much good…)
Regarding the incorrect time to the next tide being displayed, it may be because your server is in a different time-zone to you? The script uses the internal time from the server, so if your are in the UK and the server is in the USA for example, you need to apply the offset as mentioned in my instructions. Can you check that and let us know?
Regarding the meta refresh, did you realise the time is in seconds, so your page is refreshing every 10 seconds? Not sure if you thought it was minutes?
Cheers
I dont think this can be the issue can it?..I’ll try and double-check but the script predicted the high tide this evening and there is a low tide tomorrow afternoon…the problem is that there is a low tide before that which it should also be recognising…
Think of it this way: My script takes the current server time and looks at the next tide as calculated by WX32TIDE. If your server is in a different timezone then it will look up the “wrong” tide from the WX32TIDE table.
Do you have the following as your tides now don’t have the year
$yearDate = “no”;//
I just looked at your site, it says that there are 16 hours 27 minutes to the next low tide at 4:18pm … although this isn’t the next tide, the number of hours is correct between the time now and 4:18pm, so I’m guessing you need a negative offset. Your next tide is 4:05am so I would try a negative 12 offset and see how that looks?
I think you are having the same issue as jossiejojo because the time to the next tide isn’t being picked up properly … its currently saying your next tide is a low tide in 14 hours 56 minutes which is not right, your next tide is about three hours away so I’d also try a negative 12 offset. Let us know how you go?
I’m still not sure if it’s right as your tide tables say the next low tide is 4:05am … your tidepredict page says the next tide is 4:18am and before you did the -12 offset it was 4:18PM …