noazark / weather

real weather for Javascript
MIT License
228 stars 108 forks source link

More robust conversion #3

Open noazark opened 11 years ago

noazark commented 11 years ago

Issues #1 and #2 both deal with conversion. It may be best to solve both of these with a simple conversion library, either by suggesting an existing solution, or creating one.

JaredCubilla commented 10 years ago

What about this as a conversion library: https://github.com/Dokko1230/conversion.js

noazark commented 10 years ago

That would probably be worth looking at, thank you!

codewithtyler commented 8 years ago

Here are the formulas to convert different units of measure. The PDF comes from NOAA so I know they are correct. Based on the way these formulas are written I think we could easily do the conversions ourselves using pure JS.

noazark commented 8 years ago

@PallasStreams, I think the way to go is to remove conversions entirely from this lib. Math.js has a nice and up to snuff set of converters that will likely be better than anything added to weather.js. What do you think?

codewithtyler commented 8 years ago

It's up to you, but I don't see the point of trying to remove all dependencies (i.e. jQuery and SugarJS) just to add another another dependency afterwards. Especially since almost all the conversions are just multiplying or dividing by one or two numbers.

noazark commented 8 years ago

The goal of removing dependencies is primarily to trim down the size of the package and to make it easier to use in a production environment. As I mentioned in #10, a good conversion library will address some of the funny bits of converting units that I will probably get wrong in my implementation. It also allows users of weather.js to choose their own conversion library (perhaps they already have one). I'll think about it a little more, but I'm definitely leaning toward dropping all converters in favor of making a few recommendations.