icykoneko / ff14-fish-tracker-app

FF14 Fish Tracker App
https://ff14fish.carbuncleplushy.com
MIT License
61 stars 21 forks source link

Fish that have no weather restrictions show the wrong "uptime" #123

Open icykoneko opened 2 years ago

icykoneko commented 2 years ago

This was submitted by a user in the Disqus feed (See http://disq.us/p/2p3zrfg)

while trying over and over again to catch Phallaina, I couldn't help noticing that its uptime is listed as 27%, even though it's up for exactly 6 hours per day...bug in the code somewhere?

icykoneko commented 2 years ago

It's true in this case, you'd expect to see 25%, not 27%. For now, I'm kinda calling this one a "feature". The 27% value comes from how "uptime" is computed for each fish. The calculation does not account for the downtime following the 10th window, but it does include the duration of that 10th window.

For fish that don't have weather restrictions, it technically doesn't need to do any complex computations since it never changes. This method makes more sense for weather restricted fish since the downtime after the 10th window is unknown (unless computed, and well... we had to stop somewhere right?)

I guess it's worth correcting for the non weather-restricted fish at least.