gareth / live-f1

Formula 1 live timing library
14 stars 3 forks source link

Updated weather codes. #3

Closed richard-ive closed 12 years ago

richard-ive commented 12 years ago

Hi. Firstly this is an amazing tool, so thank you!

Just thought I'd push back some changes I've made to your code as they may be useful for you. They're changes to the weather keys.

Kind regards, Richard

gareth commented 12 years ago

Thanks! I'll take your changes on board but I'm actually in the middle of a major rewrite of this codebase so I won't merge this in as-is. Glad it's useful to you, would love to see how you're using it (if you're doing anything other than running the binary)

richard-ive commented 12 years ago

Sorry, I should have explained why I closed my pull request. I noticed there were a few more keys that were incorrect so I have started compiling a list to change in bulk to push over to you. Would it be easier if I left the source as it is as you're in the middle of a rewrite? If I can be of any help with this, please let me know!

I'm actually going to make a free fantasy league. I've tried a few over the years, but never found myself 'hooked' whereas football fantasy leagues always get me hooked. I am intending to use your stream parsed and class models to provide a 'live' points calculator so that the used of the league can watch their points and position within a league change close to real-time. Hopefully this should provide the excitement people need to stay interested. I'm also using it as an excuse to learn Ruby as I've never tired it before (I'm more into JAVA and PHP).

Thanks again!

gareth commented 12 years ago

Actually, the way I'm calculating the metric numbers in this release is totally wrong. Basically I'm using 7 bits of a number to work out the metric, but actually only 3 bits of the number are relevant. So for example, 21 (0010101) and 45 (0101101) might be the same metric (although I can't remember off-hand which 3 bits are relevant, I don't have the new code handy at the moment)

So, it's not that the codes in the source are wrong, but there will be other codes that map to the same metric. I've got all this sorted and I'm trying to tidy up for a new release in my spare time at the moment

gareth commented 12 years ago

Hi, the new repo is now sat at https://github.com/gareth/live_f1-core. Hopefully that will be useful to you :)

richard-ive commented 12 years ago

Awesome! Thanks Gareth. Just installed the gem, I think you need to add 'highlight' as a dependency in the gemspec :) I'll check it out this weekend. Thanks again.